Fixes bug with undo toast.

After adding EventBus whenever you move an episode or attempt to swip to remove
(but don't actually remove) the undo toast for removing an episode would be
displayed.  This is now resolved.
This commit is contained in:
Tom Hennen 2015-04-26 16:57:19 -04:00
parent b253289b1f
commit f35ac3e9e3
2 changed files with 2 additions and 3 deletions

View File

@ -8,7 +8,7 @@ import java.util.List;
public class QueueEvent {
public enum Action {
ADDED, ADDED_ITEMS, REMOVED, CLEARED, DELETED_MEDIA, SORTED
ADDED, ADDED_ITEMS, REMOVED, CLEARED, DELETED_MEDIA, SORTED, MOVED
}
public final Action action;

View File

@ -608,8 +608,7 @@ public class DBWriter {
adapter.setQueue(queue);
if (broadcastUpdate) {
EventBus.getDefault().post(new QueueEvent(QueueEvent.Action.REMOVED, item));
EventBus.getDefault().post(new QueueEvent(QueueEvent.Action.ADDED, item, to));
EventBus.getDefault().post(new QueueEvent(QueueEvent.Action.MOVED, item, to));
}
}