SQLiteHabitList: fix corrupted order automatically

pull/171/head
Alinson S. Xavier 9 years ago
parent 461fe1f0b6
commit d3f7ebd60c

@ -133,7 +133,6 @@ public class SQLiteHabitList extends HabitList
return Collections.unmodifiableCollection(toList()).iterator();
}
@Deprecated
public void rebuildOrder()
{
List<Habit> habits = toList();
@ -176,7 +175,7 @@ public class SQLiteHabitList extends HabitList
}
@Override
public void reorder(Habit from, Habit to)
public synchronized void reorder(Habit from, Habit to)
{
if (from == to) return;
@ -213,6 +212,7 @@ public class SQLiteHabitList extends HabitList
fromRecord.save();
update(from);
rebuildOrder();
getObservable().notifyListeners();
}

Loading…
Cancel
Save