mirror of
https://github.com/KeyKeeperApp/KeyKeeper.git
synced 2026-05-03 21:36:31 +03:00
merge fix from 'feature/confirmation-at-closing'
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