diff options
author | Tom Hennen <tom.hennen@gmail.com> | 2015-04-26 16:57:19 -0400 |
---|---|---|
committer | Tom Hennen <tom.hennen@gmail.com> | 2015-04-26 16:57:19 -0400 |
commit | f35ac3e9e3ecb256dc8d0fa2e9e4462dd587f5a0 (patch) | |
tree | a88628b4fccff2846caedc112566e9092aa866b3 /core | |
parent | b253289b1f90783db536a490b63530b72df2ea8b (diff) | |
download | AntennaPod-f35ac3e9e3ecb256dc8d0fa2e9e4462dd587f5a0.zip |
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.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/feed/QueueEvent.java | 2 | ||||
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/QueueEvent.java b/core/src/main/java/de/danoeh/antennapod/core/feed/QueueEvent.java index 9f1eec754..c8497f509 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/QueueEvent.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/QueueEvent.java @@ -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; diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java index bd0cfee5b..8a5becac6 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBWriter.java @@ -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)); } } |