fix potential crash when changing offline cache preference

This commit is contained in:
Philipp Crocoll
2019-03-22 04:59:44 +01:00
parent b2adfad2ee
commit e7e0b91703
2 changed files with 1 additions and 10 deletions

View File

@@ -449,12 +449,7 @@ namespace keepass2android
}
}
public void LockSingleDatabase(Database databaseToLock, bool allowQuickUnlock)
{
//TODO implement
throw new Exception("lock single is not implemented");
}
private void AskForReload(Activity activity)
{
AlertDialog.Builder builder = new AlertDialog.Builder(activity);

View File

@@ -592,10 +592,6 @@ namespace keepass2android
private void OnUseOfflineCacheChanged(object sender, Preference.PreferenceChangeEventArgs e)
{
//ensure the user gets a matching database
if (App.Kp2a.CurrentDb!= null && !App.Kp2a.CurrentDb.Ioc.IsLocalFile())
App.Kp2a.LockSingleDatabase(App.Kp2a.CurrentDb, false);
if (!(bool)e.NewValue)
{
AlertDialog.Builder builder = new AlertDialog.Builder(Activity);