diff --git a/src/Desktop/BiliCopilot.UI/Controls/RootLayout.xaml.cs b/src/Desktop/BiliCopilot.UI/Controls/RootLayout.xaml.cs index 5a4a74c4..101cc327 100644 --- a/src/Desktop/BiliCopilot.UI/Controls/RootLayout.xaml.cs +++ b/src/Desktop/BiliCopilot.UI/Controls/RootLayout.xaml.cs @@ -2,7 +2,6 @@ using BiliCopilot.UI.Models.Constants; using BiliCopilot.UI.Pages.Overlay; -using BiliCopilot.UI.Toolkits; using BiliCopilot.UI.ViewModels.Core; using Richasy.WinUI.Share.Base; using Richasy.WinUI.Share.ViewModels; @@ -23,7 +22,6 @@ public RootLayout() { InitializeComponent(); _appViewModel = this.Get(); - InitializeSubtitle(); } /// @@ -234,7 +232,6 @@ public bool TryCancelRightArrow() protected override void OnControlLoaded() { ViewModel.Initialize(MainFrame, OverlayFrame); - ViewModel.PropertyChanged += OnViewModelPropertyChanged; var selectedItem = ViewModel.MenuItems.FirstOrDefault(p => p.IsSelected); if (selectedItem is not null) { @@ -243,51 +240,6 @@ protected override void OnControlLoaded() } } - /// - protected override void OnControlUnloaded() - => ViewModel.PropertyChanged -= OnViewModelPropertyChanged; - - private void OnViewModelPropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e) - { - if (e.PropertyName == nameof(ViewModel.IsTopNavBarShown)) - { - InitializeSubtitle(); - } - } - - private void InitializeSubtitle() - { - var isTopNavBarShown = SettingsToolkit.ReadLocalSetting(Models.Constants.SettingNames.IsTopNavBarShown, true); - if (isTopNavBarShown) - { - MainTitleBar.Subtitle = string.Empty; - return; - } - -#if LOCAL_DEV - var subtitles = new List(); - subtitles.Add("🛠️"); -#if DEBUG - subtitles.Add("Debug"); -#else - subtitles.Add("Release"); -#endif -#if ARCH_X64 - subtitles.Add("x64"); -#elif ARCH_X86 - subtitles.Add("x86"); -#elif ARCH_ARM64 - subtitles.Add("ARM64"); -#endif - if (subtitles.Count > 0) - { - MainTitleBar.Subtitle = string.Join(" | ", subtitles); - } -#else - _ = this; -#endif - } - private void OnNavViewBackRequested(NavigationView sender, NavigationViewBackRequestedEventArgs args) => OnBackRequested(default, default); diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index d7211ce3..49719d91 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -14,8 +14,8 @@ - - + + @@ -23,7 +23,7 @@ - + @@ -54,7 +54,7 @@ - + diff --git a/src/Libs/WinUI.Share b/src/Libs/WinUI.Share index 1d0eef83..216f50fe 160000 --- a/src/Libs/WinUI.Share +++ b/src/Libs/WinUI.Share @@ -1 +1 @@ -Subproject commit 1d0eef8312b284377514ef1882f17846fe391c46 +Subproject commit 216f50fee89ff3a736d69b3e013a818ea425232d