Skip to content

Commit

Permalink
Fixed: Missing SwappedOut event for Application SubPages on Main Page…
Browse files Browse the repository at this point in the history
… Switch
  • Loading branch information
Sewer56 committed Oct 24, 2022
1 parent 2692a0a commit eafb582
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ public partial class ApplicationPage : ReloadedIIPage, IDisposable

public ApplicationPage()
{
SwappedOut += Dispose;
SwappedOut += () =>
{
ViewModel.ChangeApplicationPage(ApplicationSubPage.Null); // make sure swappedout is triggered when switching tabs
Dispose();
};

InitializeComponent();
ViewModel = new ApplicationViewModel(Lib.IoC.Get<MainPageViewModel>().SelectedApplication!, Lib.IoC.Get<ModConfigService>(), Lib.IoC.Get<ModUserConfigService>(), Lib.IoC.Get<LoaderConfig>());
ViewModel.PropertyChanged += WhenPageChanged;
Expand Down

0 comments on commit eafb582

Please sign in to comment.