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:
BONNEVILLE Geoffroy
2018-01-08 18:52:03 +01:00
parent 4a3f36d38b
commit a19519fa73
17 changed files with 220 additions and 101 deletions

View File

@@ -1,4 +1,5 @@
using Windows.Storage;
using System.Threading.Tasks;
using Windows.Storage;
using Windows.UI.Xaml;
using ModernKeePass.Interfaces;
@@ -14,10 +15,11 @@ namespace ModernKeePass.ViewModels
_database = database;
}
public void Save(bool close = true)
public async Task Save(bool close = true)
{
_database.Save();
if (close) _database.Close();
if (close)
await _database.Close();
}
public void Save(StorageFile file)