-
Notifications
You must be signed in to change notification settings - Fork 974
prefs that require browser restart should show prompt for browser restart #2546
Conversation
@@ -381,6 +383,26 @@ app.on('ready', () => { | |||
app.quit() | |||
}) | |||
|
|||
ipcMain.on(messages.PREFS_RESTART, () => { | |||
var message = 'Do you want to restart now ?' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be translatable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in 69bd164, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, and will you please include ?
too?
Sure. Will do. |
var message = locale.translation('prefsRestart') | ||
|
||
appActions.showMessageBox({ | ||
buttons: ['Yes', 'No'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this also be translatable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and also update button of password prompt in 94d28c7
I think it would be nice to remove the Requires a restart text from the affected preferences as well because the text is too long and repetitive that way. Maybe also say this:
|
I came up with one scenario, what if the user made change to the pref required restart and ignore the notification bar and keep changing other prefs. Then this user may not know which pref required restart specifically. |
oh ok I see, we could do an electron MessageBox which is modal instead but we try to avoid those because it locks up everything completely. Will defer to Brad. |
@@ -591,6 +592,10 @@ class AboutPreferences extends React.Component { | |||
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to reproduce but sometimes even having the option on gives a save prompt. It's something related to flipping pref though. It works reliably with a restart without the bug.
cherry-picked onto master, thanks |
message | ||
}) | ||
prefsRestartCallbacks[message] = (buttonIndex, persist) => { | ||
if (buttonIndex === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is sometimes being called before the pref is actually saved. if i have flash enabled and disable in prefs then click 'yes' to restart, it is still enabled when Brave relaunches.
git rebase -i
to squash commits if needed.fix #2543