Refresh when resuming

This commit is contained in:
Justin Mazzocchi 2021-01-27 14:27:54 -08:00
parent 9df1750abc
commit db8be2f00b
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C

View file

@ -287,6 +287,10 @@ private extension TableViewController {
.compactMap { [weak self] _ in self?.tableView.indexPathsForVisibleRows?.first } .compactMap { [weak self] _ in self?.tableView.indexPathsForVisibleRows?.first }
.sink { [weak self] in self?.viewModel.viewedAtTop(indexPath: $0) } .sink { [weak self] in self?.viewModel.viewedAtTop(indexPath: $0) }
.store(in: &cancellables) .store(in: &cancellables)
NotificationCenter.default.publisher(for: UIScene.willEnterForegroundNotification)
.sink { [weak self] _ in self?.viewModel.request(maxId: nil, minId: nil, search: nil) }
.store(in: &cancellables)
} }
func update(_ update: CollectionUpdate) { func update(_ update: CollectionUpdate) {