Bug 399475 Comment 27 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

This was suggested here: https://groups.google.com/g/mozilla.support.thunderbird/c/9T3VGSvPJgM
What it does is when you shift-delete a message in a gmail folder, it moves the message to
Trash folder, auto-expunging the message from source folder. Then the new message in Trash is
marked deleted. Messages marked deleted in Trash are not auto-expunged by gmail and remain in Trash.
So the proposed code then does an UID expunge on the message. Assuming the deleted message has
not been copied to any other "visible in TB" folder, this causes the message to be expunged
from "All Mail" as well, so the message is completed removed "forever".
The main change described above occurs under "case nsIImapUrl::nsImapAddMsgFlags:" in
nsImapProtocol.cpp.
This also merges in the changes proposed by Martin Monperrus in D218927 to allow pref
"expunge_after_delete" to have an effect.
Testing and probably some changes are needed.
This was suggested here: https://groups.google.com/g/mozilla.support.thunderbird/c/9T3VGSvPJgM
What it does is when you shift-delete on selected messages in a gmail folder, it moves the messages to
Trash folder, auto-expunging the messages from source folder. Then the new messages in Trash are
marked deleted. Messages marked deleted in Trash are not auto-expunged by gmail and remain in Trash.
So the proposed code then does UID expunge on the messages moved to Trash. Assuming a deleted message has
not been copied to any other "visible in TB" folder, this causes such messages to be expunged
from "All Mail" as well, so the deleted messages are completed removed "forever".
The main change described above occurs under "case nsIImapUrl::nsImapAddMsgFlags:" in
nsImapProtocol.cpp.
This also merges in the changes proposed by Martin Monperrus in D218927 to allow pref
"expunge_after_delete" to have an effect.
This was suggested here: https://groups.google.com/g/mozilla.support.thunderbird/c/9T3VGSvPJgM
What it does is when you shift-delete on selected messages in a gmail folder, it moves the messages to
Trash folder, auto-expunging the messages from source folder. Then the new messages in Trash are
marked deleted. Messages marked deleted in Trash are not auto-expunged by gmail and remain in Trash.
So the proposed code then does UID expunge on the messages moved to Trash. Assuming a deleted message has
not been copied to any other "visible in TB" folder, this causes such messages to be expunged
from "All Mail" as well, so the deleted messages are completed removed "forever".
The main change described above occurs under "case nsIImapUrl::nsImapAddMsgFlags:" in
nsImapProtocol.cpp.
This also merges in the changes proposed by Martin Monperrus in D218927 to allow pref
"expunge_after_delete" to have an effect.

Changes and additions to above:
1 Now Shift-del for gmail uid expunging from all folders requires pref "expunge_after_delete" be true.
When expunge_after_delete is true, if UIDPLUS is supported a uid expunge is performed. If UIDPLUS
not supported, a full folder expunge is performed. This prevent functionality changes with default setting.
2 This changes the trash folder discovery so that the trash folder picker always shows the actual
folder being used for trash even if the user has not explicitly choosen a folder, i.e., no longer just
shows "Choose Folder" when a special-use \trash folder has been discovered is is actually in use.
3 This no longer only does special-use \trash DiscoveryDone processing for gmail but now works with any
server that returns \trash special-use in a LIST or XLIST response when setting the server's
"trash_folder_name" pref and flagging a folder as trash.
4 Trash folder picker no longer sets pref "trash_folder_name" to "Trash" when pref not yet set. This
avoids showing possibly incorrect (default) trash folder name in picker and in pref "trash_folder_name"
when trash folder not yet discovered or set.

Observed issues (not related to above changes AFAIK):
1 Sometimes have to close and re-open "Advanced Preferences" or "Account Settings" tab to see changes in
preferences "trash_folder_name" or in trash folder picker for the account.
2 After picking a different trash folder with picker in Account Settings, the "trash can" icon appears
correctly on the new folder but doesn't get removed from the original folder. It does get removed from
origianl folder after a TB restart.
This was suggested here: https://groups.google.com/g/mozilla.support.thunderbird/c/9T3VGSvPJgM
What it does is when you shift-delete on selected messages in a gmail folder, it moves the messages to
Trash folder, auto-expunging the messages from source folder. Then the new messages in Trash are
marked deleted. Messages marked deleted in Trash are not auto-expunged by gmail and remain in Trash.
So the proposed code then does UID expunge on the messages moved to Trash. Assuming a deleted message has
not been copied to any other "visible in TB" folder, this causes such messages to be expunged
from "All Mail" as well, so the deleted messages are completed removed "forever".
The main change described above occurs under "case nsIImapUrl::nsImapAddMsgFlags:" in
nsImapProtocol.cpp.
This also merges in the changes proposed by Martin Monperrus in D218927 to allow pref
"expunge_after_delete" to have an effect.
-------------------------------------------------------
Changes and additions to above:
1 Now Shift-del for gmail uid expunging from all folders requires pref "expunge_after_delete" be true.
When expunge_after_delete is true, if UIDPLUS is supported a uid expunge is performed. If UIDPLUS
not supported, a full folder expunge is performed. This prevent functionality changes with default setting.
2 This changes the trash folder discovery so that the trash folder picker always shows the actual
folder being used for trash even if the user has not explicitly choosen a folder, i.e., no longer just
shows "Choose Folder" when a special-use \trash folder has been discovered is is actually in use.
3 This no longer only does special-use \trash DiscoveryDone processing for gmail but now works with any
server that returns \trash special-use in a LIST or XLIST response when setting the server's
"trash_folder_name" pref and flagging a folder as trash.
4 Trash folder picker no longer sets pref "trash_folder_name" to "Trash" when pref not yet set. This
avoids showing possibly incorrect (default) trash folder name in picker and in pref "trash_folder_name"
when trash folder not yet discovered or set.

