Bug 1927656 - Raise compaction threshold. r=tobyp,aleca

Differential Revision: https://phabricator.services.mozilla.com/D227127

--HG--
extra : rebase_source : 2a28c8f86a44eb2e2d428c5d09066adb04f59ffd
This commit is contained in:
Geoff Lankow 2024-10-29 15:28:53 +13:00
Родитель 948397bace
Коммит 911644cdac
3 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@ -28,7 +28,7 @@ export var MailMigrator = {
_migrateUI() {
// The code for this was ported from
// mozilla/browser/components/nsBrowserGlue.js
const UI_VERSION = 45;
const UI_VERSION = 46;
const UI_VERSION_PREF = "mail.ui-rdf.version";
let currentUIVersion = Services.prefs.getIntPref(UI_VERSION_PREF, 0);
@ -211,6 +211,13 @@ export var MailMigrator = {
}
}
if (currentUIVersion < 46) {
// Clean out an old default value that got stuck in a lot of profiles.
if (Services.prefs.getIntPref("mail.purge_threshhold_mb") == 20) {
Services.prefs.clearUserPref("mail.purge_threshhold_mb");
}
}
// Migration tasks that may take a long time are not run immediately, but
// added to the MigrationTasks object then run at the end.
//

Просмотреть файл

@ -78,7 +78,6 @@ static PRTime gtimeOfLastPurgeCheck; // variable to know when to check for
// purge threshold
#define PREF_MAIL_PROMPT_PURGE_THRESHOLD "mail.prompt_purge_threshhold"
#define PREF_MAIL_PURGE_THRESHOLD "mail.purge_threshhold"
#define PREF_MAIL_PURGE_THRESHOLD_MB "mail.purge_threshhold_mb"
#define PREF_MAIL_PURGE_ASK "mail.purge.ask"
#define PREF_MAIL_WARN_FILTER_CHANGED "mail.warn_filter_changed"
@ -1768,7 +1767,7 @@ nsresult nsMsgDBFolder::GetPurgeThreshold(int32_t* aThreshold) {
nsCOMPtr<nsIPrefBranch> prefBranch =
do_GetService(NS_PREFSERVICE_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv) && prefBranch) {
int32_t thresholdMB = 200;
int32_t thresholdMB = 500;
prefBranch->GetIntPref(PREF_MAIL_PURGE_THRESHOLD_MB, &thresholdMB);
*aThreshold = thresholdMB * 1024;
}

Просмотреть файл

@ -359,7 +359,7 @@ pref("mail.warn_on_collapsed_thread_operation", true);
pref("mail.warn_on_shift_delete", true);
pref("news.warn_on_delete", true);
pref("mail.warn_on_delete_from_trash", true);
pref("mail.purge_threshhold_mb", 200);
pref("mail.purge_threshhold_mb", 500);
pref("mail.prompt_purge_threshhold", true);
pref("mail.purge.ask", true);