Reload search-results when entering the screen (IOS-196)

This commit is contained in:
Nathan Mattes 2023-11-27 14:56:38 +01:00
parent 315d15b256
commit 7d8af4ef35
1 changed files with 5 additions and 0 deletions

View File

@ -48,6 +48,11 @@ extension SearchHistoryViewController {
searchHistorySectionHeaderCollectionReusableViewDelegate: self
)
}
override func viewWillAppear(_ animated: Bool) {
let userID = authContext.mastodonAuthenticationBox.userID
viewModel.items = (try? FileManager.default.searchItems(forUser: userID)) ?? []
}
}
// MARK: - UICollectionViewDelegate