Show alerts

This commit is contained in:
Justin Mazzocchi 2021-01-03 17:19:33 -08:00
parent f2c06e9b60
commit dc5f9bbbcd
No known key found for this signature in database
GPG Key ID: E223E6937AAFB01C
1 changed files with 5 additions and 0 deletions

View File

@ -258,6 +258,11 @@ private extension TableViewController {
}
.store(in: &cancellables)
viewModel.alertItems
.compactMap { $0 }
.sink { [weak self] in self?.present(alertItem: $0) }
.store(in: &cancellables)
tableView.publisher(for: \.contentOffset)
.compactMap { [weak self] _ in self?.tableView.indexPathsForVisibleRows?.first }
.sink { [weak self] in self?.viewModel.viewedAtTop(indexPath: $0) }