Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Turning a pref switch to on that invokes the restart alert bar should close the alert bar when switched back to off. #2958

Closed
bradleyrichter opened this issue Aug 4, 2016 · 3 comments · Fixed by #2969 or #3071
Assignees
Milestone

Comments

@bradleyrichter
Copy link
Contributor

STR:

  1. open prefs
  2. change DNT setting to on
  3. see Restart alert bar appear.
  4. turn DNT switch off

result:
Alert bar remains open

expected:
Alert bar auto-closes

cc @diracdeltas

@bradleyrichter bradleyrichter added this to the 1.0.0 milestone Aug 4, 2016
@diracdeltas
Copy link
Member

cc @darkdh

@willy-b
Copy link
Contributor

willy-b commented Aug 4, 2016

@darkdh, I happened to have just been looking at this code, so a potentially useful reference of where you might be making changes:

js/about/preferences.js:657:

  onChangeSetting (key, value) {
    this.setState({
      settings: this.state.settings.set(key, value)
    })
    aboutActions.changeSetting(key, value)
    if (key === settings.DO_NOT_TRACK || key === settings.HARDWARE_ACCELERATION_ENABLED ||
      key === settings.PDFJS_ENABLED || key === settings.SMOOTH_SCROLL_ENABLED) {
      ipc.send(messages.PREFS_RESTART)
    }
  }

app/index.js:397:

    ipcMain.on(messages.PREFS_RESTART, () => {
      var message = locale.translation('prefsRestart')

      appActions.showMessageBox({
        buttons: [locale.translation('yes'), locale.translation('no')],
        options: {
          persist: false
        },
        message
      })
      prefsRestartCallbacks[message] = (buttonIndex, persist) => {
        delete prefsRestartCallbacks[message]
        if (buttonIndex === 0) {
          app.relaunch({args: process.argv.slice(1) + ['--relaunch']})
          app.quit()
        } else {
          appActions.hideMessageBox(message)
        }
      }
    })

darkdh added a commit to darkdh/browser-laptop that referenced this issue Aug 5, 2016
darkdh added a commit to darkdh/browser-laptop that referenced this issue Aug 5, 2016
@luixxiul luixxiul modified the milestones: 0.11.4dev, 1.0.0 Aug 9, 2016
@bbondy bbondy reopened this Aug 10, 2016
@bbondy
Copy link
Member

bbondy commented Aug 10, 2016

This was reverted here:
c84e656

...because of an issue with clicking yes to restart not having any effect.
It's not critical for 0.11.4 though anyway so please just do a new commit for this when fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants