Добро пожаловать в дополнения Thunderbird.
Добавляйте дополнительные функции и стили, чтобы настроить Thunderbird по своему вкусу.
ЗакрытьОтзыв на Auto Filter Timer от Stephane
Рейтинг 3 из 5 звёзд
Very useful addon. It works well except for a bug at startup.
When restoring the filter schedules, it sometimes assign them to the wrong folder.
Here is a patch for that issue:
==========
$ diff -rU 2 auto_filter_timer-1.03 auto_filter_timer-1.04
diff -rU 2 auto_filter_timer-1.03/content/schedulefilters.js auto_filter_timer-1.04/content/schedulefilters.js
--- auto_filter_timer-1.03/content/schedulefilters.js 2018-04-13 17:59:16.000000000 +0200
+++ auto_filter_timer-1.04/content/schedulefilters.js 2018-06-05 23:36:28.463433487 +0200
@@ -233,13 +233,17 @@
}
-function addFiltersSchedule() {
+function addFiltersSchedule( folder ) {
var stringsBundle = document.getElementById("schedulefilters-string-bundle");
var num = promptNumber(stringsBundle.getString('addSchedule'), stringsBundle.getString('period'), 1, 1440, 30);
if (num != null) {
- _addFiltersSchedule(num, true);
+ _addFiltersSchedule(folder, num, true);
}
}
-function _addFiltersSchedule(num, needSave) {
- var folder = GetFirstSelectedMsgFolder();
+function _addFiltersSchedule(folder, num, needSave) {
+ // If the folder is not specified, this function was called from the Thunderbird interface by the user
+ // If the folder is defined, this function is called from the loadFiltersSchedule function at startup
+ if ( folder == null ) {
+ folder = GetFirstSelectedMsgFolder();
+ }
var idInterval = scheduleFilters(folder, num*60000);
filterSchedule.add(folder, idInterval, num);
@@ -252,5 +256,5 @@
var item = filterSchedule.get(folder);
if (item == null) {
- addFiltersSchedule();
+ addFiltersSchedule( folder );
return;
}
@@ -289,9 +293,10 @@
for (var i=0;i<schedule.length;i++) {
var folderUri = schedule[i].uri;
- if ((msgWindow.openFolder == null) || (msgWindow.openFolder.URI != folderUri)) {
- var folder = MailUtils.getFolderForURI(folderUri);
- gFolderTreeView.selectFolder(folder);
- }
- _addFiltersSchedule(schedule[i].time, false);
+ // NOTE - Selecting a folder to apply a schedule doesn't work at startup, as Thunderbird or other add-ons can modify the selected folder at any time
+ //if ((msgWindow.openFolder == null) || (msgWindow.openFolder.URI != folderUri)) {
+ var folder = MailUtils.getFolderForURI(folderUri);
+ //gFolderTreeView.selectFolder(folder);
+ //}
+ _addFiltersSchedule(folder, schedule[i].time, false);
}
} catch (err) {
==========
Hello. Are you suggesting the reference to a folder (as captured at right-click) can be modified at any time by other processes, so that the entire operation can fail / be ascribed to a different folder?! That's crazy stuff
I'd like to update the code, and I can see what is to be added and removed, but I don't have an IDE / helper program that would apply that patch. Could you help with that, please?
Для создания своих подборок вам необходимо иметь учётную запись на сайте дополнений Mozilla.