mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-07 09:38:52 -06:00
Fix animation when card moves and updates simultaneously
This commit is contained in:
@@ -388,10 +388,17 @@ public class HabitCardListCache implements CommandRunner.Listener
|
|||||||
|
|
||||||
int prevPosition = data.habits.indexOf(habit);
|
int prevPosition = data.habits.indexOf(habit);
|
||||||
|
|
||||||
if (prevPosition < 0) performInsert(habit, currentPosition);
|
if (prevPosition < 0)
|
||||||
else if (prevPosition == currentPosition)
|
{
|
||||||
|
performInsert(habit, currentPosition);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (prevPosition != currentPosition)
|
||||||
|
performMove(habit, prevPosition, currentPosition);
|
||||||
|
|
||||||
performUpdate(id, currentPosition);
|
performUpdate(id, currentPosition);
|
||||||
else performMove(habit, prevPosition, currentPosition);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void processRemovedHabits()
|
private void processRemovedHabits()
|
||||||
|
|||||||
Reference in New Issue
Block a user