diff --git a/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj b/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj
index 2511257..c265461 100644
--- a/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj
+++ b/GenshinLyreMidiPlayer.WPF/GenshinLyreMidiPlayer.WPF.csproj
@@ -6,7 +6,7 @@
true
GenshinLyreMidiPlayer.WPF.App
app.manifest
- 2.2.0
+ 2.2.0.1
item_windsong_lyre.ico
enable
https://github.com/sabihoshi/GenshinLyreMidiPlayer
diff --git a/GenshinLyreMidiPlayer.WPF/ViewModels/MainWindowViewModel.cs b/GenshinLyreMidiPlayer.WPF/ViewModels/MainWindowViewModel.cs
index b6837cd..b4a121b 100644
--- a/GenshinLyreMidiPlayer.WPF/ViewModels/MainWindowViewModel.cs
+++ b/GenshinLyreMidiPlayer.WPF/ViewModels/MainWindowViewModel.cs
@@ -75,9 +75,6 @@ private void AutoSuggestBoxOnTextChanged(AutoSuggestBox sender, AutoSuggestBoxTe
private void NavigateBack(NavigationView sender, NavigationViewBackRequestedEventArgs args)
{
- GoBack();
-
- // Work around to select the navigation item that this IScreen is a part of
_history.Pop();
sender.SelectedItem = _history.Pop();
sender.IsBackEnabled = _history.Count > 1;
@@ -86,22 +83,18 @@ private void NavigateBack(NavigationView sender, NavigationViewBackRequestedEven
private void Navigate(NavigationView sender, NavigationViewSelectionChangedEventArgs args)
{
if (args.IsSettingsSelected)
- NavigateToSettings();
+ Activate(SettingsView);
else if ((args.SelectedItem as NavigationViewItem)?.Tag is IScreen viewModel)
- {
- ActivateItem(viewModel);
- _history.Push((NavigationViewItem) sender.SelectedItem);
- }
+ Activate(viewModel);
sender.IsBackEnabled = _history.Count > 1;
NotifyOfPropertyChange(() => ShowUpdate);
- }
- public void NavigateToSettings()
- {
- ActivateItem(SettingsView);
- _history.Push((NavigationViewItem) _navView.SettingsItem);
- _navView.SelectedItem = _navView.SettingsItem;
+ void Activate(IScreen viewModel)
+ {
+ ActivateItem(viewModel);
+ _history.Push((NavigationViewItem) sender.SelectedItem);
+ }
}
}
}
\ No newline at end of file