Observed issues (not related to above changes AFAIK):
1 Sometimes have to close and re-open "Advanced Preferences" or "Account Settings" tab to see changes in
preferences "trash_folder_name" or in trash folder picker for the account.
2 After picking a different trash folder with picker in Account Settings, the "trash can" icon appears
correctly on the new folder but doesn't get removed from the original folder. It does get removed from
origianl folder after a TB restart.
This was suggested here: https://groups.google.com/g/mozilla.support.thunderbird/c/9T3VGSvPJgM
What it does is when you shift-delete on selected messages in a gmail folder, it moves the messages to
Trash folder, auto-expunging the messages from source folder. Then the new messages in Trash are
marked deleted. Messages marked deleted in Trash are not auto-expunged by gmail and remain in Trash.
So the proposed code then does UID expunge on the messages moved to Trash. Assuming a deleted message has
not been copied to any other "visible in TB" folder, this causes such messages to be expunged
from "All Mail" as well, so the deleted messages are completed removed "forever".
The main change described above occurs under "case nsIImapUrl::nsImapAddMsgFlags:" in
nsImapProtocol.cpp.
This also merges in the changes proposed by Martin Monperrus in D218927 to allow pref
"expunge_after_delete" to have an effect.

-----------------------------

Changes and additions to above:
1 Now Shift-del for gmail uid expunging from all folders requires pref "expunge_after_delete" be true.
When expunge_after_delete is true, if UIDPLUS is supported a uid expunge is performed. If UIDPLUS
not supported, a full folder expunge is performed. This prevent functionality changes with default setting.
2 This changes the trash folder discovery so that the trash folder picker always shows the actual
folder being used for trash even if the user has not explicitly choosen a folder, i.e., no longer just
shows "Choose Folder" when a special-use \trash folder has been discovered is is actually in use.
3 This no longer only does special-use \trash DiscoveryDone processing for gmail but now works with any
server that returns \trash special-use in a LIST or XLIST response when setting the server's
"trash_folder_name" pref and flagging a folder as trash.
4 Trash folder picker no longer sets pref "trash_folder_name" to "Trash" when pref not yet set. This
avoids showing possibly incorrect (default) trash folder name in picker and in pref "trash_folder_name"
when trash folder not yet discovered or set.

Observed issues (not related to above changes AFAIK):
1 Sometimes have to close and re-open "Advanced Preferences" or "Account Settings" tab to see changes in
preferences "trash_folder_name" or in trash folder picker for the account.
2 After picking a different trash folder with picker in Account Settings, the "trash can" icon appears
correctly on the new folder but doesn't get removed from the original folder. It does get removed from
origianl folder after a TB restart.
This was suggested here: https://groups.google.com/g/mozilla.support.thunderbird/c/9T3VGSvPJgM
What it does is when you shift-delete on selected messages in a gmail folder, it moves the messages to
Trash folder, auto-expunging the messages from source folder. Then the new messages in Trash are
marked deleted. Messages marked deleted in Trash are not auto-expunged by gmail and remain in Trash.
So the proposed code then does UID expunge on the messages moved to Trash. Assuming a deleted message has
not been copied to any other "visible in TB" folder, this causes such messages to be expunged
from "All Mail" as well, so the deleted messages are completed removed "forever".
The main change described above occurs under "case nsIImapUrl::nsImapAddMsgFlags:" in
nsImapProtocol.cpp.
This also merges in the changes proposed by Martin Monperrus in D218927 to allow pref
"expunge_after_delete" to have an effect.

-----------------------------

Changes and additions to above:
1 Now Shift-del for gmail uid expunging from all folders requires pref "expunge_after_delete" be true.
When expunge_after_delete is true, if UIDPLUS is supported a uid expunge is performed. If UIDPLUS
not supported, a full folder expunge is performed. This prevent functionality changes with default setting.
2 This changes the trash folder discovery so that the trash folder picker always shows the actual
folder being used for trash even if the user has not explicitly chosen a folder, i.e., no longer just
shows "Choose Folder" when a special-use \trash folder has been discovered and is actually in use.
3 This no longer does special-use \trash DiscoveryDone processing only for gmail but now works with any
server that returns \trash special-use in a LIST or XLIST response when setting the server's
"trash_folder_name" pref and flagging a folder as trash.
4 Trash folder picker no longer sets pref "trash_folder_name" to "Trash" when pref not yet set. This
avoids showing possibly incorrect (default) trash folder name in picker and in pref "trash_folder_name"
when trash folder not yet discovered or set.

Observed issues (not related to above changes AFAIK):
1 Sometimes have to close and re-open "Advanced Preferences" or "Account Settings" tab to see changes in
preferences "trash_folder_name" or in trash folder picker for the account.
2 After picking a different trash folder with picker in Account Settings, the "trash can" icon appears
correctly on the new folder but doesn't get removed from the original folder. It does get removed from
original folder after a TB restart.

Back to Bug 399475 Comment 27