Skip to content

Commit

Permalink
Feature: Introduce pref mail.startupMinimized. (Issue #140).
Browse files Browse the repository at this point in the history
  • Loading branch information
Betterbird committed Apr 15, 2023
1 parent 7f4eb04 commit 1dbc3cd
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
43 changes: 43 additions & 0 deletions 102/features/19-feature-startup-minimized.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# HG changeset patch
# User Betterbird <[email protected]>
# Date 1681586624 -7200
# Parent 37650153e0cc41085d858f36248b1b8ec96e2f15
Feature: Introduce pref mail.startupMinimized.

diff --git a/mail/app/profile/all-thunderbird.js b/mail/app/profile/all-thunderbird.js
--- a/mail/app/profile/all-thunderbird.js
+++ b/mail/app/profile/all-thunderbird.js
@@ -1338,8 +1338,9 @@ pref("app.donation.eoy.version.viewed",
pref("betterbird.donation.eoy.version", 2022);
pref("betterbird.donation.eoy.version.viewed", 0);
pref("betterbird.donation.eoy.url", "https://www.betterbird.eu/end-of-year/");

// Make this visible in the advanced preferences.
pref("ui.prefersReducedMotion", 0);

pref("mail.multiselect_message_shows_current", false);
+pref("mail.startupMinimized", false);
diff --git a/mail/base/content/msgMail3PaneWindow.js b/mail/base/content/msgMail3PaneWindow.js
--- a/mail/base/content/msgMail3PaneWindow.js
+++ b/mail/base/content/msgMail3PaneWindow.js
@@ -669,16 +669,20 @@ var gMailInit = {
* Delayed startup happens after the first paint of the window. Anything
* that can be delayed until after paint, should be to help give the
* illusion that Thunderbird is starting faster.
*
* Note: this only runs for the main 3 pane window.
*/
_delayedStartup() {
this._cancelDelayedStartup();
+ if (!Services.appinfo.inSafeMode &&
+ Services.prefs.getBoolPref("mail.startupMinimized", false)) {
+ window.minimize();
+ }

MailOfflineMgr.init();

initOpenPGPIfEnabled();

PanelUI.init();
gExtensionsNotifications.init();

1 change: 1 addition & 0 deletions 102/series
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,4 @@ backout-bug-1775093-temp-fix-for-missing-string.patch
17-feature-improved-send-progress.patch
297852-grouping-search-term-CSS.patch
18-feature-multiselect-shows-current.patch
19-feature-startup-minimized.patch

0 comments on commit 1dbc3cd

Please sign in to comment.