From 69b24699a36bc9c4ffc6200fbcf8069f7a94c1ab Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Mon, 25 Mar 2024 21:45:43 +0100 Subject: Move DBReader to :storage:database (#7027) --- .../de/danoeh/antennapod/model/feed/FeedOrder.java | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 model/src/main/java/de/danoeh/antennapod/model/feed/FeedOrder.java (limited to 'model/src') 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; + } +} -- cgit v1.2.3