mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-05 00:02:27 -08:00
Remove useless dirty, solve trash bug
This commit is contained in:
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user