diff options
Diffstat (limited to 'event/src')
-rw-r--r-- | event/src/main/java/de/danoeh/antennapod/event/EpisodeDownloadEvent.java | 18 | ||||
-rw-r--r-- | event/src/main/java/de/danoeh/antennapod/event/MessageEvent.java | 14 |
2 files changed, 28 insertions, 4 deletions
diff --git a/event/src/main/java/de/danoeh/antennapod/event/EpisodeDownloadEvent.java b/event/src/main/java/de/danoeh/antennapod/event/EpisodeDownloadEvent.java new file mode 100644 index 000000000..c9790d18a --- /dev/null +++ b/event/src/main/java/de/danoeh/antennapod/event/EpisodeDownloadEvent.java @@ -0,0 +1,18 @@ +package de.danoeh.antennapod.event; + +import de.danoeh.antennapod.model.download.DownloadStatus; + +import java.util.Map; +import java.util.Set; + +public class EpisodeDownloadEvent { + private final Map<String, DownloadStatus> map; + + public EpisodeDownloadEvent(Map<String, DownloadStatus> map) { + this.map = map; + } + + public Set<String> getUrls() { + return map.keySet(); + } +} diff --git a/event/src/main/java/de/danoeh/antennapod/event/MessageEvent.java b/event/src/main/java/de/danoeh/antennapod/event/MessageEvent.java index 3f6b2db32..7f1cb20e2 100644 --- a/event/src/main/java/de/danoeh/antennapod/event/MessageEvent.java +++ b/event/src/main/java/de/danoeh/antennapod/event/MessageEvent.java @@ -1,21 +1,27 @@ package de.danoeh.antennapod.event; +import android.content.Context; import androidx.annotation.Nullable; +import androidx.core.util.Consumer; + public class MessageEvent { public final String message; @Nullable - public final Runnable action; + public final Consumer<Context> action; + + @Nullable + public final String actionText; public MessageEvent(String message) { - this(message, null); + this(message, null, null); } - public MessageEvent(String message, Runnable action) { + public MessageEvent(String message, Consumer<Context> action, String actionText) { this.message = message; this.action = action; + this.actionText = actionText; } - } |