diff --git a/Tusker/Screens/Main/NewMainTabBarViewController.swift b/Tusker/Screens/Main/NewMainTabBarViewController.swift index a0c99a97..44335353 100644 --- a/Tusker/Screens/Main/NewMainTabBarViewController.swift +++ b/Tusker/Screens/Main/NewMainTabBarViewController.swift @@ -285,7 +285,7 @@ final class NewMainTabBarViewController: BaseMainTabBarViewController { var tabs: [UITab] = [] let savedReq = SavedHashtag.fetchRequest(account: mastodonController.accountInfo!) let saved = (try? mastodonController.persistentContainer.viewContext.fetch(savedReq)) ?? [] - for hashtag in saved { + for hashtag in saved where !seenTags.contains(hashtag.name) { seenTags.insert(hashtag.name) tabs.append(HashtagTab(hashtagName: hashtag.name, viewControllerProvider: viewControllerProvider)) } @@ -293,6 +293,7 @@ final class NewMainTabBarViewController: BaseMainTabBarViewController { let followedReq = FollowedHashtag.fetchRequest() let followed = (try? mastodonController.persistentContainer.viewContext.fetch(followedReq)) ?? [] for hashtag in followed where !seenTags.contains(hashtag.name) { + seenTags.insert(hashtag.name) tabs.append(HashtagTab(hashtagName: hashtag.name, viewControllerProvider: viewControllerProvider)) }