Here's an extension of your patch, with suitable MailExtension APIs. I have a rewrite of Manually Sort Folders that uses these APIs for sorting the accounts, so things seem to be working fine. Some remarks: - I could not force a rebuild of the folder pane, so now Thunderbird needs to be restarted for changes to be taken into account; previously, it was enough to do: ``` // Force a rebuild of the account tree. let mainWindow = Services.wm.getMostRecentWindow("mail:3pane"); mainWindow.gFolderTreeView.mode = mainWindow.gFolderTreeView.mode; ``` but this no longer seems to work. Any advice? - There were some issues with the schema description, for which I filed bug 1606570, but it's non-blocking - I designed the MailExtension API to be nicer than just a raw wrapper around the prefs. Let me know what you think. Thanks, Jonathan
Bug 1359410 Comment 26 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Here's an extension of your patch, with suitable MailExtension APIs. I have a rewrite of Manually Sort Folders that uses these APIs for sorting the accounts, so things seem to be working fine. Some remarks: - I could not force a rebuild of the folder pane, so now Thunderbird needs to be restarted for changes to be taken into account; previously, it was enough to do: ``` // Force a rebuild of the account tree. let mainWindow = Services.wm.getMostRecentWindow("mail:3pane"); mainWindow.gFolderTreeView.mode = mainWindow.gFolderTreeView.mode; ``` but this no longer seems to work. Any advice? - There were some issues with the schema description, for which I filed bug 1606570, but it's non-blocking - I designed the MailExtension API to be nicer than just a raw wrapper around the prefs. Let me know what you think. - I had to set all of the API functions to be async but I don't understand why; is this a requirement of all WebExtensions? Thanks, Jonathan