1
0
mirror of https://github.com/metabolist/metatext synced 2024-12-26 09:42:48 +01:00

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

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) }