From 91d5d1003b09530ff3bc9a0aa93e382e943977e0 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Thu, 13 Oct 2022 17:55:29 +0600 Subject: [PATCH] fix(desktop): window maximized state doesn't persist --- lib/main.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index a0d10ef1b..85cdafb92 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -170,12 +170,11 @@ class _SpotubeState extends ConsumerState with WidgetsBindingObserver { prevSize?.height == appWindow.size.height; if (localStorage == null || windowSameDimension || kIsMobile) return; - if (appWindow.isMaximized) return; localStorage!.setString( LocalStorageKeys.windowSizeInfo, jsonEncode({ - 'width': appWindow.size.width, - 'height': appWindow.size.height, + 'width': appWindow.isMaximized ? 0 : appWindow.size.width, + 'height': appWindow.isMaximized ? 0 : appWindow.size.height, }), ); prevSize = appWindow.size;