Fix multiple messenger instance registrations in entry view models

This commit is contained in:
Geoffroy BONNEVILLE
2021-04-27 15:48:45 +02:00
parent fc8dde32cd
commit a589e1c5b7
5 changed files with 10 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest"> <Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
<Identity Name="wismna.ModernKeePass" Publisher="CN=0719A91A-C322-4EE0-A257-E60733EECF06" Version="1.20.0.12" /> <Identity Name="wismna.ModernKeePass" Publisher="CN=0719A91A-C322-4EE0-A257-E60733EECF06" Version="1.21.0.12" />
<Properties> <Properties>
<DisplayName>ModernKeePass</DisplayName> <DisplayName>ModernKeePass</DisplayName>
<PublisherDisplayName>wismna</PublisherDisplayName> <PublisherDisplayName>wismna</PublisherDisplayName>

View File

@@ -445,5 +445,11 @@ namespace ModernKeePass.ViewModels
}; };
RaisePropertyChanged(string.Empty); RaisePropertyChanged(string.Empty);
} }
public override void Cleanup()
{
MessengerInstance.Unregister(this);
base.Cleanup();
}
} }
} }

View File

@@ -34,6 +34,7 @@ namespace ModernKeePass.Views
protected override async void OnNavigatedFrom(NavigationEventArgs e) protected override async void OnNavigatedFrom(NavigationEventArgs e)
{ {
await Model.AddHistory(); await Model.AddHistory();
Model.Cleanup();
} }
#endregion #endregion

View File

@@ -1,2 +1 @@
(Re-)Added a breadcrumb to help with navigation Fixed a duplication issue with additional fields
Design improvements

View File

@@ -1,2 +1 @@
(R)Ajout du fil d'Ariane pour aider a la navigation Correction d'un probleme de duplication des champs additionnels
Ameliorations de design