[MM-37797] Re-added the check for flashing the window (#1696)
This commit is contained in:
@@ -227,12 +227,14 @@ export function restoreMain() {
|
|||||||
|
|
||||||
export function flashFrame(flash: boolean) {
|
export function flashFrame(flash: boolean) {
|
||||||
if (process.platform === 'linux' || process.platform === 'win32') {
|
if (process.platform === 'linux' || process.platform === 'win32') {
|
||||||
|
if (status.config?.notifications.flashWindow) {
|
||||||
status.mainWindow?.flashFrame(flash);
|
status.mainWindow?.flashFrame(flash);
|
||||||
if (status.settingsWindow) {
|
if (status.settingsWindow) {
|
||||||
// main might be hidden behind the settings
|
// main might be hidden behind the settings
|
||||||
status.settingsWindow.flashFrame(flash);
|
status.settingsWindow.flashFrame(flash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (process.platform === 'darwin' && status.config?.notifications.bounceIcon) {
|
if (process.platform === 'darwin' && status.config?.notifications.bounceIcon) {
|
||||||
app.dock.bounce(status.config?.notifications.bounceIconType);
|
app.dock.bounce(status.config?.notifications.bounceIconType);
|
||||||
}
|
}
|
||||||
|
@@ -239,13 +239,13 @@ export default class SettingsPage extends React.PureComponent<Record<string, nev
|
|||||||
key: 'notifications',
|
key: 'notifications',
|
||||||
data: {
|
data: {
|
||||||
...this.state.notifications,
|
...this.state.notifications,
|
||||||
flashWindow: this.flashWindowRef.current?.checked ? 0 : 2,
|
flashWindow: this.flashWindowRef.current?.checked ? 2 : 0,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
this.setState({
|
this.setState({
|
||||||
notifications: {
|
notifications: {
|
||||||
...this.state.notifications,
|
...this.state.notifications,
|
||||||
flashWindow: this.flashWindowRef.current?.checked ? 0 : 2,
|
flashWindow: this.flashWindowRef.current?.checked ? 2 : 0,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user