-
Notifications
You must be signed in to change notification settings - Fork 22
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 - New retention policy: Always keep unread messages #324
Comments
Why don't you browse the code at:
https://searchfox.org/comm-central/source
|
Because i didn't know it existed, i've downloaded the code and searched with np++ so I guess is kind of the same thing? maybe i've searched the latest commit instead of a specific version |
Searchfox is much more convenient, it has cross references, history,
logs, etc.
|
Oh, nice, i'll recheck everything with it and edit my post with new finding then, thanks. |
It would be easier if you submitted a patch. Looks like you also need to add some strings for the UI. BTW, IDL files define interfaces, they are not auto-generated, but include files are generated from them. |
I could do that, i just hope I won't struggle with the build system like all the time :) |
Depending on your OS, the one-liner |
Well, what i'm most interested in is downloading the correct version, would this download the correct version i should diff to? BTW i'm on windows. |
You should follow https://github.com/Betterbird/thunderbird-patches/blob/main/README.md for Windows. At the end you can issue |
If you don't want to build, you can just download the comm-central or comm-esr128 repository. That's much smaller than the Mozilla repository which you need to build. |
As the title says, a new retention policy option to not delete unread message.
I've already checked inside the codebase, downloaded here https://hg.mozilla.org/comm-central/archive/tip.zip , so here some pointers:
\mailnews\base\content\folderProps.xhtml and \mailnews\base\prefs\content\am-offline.xhtml
Here a new checkbox should be added after the "retention.applyToFlagged" element's hbox
\mailnews\base\content\retention.js
Here initCommonRetentionSettings and saveCommonRetentionSettings should be modified to get/set the new option
\mailnews\base\prefs\content\am-offline.js
Here in onLockPreference the new option should be added, in onPreInit the option should be set to hidden like the "retention.applyToFlagged" option
\mailnews\db\msgdb\public\nsMsgDatabase.h
Here a new boolean protected attribute should be add to structure nsMsgRetentionSettings
\mailnews\db\msgdb\public\nsIMsgDatabase.idl
I don't know if this file is autogenerated, but if it's not the new attribute should be added at the end of interface nsIMsgRetentionSettings
\mailnews\base\src\nsMsgIncomingServer.cpp
Here method nsMsgIncomingServer::SetRetentionSettings and nsMsgIncomingServer::GetRetentionSettings should be modified to use the new attribute
\mailnews\db\msgdb\src\nsMsgDatabase.cpp
Here the constructor should be changed to set a default value to the new member attribute, also setter and getter should be created like the ones for m_applyToFlaggedMessages, then method nsMsgDatabase::SetMsgRetentionSettings and nsMsgDatabase::GetMsgRetentionSettings should be modified to use the new attribute. After that method signature of nsMsgDatabase::FindMessagesOlderThan and nsMsgDatabase::FindExcessMessages should be changed to include the new parameter after applyToFlaggedMessages, then, after the code that skip the message if is nsMsgMessageFlags::Marked, a new check should be implemented, like the one for Marked, to check flag nsMsgMessageFlags::Read. In the end method nsMsgDatabase::ApplyRetentionSettings should call the new getter and pass the new flag to the other two method.
From my research that should be all, i hope to not have missed something
The text was updated successfully, but these errors were encountered: