1010using Avalonia . Media ;
1111using Avalonia . Threading ;
1212using Avalonia . VisualTree ;
13+ using UniGetUI . Avalonia . Extensions ;
1314using UniGetUI . Avalonia . Infrastructure ;
1415using UniGetUI . Avalonia . ViewModels ;
1516using UniGetUI . Avalonia . Views . Pages ;
@@ -128,7 +129,7 @@ public MainWindow()
128129
129130 Resized += ( _ , _ ) => _ = SaveGeometryAsync ( ) ;
130131 PositionChanged += ( _ , _ ) => _ = SaveGeometryAsync ( ) ;
131- this . GetObservable ( WindowStateProperty ) . Subscribe ( state => { _ = SaveGeometryAsync ( ) ; } ) ;
132+ this . GetObservable ( WindowStateProperty ) . SubscribeValue ( state => { _ = SaveGeometryAsync ( ) ; } ) ;
132133
133134 _trayService = new TrayService ( this ) ;
134135 _trayService . UpdateStatus ( ) ;
@@ -290,7 +291,7 @@ private void UpdateOperationsPanelRow()
290291 // windows give the content full width (the hamburger + sliding flyout still provide nav).
291292 private void SetupResponsiveRail ( )
292293 => MainContentRoot . GetObservable ( BoundsProperty )
293- . Subscribe ( b =>
294+ . SubscribeValue ( b =>
294295 {
295296 if ( b . Width <= 0 ) return ;
296297 NavRail . IsVisible = b . Width >= 800 ;
@@ -314,7 +315,7 @@ private void SetupTitleBar()
314315 // collapses to 0, which would clip the search box and hamburger. Use a fixed
315316 // title bar height in that state, and drop the traffic-light reservation
316317 // since the traffic lights aren't shown either.
317- this . GetObservable ( WindowStateProperty ) . Subscribe ( state =>
318+ this . GetObservable ( WindowStateProperty ) . SubscribeValue ( state =>
318319 {
319320 if ( state == WindowState . FullScreen )
320321 {
@@ -354,7 +355,7 @@ private void SetupTitleBar()
354355 HamburgerPanel . Margin = new Thickness ( 10 , 0 , 8 , 0 ) ;
355356 WindowButtons . IsVisible = true ;
356357 MainContentRoot . Margin = new Thickness ( 0 , 44 , 0 , 0 ) ;
357- this . GetObservable ( WindowStateProperty ) . Subscribe ( state =>
358+ this . GetObservable ( WindowStateProperty ) . SubscribeValue ( state =>
358359 {
359360 UpdateMaximizeButtonState ( state == WindowState . Maximized ) ;
360361 } ) ;
@@ -372,7 +373,7 @@ private void SetupTitleBar()
372373 WindowButtons . IsVisible = ! useNativeDecorations ;
373374 MainContentRoot . Margin = new Thickness ( 0 , 44 , 0 , 0 ) ;
374375 // Keep maximize icon in sync with window state
375- this . GetObservable ( WindowStateProperty ) . Subscribe ( state =>
376+ this . GetObservable ( WindowStateProperty ) . SubscribeValue ( state =>
376377 {
377378 UpdateMaximizeButtonState ( state == WindowState . Maximized ) ;
378379 } ) ;
0 commit comments