Better delete implementation

This commit is contained in:
J-Jamet
2019-09-25 15:45:12 +02:00
parent 4c587eeb03
commit 1cc5a08236
2 changed files with 4 additions and 0 deletions

View File

@@ -74,6 +74,8 @@ class DeleteEntryRunnable constructor(
result.data = Bundle().apply {
putInt(NODE_POSITION_FOR_ACTION_NATURAL_ORDER_KEY, position )
}
} ?: run {
result.data?.remove(NODE_POSITION_FOR_ACTION_NATURAL_ORDER_KEY)
}
// Return a copy of unchanged entry as old param

View File

@@ -73,6 +73,8 @@ class DeleteGroupRunnable(context: FragmentActivity,
result.data = Bundle().apply {
putInt(NODE_POSITION_FOR_ACTION_NATURAL_ORDER_KEY, position )
}
} ?: run {
result.data?.remove(NODE_POSITION_FOR_ACTION_NATURAL_ORDER_KEY)
}
// Return a copy of unchanged group as old param