Fix no tag selected when tag no longer exists (#8041)

This commit is contained in:
Hans-Peter Lehmann 2025-10-13 21:41:47 +02:00 committed by GitHub
parent 46beb72755
commit 5d1769fe8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -367,12 +367,18 @@ public class SubscriptionFragment extends Fragment
if (FeedPreferences.TAG_ROOT.equals(tagAdapter.getSelectedTag())) {
openedFolderFeeds = result.first.feeds;
} else {
boolean tagExists = false;
for (NavDrawerData.TagItem tag : result.first.tags) { // Filtered list
if (tag.getTitle().equals(tagAdapter.getSelectedTag())) {
openedFolderFeeds = tag.getFeeds();
tagExists = true;
break;
}
}
if (!tagExists) {
tagAdapter.setSelectedTag(FeedPreferences.TAG_ROOT);
openedFolderFeeds = result.first.feeds;
}
}
final boolean firstLoaded = feeds == null || feeds.isEmpty();