diff options
Diffstat (limited to 'event/src/main/java')
-rw-r--r-- | event/src/main/java/de/danoeh/antennapod/event/FavoritesEvent.java | 21 | ||||
-rw-r--r-- | event/src/main/java/de/danoeh/antennapod/event/FeedItemEvent.java | 22 |
2 files changed, 4 insertions, 39 deletions
diff --git a/event/src/main/java/de/danoeh/antennapod/event/FavoritesEvent.java b/event/src/main/java/de/danoeh/antennapod/event/FavoritesEvent.java index 8b27f74ab..0a3c65adc 100644 --- a/event/src/main/java/de/danoeh/antennapod/event/FavoritesEvent.java +++ b/event/src/main/java/de/danoeh/antennapod/event/FavoritesEvent.java @@ -1,26 +1,7 @@ package de.danoeh.antennapod.event; -import de.danoeh.antennapod.model.feed.FeedItem; - public class FavoritesEvent { - public enum Action { - ADDED, REMOVED - } - - private final Action action; - private final FeedItem item; - - private FavoritesEvent(Action action, FeedItem item) { - this.action = action; - this.item = item; - } - - public static FavoritesEvent added(FeedItem item) { - return new FavoritesEvent(Action.ADDED, item); - } - - public static FavoritesEvent removed(FeedItem item) { - return new FavoritesEvent(Action.REMOVED, item); + public FavoritesEvent() { } } diff --git a/event/src/main/java/de/danoeh/antennapod/event/FeedItemEvent.java b/event/src/main/java/de/danoeh/antennapod/event/FeedItemEvent.java index 6c7adc2d7..125d113d6 100644 --- a/event/src/main/java/de/danoeh/antennapod/event/FeedItemEvent.java +++ b/event/src/main/java/de/danoeh/antennapod/event/FeedItemEvent.java @@ -9,33 +9,17 @@ import java.util.List; import de.danoeh.antennapod.model.feed.FeedItem; public class FeedItemEvent { - - public enum Action { - UPDATE, DELETE_MEDIA - } - - @NonNull - private final Action action; @NonNull public final List<FeedItem> items; - private FeedItemEvent(@NonNull Action action, @NonNull List<FeedItem> items) { - this.action = action; + public FeedItemEvent(@NonNull List<FeedItem> items) { this.items = items; } - public static FeedItemEvent deletedMedia(List<FeedItem> items) { - return new FeedItemEvent(Action.DELETE_MEDIA, items); - } - - public static FeedItemEvent deletedMedia(FeedItem... items) { - return deletedMedia(Arrays.asList(items)); - } - public static FeedItemEvent updated(List<FeedItem> items) { - return new FeedItemEvent(Action.UPDATE, items); + return new FeedItemEvent(items); } public static FeedItemEvent updated(FeedItem... items) { - return updated(Arrays.asList(items)); + return new FeedItemEvent(Arrays.asList(items)); } } |