Commit 0df84c25 authored by henry's avatar henry Committed by Pier Angelo Vendrame
Browse files

fixup! TB 31286: Implementation of bridge, proxy, and firewall settings in...

fixup! TB 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection

TB 41921: Move flushSettings call to TorSettings.

The call in connectionPane will not necessarily run when the
preference tab is closed, nor will it trigger for bridges added through
auto-bootstrapping.
parent d2db4edd
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -2545,19 +2545,6 @@ const gConnectionPane = (function () {

    // populate xul with strings and cache the relevant elements
    _populateXUL() {
      // saves tor settings to disk when navigate away from about:preferences
      window.addEventListener("blur", async () => {
        try {
          // Build a new provider each time because this might be called also
          // when closing the browser (if about:preferences was open), maybe
          // when the provider was already uninitialized.
          const provider = await TorProviderBuilder.build();
          provider.flushSettings();
        } catch (e) {
          console.warn("Could not save the tor settings.", e);
        }
      });

      // Quickstart
      this._enableQuickstartCheckbox = document.getElementById(
        "torPreferences-quickstart-toggle"