mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 08:00:16 -04:00
Removed database status in favor of much cleaner code
Implemented (but deactivated) anti corruption mechanism WIP detect changes and save them if opening another database
This commit is contained in:
@@ -8,7 +8,7 @@ namespace ModernKeePass.ViewModels
|
||||
{
|
||||
public class OpenVm: NotifyPropertyChangedBase
|
||||
{
|
||||
public bool ShowPasswordBox => _database?.Status == (int) DatabaseService.DatabaseStatus.Opening;
|
||||
public bool ShowPasswordBox => _database.IsFileOpen;
|
||||
|
||||
public string Name => _database?.Name;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace ModernKeePass.ViewModels
|
||||
public OpenVm(IDatabase database)
|
||||
{
|
||||
_database = database;
|
||||
if (database == null || database.Status != (int) DatabaseService.DatabaseStatus.Opening) return;
|
||||
if (database == null || !database.IsFileOpen) return;
|
||||
OpenFile(database.DatabaseFile);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user