-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/Bug 580252 - Introduce pref gloda.list.immediate to open Glod…
…a result list immediately, take 3, no endless loop. (Issue #169)
- Loading branch information
1 parent
3aaf92c
commit 45d2b8e
Showing
1 changed file
with
6 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# HG changeset patch | ||
# User Betterbird <[email protected]> | ||
# Date 1687991707 -7200 | ||
# Date 1688025052 -7200 | ||
# Parent 2d4670803d7d53cd565135a29a94734a3d10da12 | ||
Bug 580252 - Introduce pref gloda.list.immediate to open Gloda result list immediately. | ||
|
||
|
@@ -31,7 +31,7 @@ diff --git a/mail/app/profile/all-thunderbird.js b/mail/app/profile/all-thunderb | |
diff --git a/mail/base/content/glodaFacetTab.js b/mail/base/content/glodaFacetTab.js | ||
--- a/mail/base/content/glodaFacetTab.js | ||
+++ b/mail/base/content/glodaFacetTab.js | ||
@@ -82,16 +82,30 @@ var glodaFacetTabType = { | ||
@@ -82,16 +82,31 @@ var glodaFacetTabType = { | ||
"chrome://messenger/content/glodaFacetView.xhtml" | ||
); | ||
|
||
|
@@ -41,14 +41,15 @@ diff --git a/mail/base/content/glodaFacetTab.js b/mail/base/content/glodaFacetTa | |
} | ||
|
||
+ let listImmediate = Services.prefs.getIntPref("gloda.list.immediate", 0); | ||
+ if (listImmediate) { | ||
+ if (listImmediate > 0) { | ||
+ aTab.iframe.contentWindow.addEventListener("DOMContentLoaded", async () => { | ||
+ let win = aTab.iframe.contentDocument.getElementById("browser").contentWindow; | ||
+ while (!win.FacetContext) { | ||
+ let count = 0; | ||
+ while (count++ < 20 && !win.FacetContext) { | ||
+ await new Promise(r => top.window.setTimeout(r, 100)); | ||
+ } | ||
+ win.FacetContext.showActiveSetInTab(); | ||
+ if (listImmediate == 2) { | ||
+ if (listImmediate > 1) { | ||
+ let tabmail = top.window.document.getElementById("tabmail"); | ||
+ tabmail.closeTab(aTab); | ||
+ } | ||
|