Skip to content

Commit

Permalink
fix(desktop): window maximized state doesn't persist
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Oct 13, 2022
1 parent 618c6da commit 91d5d10
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,11 @@ class _SpotubeState extends ConsumerState<Spotube> 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;
Expand Down

0 comments on commit 91d5d10

Please sign in to comment.