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
@@ -71,8 +71,6 @@ public class DeleteEntry extends RunnableOnFinish {
|
||||
// Commit database
|
||||
SaveDB save = new SaveDB(ctx, mDb, mFinish, mDontSave);
|
||||
save.run();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private class AfterDelete extends OnFinish {
|
||||
@@ -81,7 +79,7 @@ public class DeleteEntry extends RunnableOnFinish {
|
||||
private PwEntry mEntry;
|
||||
private boolean recycled;
|
||||
|
||||
public AfterDelete(OnFinish finish, PwGroup parent, PwEntry entry, boolean r) {
|
||||
AfterDelete(OnFinish finish, PwGroup parent, PwEntry entry, boolean r) {
|
||||
super(finish);
|
||||
|
||||
mParent = parent;
|
||||
@@ -92,18 +90,7 @@ public class DeleteEntry extends RunnableOnFinish {
|
||||
@Override
|
||||
public void run() {
|
||||
PwDatabase pm = mDb.pm;
|
||||
if ( mSuccess ) {
|
||||
// Mark parent dirty
|
||||
if ( mParent != null ) {
|
||||
mDb.dirty.add(mParent);
|
||||
}
|
||||
|
||||
if (recycled) {
|
||||
PwGroup recycleBin = pm.getRecycleBin();
|
||||
mDb.dirty.add(recycleBin);
|
||||
mDb.dirty.add(mDb.pm.rootGroup);
|
||||
}
|
||||
} else {
|
||||
if ( !mSuccess ) {
|
||||
if (recycled) {
|
||||
pm.undoRecycle(mEntry, mParent);
|
||||
}
|
||||
@@ -111,11 +98,9 @@ public class DeleteEntry extends RunnableOnFinish {
|
||||
pm.undoDeleteEntry(mEntry, mParent);
|
||||
}
|
||||
}
|
||||
// TODO Callback after delete entry
|
||||
|
||||
super.run();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user