Remove useless dirty, solve trash bug

This commit is contained in:
J-Jamet committed 2018-02-16 15:14:24 +01:00
1 parent bb353bc9d6
commit 79750c5320
9 files changed
+142 -162

No files matched your search

@@ -24,7 +24,6 @@ import android.content.Context;
import com.keepassdroid.database.Database;
import com.keepassdroid.database.PwDatabase;
import com.keepassdroid.database.PwEntry;
import com.keepassdroid.database.PwGroup;
public class AddEntry extends RunnableOnFinish {
protected Database mDb;
@@ -59,20 +58,11 @@ public class AddEntry extends RunnableOnFinish {
@Override
public void run() {
PwDatabase pm = mDb.pm;
if ( mSuccess ) {
PwGroup parent = mEntry.getParent();
// Mark parent tree dirty
mDb.dirty.add(parent);
} else {
if ( !mSuccess ) {
pm.removeEntryFrom(mEntry, mEntry.getParent());
}
// TODO if add entry callback
super.run();
}
}
}