add option to sync database after quick-unlocking the database. closes https://github.com/PhilippC/keepass2android/issues/188
This commit is contained in:
@@ -119,7 +119,7 @@ namespace keepass2android
|
||||
/// </summary>
|
||||
IFileStorage GetFileStorage(IOConnectionInfo iocInfo, bool allowCache);
|
||||
|
||||
void TriggerReload(Context context);
|
||||
void TriggerReload(Context context, Action<bool> actionOnResult /*if not null, called when the user selected yes (true) or no (false)*/);
|
||||
|
||||
|
||||
bool CheckForDuplicateUuids { get; }
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace keepass2android
|
||||
|
||||
if (!MemUtil.ArraysEqual(_app.CurrentDb.KpDatabase.HashOfFileOnDisk, hashingRemoteStream.Hash))
|
||||
{
|
||||
_app.TriggerReload(_context);
|
||||
_app.TriggerReload(_context, null);
|
||||
Finish(true);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -85,8 +85,7 @@ namespace keepass2android
|
||||
{
|
||||
//only the remote file was modified -> reload database.
|
||||
//note: it's best to lock the database and do a complete reload here (also better for UI consistency in case something goes wrong etc.)
|
||||
_app.TriggerReload(_context);
|
||||
Finish(true);
|
||||
_app.TriggerReload(_context, (bool result) => Finish(result));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user