[tor-commits] [tor-browser] 20/33: fixup! fixup! Bug 40597: Implement TorSettings module

gitolite role git at cupani.torproject.org
Tue May 3 22:40:28 UTC 2022


This is an automated email from the git hooks/post-receive script.

richard pushed a commit to branch tor-browser-91.9.0esr-11.5-1
in repository tor-browser.

commit 23c8b99580272f4e855a68287810ffa97aa76ccc
Author: Pier Angelo Vendrame <pierov at torproject.org>
AuthorDate: Wed Apr 13 20:52:13 2022 +0200

    fixup! fixup! Bug 40597: Implement TorSettings module
    
    Added a helper on TorConnect to make about:torconnect UI state
    persistent.
---
 browser/modules/TorConnect.jsm | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/browser/modules/TorConnect.jsm b/browser/modules/TorConnect.jsm
index 4e7d99ac93c80..6b501209d844e 100644
--- a/browser/modules/TorConnect.jsm
+++ b/browser/modules/TorConnect.jsm
@@ -326,6 +326,10 @@ const TorConnect = (() => {
         _hasBootstrapEverFailed: false,
         _transitionPromise: null,
 
+        // This is used as a helper to make the state of about:torconnect persistent
+        // during a session, but TorConnect does not use this data at all.
+        _uiState: {},
+
         /* These functions represent ongoing work associated with one of our states
            Some of these functions are mostly empty, apart from defining an
            on_transition function used to resolve their Promise */
@@ -729,6 +733,14 @@ const TorConnect = (() => {
             return this._internetStatus;
         },
 
+        get countryCodes() {
+            return this._countryCodes;
+        },
+
+        get countryNames() {
+            return this._countryNames;
+        },
+
         get errorMessage() {
             return this._errorMessage;
         },
@@ -745,12 +757,11 @@ const TorConnect = (() => {
             return this._hasBootstrapEverFailed;
         },
 
-        get countryCodes() {
-            return this._countryCodes;
+        get uiState() {
+            return this._uiState;
         },
-
-        get countryNames() {
-            return this._countryNames;
+        set uiState(newState) {
+            this._uiState = newState;
         },
 
         /*

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list