Ignore 'show in main list' for subscriptions screen (#8001)

This no longer makes sense with tags always at the top,
users can always create their own main list.

After we remove the side navigation, we can remove the tag setting.
This commit is contained in:
Hans-Peter Lehmann 2025-09-21 15:41:33 +02:00 committed by GitHub
parent cfe5075079
commit 07e72f8b9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import de.danoeh.antennapod.model.feed.FeedItem;
import de.danoeh.antennapod.model.feed.FeedItemFilter; import de.danoeh.antennapod.model.feed.FeedItemFilter;
import de.danoeh.antennapod.model.feed.FeedMedia; import de.danoeh.antennapod.model.feed.FeedMedia;
import de.danoeh.antennapod.model.feed.FeedOrder; import de.danoeh.antennapod.model.feed.FeedOrder;
import de.danoeh.antennapod.model.feed.FeedPreferences;
import de.danoeh.antennapod.model.feed.SortOrder; import de.danoeh.antennapod.model.feed.SortOrder;
import de.danoeh.antennapod.model.feed.SubscriptionsFilter; import de.danoeh.antennapod.model.feed.SubscriptionsFilter;
import de.danoeh.antennapod.model.download.DownloadResult; import de.danoeh.antennapod.model.download.DownloadResult;
@ -760,6 +761,9 @@ public final class DBReader {
List<Feed> feeds = getFeedList(); List<Feed> feeds = getFeedList();
for (Feed feed : feeds) { for (Feed feed : feeds) {
for (String tag : feed.getPreferences().getTags()) { for (String tag : feed.getPreferences().getTags()) {
if (FeedPreferences.TAG_ROOT.equals(tag)) {
continue;
}
if (!tags.containsKey(tag)) { if (!tags.containsKey(tag)) {
tags.put(tag, new NavDrawerData.TagItem(tag)); tags.put(tag, new NavDrawerData.TagItem(tag));
} }
@ -768,6 +772,12 @@ public final class DBReader {
} }
List<NavDrawerData.TagItem> tagsSorted = new ArrayList<>(tags.values()); List<NavDrawerData.TagItem> tagsSorted = new ArrayList<>(tags.values());
Collections.sort(tagsSorted, (o1, o2) -> o1.getTitle().compareToIgnoreCase(o2.getTitle())); Collections.sort(tagsSorted, (o1, o2) -> o1.getTitle().compareToIgnoreCase(o2.getTitle()));
// Root tag here means "all feeds", this is different from the nav drawer.
NavDrawerData.TagItem rootTag = new NavDrawerData.TagItem(FeedPreferences.TAG_ROOT);
for (Feed feed : feeds) {
rootTag.addFeed(feed, 0);
}
tagsSorted.add(0, rootTag);
return tagsSorted; return tagsSorted;
} }

View File

@ -755,7 +755,7 @@
<string name="authentication_descr">Change your username and password for this podcast and its episodes</string> <string name="authentication_descr">Change your username and password for this podcast and its episodes</string>
<string name="feed_tags_label">Tags</string> <string name="feed_tags_label">Tags</string>
<string name="feed_tags_summary">Change the tags of this podcast to help organize your subscriptions</string> <string name="feed_tags_summary">Change the tags of this podcast to help organize your subscriptions</string>
<string name="feed_folders_include_root">Show this podcast in \"all\" tag</string> <string name="feed_folders_include_root">Show above tags (side navigation only)</string>
<string name="tag_all">All</string> <string name="tag_all">All</string>
<string name="multi_feed_common_tags_info">Only common tags from all selected subscriptions are shown. Other tags stay unaffected.</string> <string name="multi_feed_common_tags_info">Only common tags from all selected subscriptions are shown. Other tags stay unaffected.</string>
<string name="auto_download_inbox_category">Automatically download episodes from the inbox</string> <string name="auto_download_inbox_category">Automatically download episodes from the inbox</string>