Fix move action

This commit is contained in:
J-Jamet
2019-08-18 22:57:44 +02:00
parent 954d522341
commit c6f259d18f

View File

@@ -40,7 +40,10 @@ class MoveEntryRunnable constructor(
// Move entry in new parent
mEntryToMove?.let {
mOldParent = it.parent
database.moveEntryTo(it, mNewParent)
// Move only if the parent change
if (mOldParent != mNewParent) {
database.moveEntryTo(it, mNewParent)
}
it.touch(modified = true, touchParents = true)
} ?: Log.e(TAG, "Unable to create a copy of the entry")
}