mirror of
https://github.com/KeyKeeperApp/KeyKeeper.git
synced 2026-05-03 05:16:29 +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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DataContext is RepositoryWindowViewModel checkVm &&
|
if (DataContext is RepositoryWindowViewModel checkVm)
|
||||||
checkVm.CurrentPage is UnlockedRepositoryViewModel unlockedVm &&
|
|
||||||
!unlockedVm.HasUnsavedChanges)
|
|
||||||
{
|
{
|
||||||
allowClose = true;
|
if ((checkVm.CurrentPage is UnlockedRepositoryViewModel unlockedVm &&
|
||||||
return;
|
!unlockedVm.HasUnsavedChanges)
|
||||||
|
|| checkVm.CurrentPage is LockedRepositoryViewModel)
|
||||||
|
{
|
||||||
|
allowClose = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user