From b0a69526438bc2484054f9bd8d98f8fd5a4a62ef Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 1 Apr 2024 09:47:05 -0400 Subject: [PATCH] Fix trending hashtags screen not clearing selection --- Tusker/Screens/Explore/TrendingHashtagsViewController.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tusker/Screens/Explore/TrendingHashtagsViewController.swift b/Tusker/Screens/Explore/TrendingHashtagsViewController.swift index 6de05977..6e5f8c14 100644 --- a/Tusker/Screens/Explore/TrendingHashtagsViewController.swift +++ b/Tusker/Screens/Explore/TrendingHashtagsViewController.swift @@ -11,11 +11,11 @@ import Pachyderm import WebURLFoundationExtras import Combine -class TrendingHashtagsViewController: UIViewController { +class TrendingHashtagsViewController: UIViewController, CollectionViewController { private let mastodonController: MastodonController - private var collectionView: UICollectionView! + private(set) var collectionView: UICollectionView! private var dataSource: UICollectionViewDiffableDataSource! private var state = State.unloaded @@ -84,6 +84,8 @@ class TrendingHashtagsViewController: UIViewController { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) + clearSelectionOnAppear(animated: animated) + Task { await loadInitial() }