-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: disable assistant when dragging mail _from_ special folders #164
Comments
Yes it is not designed to created your own exclusions - for this we would need to know the internal flag not just a word like "drafts". Can you please explain exactly what you are trying to do? I assume the assistant pops up when it is not expected - please write exactly the steps you do that create the assistant for you. Personally I haven't been able to invoke the assistant by drafting emails. Even if I close composer and reopen the draft later. I would not expect the assistant related to drafts, and I don;t think there would be any valid use case where this would be desirable. So I would rather disable this completely, once you tell me how to reproduce the problem. |
Emails that need attention soon I drop into my drafts folder as they remain marked unread so I do not forget.. when I get the chance I go take care of them. These could be bills or urgent emails. So when I finish I drop the email back into the correct folder and it is at this point that it gets triggered as a move. All indications look like it is designed to add your own exclusion folders. |
ok, so you are using the drafts folder (which is supposed to only have your own emails) in a slightly different way than intended. No problem, I can code an exception for that.
Unfortunately not, it's actually quite complicated. For instance, for trash I had to Monkey patch an internal function ( checkAssistantExclusion: function(targetFolder) {
// Avoid triggering assistant
const FLG = quickFilters.Util.FolderFlags,
isArchiveExcluded = quickFilters.Preferences.getBoolPref("assistant.exclude.archive");
let excluded = FLG.Queue | FLG.Templates | FLG.SentMail | FLG.Drafts | FLG.Newsgroup;
const isMoveDebug = quickFilters.Preferences.isDebugOption("msgMove");
if (quickFilters.Preferences.getBoolPref("assistant.exclude.trash")) {
... as you can see in the code snippet above the "Drafts" flags should already be excluded; I will test what's wrong with it. Note that a folder needs to be configured as "Drafts" in Thunderbird to have the flag; merely naming it "Drafts" will not make it a drafts folder. |
I dragged mine into the drafts just below the inbox. When I move it back out it triggers. Also I am using POP email. |
When I move it back out it triggers That's the one. Ok I will find a solution for you. I never tested that, because normally you edit a draft and then send it (and Thunderbird deletes it). Must say that is a very special use case (never heard of that of any of the other 17,000 users). But then there is no harm in suppressing it, because I cannot imagine that a filter would ever wanna do this automatically. Note that the existing restrictions all apply to the target Folder (not the source, like in your case). |
I have made some modification as a test, which will omit the assistant when you move mail from the folders Drafts, Templates, Trash or Queue. These are kind of the "odd folders" I can think of that you normally wouldn't move mail from manually (most of them automated). You probably would also not want to create an automatic rule for rescuing mail from the Trash (although you might want to do this in a rescue operation; so I am not super sure about that one). So there is 2 functions now And there is a new function checkAssistantSourceExclusion: function(sourceFolder) {
const FLG = quickFilters.Util.FolderFlags;
if (!sourceFolder) return false;
let excluded = FLG.Queue | FLG.Templates | FLG.Drafts | FLG.Trash;
if (excluded & sourceFolder.flags) {
return true;
}
return false;
}, Here is a trial version: caveat -- I tested it with my Imap mailbox and when I dragged mail from drafts to the gmail inbox it didn't trigger the assistant (as expected). However it did show this weird message from Thunderbird that I never have seen before: Not sure what it means, because I have never before moved mail from the draft folders (only deleted) as there was no reason to do so. Drafts are just unfinished thing I have started to write, in my mind there is no need to move that stuff anywhere. That's why not triggering the assistant is also no loss at all to me (and I believe for my users). To install the prerelease above, as usual, download the zip file and then drag that file into Thunderbird Add-ons Manager. Looking forward to your comments. If you think about the selection above, which other source folder types should the assistant ignore? |
OK tested and it works great one that we may also want to add is sent folder. Sometimes you send an email that is important for work or business and you want to make sure you keep a copy so you copy it back to a folder. The other folders you added all tested fine also. Thanks for the update. |
No worries; however - I don't think excluding Sent (by default) is a good idea as people might actually include that into their workflow of creating filters using the "Recipient" template. Personally I use "Copy Sent to Current" so I never, ever have to visit the Sent folder - it's a bit of a waste of time when you can have your replies right in the thread with the original messages where they belong. I will probably rename the configuration button "Assistant should ignore these folder types..." to "Exclude target folders..." maybe with a |
yeah that would make more sense exclude and we can exclude any of them folders we want excluded or not. |
Implemented in v5.9 - Published 28/03/2023 |
So I updated my quickFilters addon to latest version and when I tried to create a new exclusion I realized the search box does not allow anything to be typed in and pressing the + button creates the default but does not allow renaming so unable to create a new folder exclusion. I have attached an image showing this.
The text was updated successfully, but these errors were encountered: