diff options
Diffstat (limited to 'model/src')
-rw-r--r-- | model/src/main/java/de/danoeh/antennapod/model/feed/FeedOrder.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/model/src/main/java/de/danoeh/antennapod/model/feed/FeedOrder.java b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedOrder.java new file mode 100644 index 000000000..1ff4c9bf6 --- /dev/null +++ b/model/src/main/java/de/danoeh/antennapod/model/feed/FeedOrder.java @@ -0,0 +1,23 @@ +package de.danoeh.antennapod.model.feed; + +public enum FeedOrder { + COUNTER(0), + ALPHABETICAL(1), + MOST_PLAYED(3), + MOST_RECENT_EPISODE(2); + + public final int id; + + FeedOrder(int id) { + this.id = id; + } + + public static FeedOrder fromOrdinal(int id) { + for (FeedOrder counter : values()) { + if (counter.id == id) { + return counter; + } + } + return MOST_RECENT_EPISODE; + } +} |