mirror of
https://github.com/KeyKeeperApp/KeyKeeper.git
synced 2026-04-17 18:16:28 +03:00
fix confirmation dialog opening while the store is locked
This commit is contained in:
@@ -37,12 +37,15 @@ public partial class RepositoryWindow: Window
|
||||
return;
|
||||
}
|
||||
|
||||
if (DataContext is RepositoryWindowViewModel checkVm &&
|
||||
checkVm.CurrentPage is UnlockedRepositoryViewModel unlockedVm &&
|
||||
!unlockedVm.HasUnsavedChanges)
|
||||
if (DataContext is RepositoryWindowViewModel checkVm)
|
||||
{
|
||||
allowClose = true;
|
||||
return;
|
||||
if ((checkVm.CurrentPage is UnlockedRepositoryViewModel unlockedVm &&
|
||||
!unlockedVm.HasUnsavedChanges)
|
||||
|| checkVm.CurrentPage is LockedRepositoryViewModel)
|
||||
{
|
||||
allowClose = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
e.Cancel = true;
|
||||
|
||||
Reference in New Issue
Block a user