Move folders API to an id-based API in MV3
Categories
(Thunderbird :: Add-Ons: Extensions API, task)
Tracking
(thunderbird_esr115 wontfix)
| Tracking | Status | |
|---|---|---|
| thunderbird_esr115 | --- | wontfix |
People
(Reporter: john, Assigned: john)
References
Details
Attachments
(1 file)
After we introduced a MailFolderId, this patch allows using the MailFolderId in addition to the MailFolder object in all folder related functions in MV2.
Following a discussion in the last add-on developer call, where the following was raised, I will change the MailFolderId to be an integer in one of the next patches. The reason for this is:
- the current API allows using an arbitrary path, and even though the docs say to NOT create a path manually, add-on developers do that, which causes bugs and headaches.
- the current
MailFolderIdhas the same flaw - an integer id will make the API more robust
- I also hope that I can make the integer id follow folder moves.
As a consequence, this patch enforces the usage of the MailFolderId in MV3, by deprecating the MailFolder object as input parameter.
There is a loose end which will be tackled in the next patch: Some functions (like the copy/create/move folder function) allow specifying an account to access the root folder. This will be solved by introducing a real root folder, which will have a MailFolderId and can be used like any other folder, and we no longer need to use accounts as "destination" for certain folder operations in MV3.
I updated all except 3 tests to use MailFolderIds, so we can test both supported variations in MV2.
In all tests which have been adjusted, I also minimized creating MailFolder objects or MailFolderIds manually
| Assignee | ||
Comment 1•2 years ago
|
||
Depends on D192617
Updated•2 years ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/bd719e913191
Move folders API to an id-based API in MV3. r=mkmelin
Updated•2 years ago
|
Comment 3•2 years ago
|
||
search bugmail for "addons1234" to delete these messages
Description
•