mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-17 17:04:16 +02:00
fix restart requirement logic when switching windowbar style
This commit is contained in:
@@ -36,13 +36,12 @@ export const WindowSettings = memo(() => {
|
|||||||
if (!e) return;
|
if (!e) return;
|
||||||
|
|
||||||
// Platform.LINUX is used as the native frame option regardless of the actual platform
|
// Platform.LINUX is used as the native frame option regardless of the actual platform
|
||||||
const hasFrame = localSettings?.get('window_has_frame') as
|
const previousWindowBarStyle = settings.windowBarStyle;
|
||||||
| boolean
|
const isSwitchingToNative =
|
||||||
| undefined;
|
previousWindowBarStyle !== Platform.LINUX && e === Platform.LINUX;
|
||||||
const isSwitchingToFrame = !hasFrame && e === Platform.LINUX;
|
const isSwitchingFromNative =
|
||||||
const isSwitchingToNoFrame = hasFrame && e !== Platform.LINUX;
|
previousWindowBarStyle === Platform.LINUX && e !== Platform.LINUX;
|
||||||
|
const requireRestart = isSwitchingToNative || isSwitchingFromNative;
|
||||||
const requireRestart = isSwitchingToFrame || isSwitchingToNoFrame;
|
|
||||||
|
|
||||||
if (requireRestart) {
|
if (requireRestart) {
|
||||||
openRestartRequiredToast();
|
openRestartRequiredToast();
|
||||||
|
|||||||
Reference in New Issue
Block a user