diff --git a/src/ST.Client.Desktop.Avalonia/Application/UI/Views/MainView.axaml.cs b/src/ST.Client.Desktop.Avalonia/Application/UI/Views/MainView.axaml.cs
index ad71843f8..1e326b432 100644
--- a/src/ST.Client.Desktop.Avalonia/Application/UI/Views/MainView.axaml.cs
+++ b/src/ST.Client.Desktop.Avalonia/Application/UI/Views/MainView.axaml.cs
@@ -130,6 +130,24 @@ namespace System.Application.UI.Views
title.Background = x ? null : _backgroundTemp;
});
}
+
+ if (nav != null)
+ {
+ this.GetObservable(BoundsProperty)
+ .Subscribe(x =>
+ {
+ switch (x.Width)
+ {
+ case < 950:
+ nav.PaneDisplayMode = NavigationViewPaneDisplayMode.LeftCompact;
+ nav.IsPaneOpen = false;
+ break;
+ default:
+ nav.PaneDisplayMode = NavigationViewPaneDisplayMode.Left;
+ break;
+ }
+ });
+ }
}
private void InitializeComponent()
diff --git a/src/ST.Client/Settings/UISettings.cs b/src/ST.Client/Settings/UISettings.cs
index b28a55ad6..908fb22e4 100644
--- a/src/ST.Client/Settings/UISettings.cs
+++ b/src/ST.Client/Settings/UISettings.cs
@@ -27,8 +27,8 @@ namespace System.Application.Settings
///
/// 不再提示的消息框数组
///
- public static SerializableProperty> DoNotShowMessageBoxs { get; }
- = GetProperty(defaultValue: new List(), autoSave: false);
+ public static SerializableProperty> DoNotShowMessageBoxs { get; }
+ = GetProperty(defaultValue: new HashSet(), autoSave: false);
}
}