implement pull up on mark as read and improve mark as read on scroll

This commit is contained in:
everhardt
2021-11-24 23:24:19 +01:00
parent f10fe6c9b5
commit 5bd8292b18
5 changed files with 43 additions and 57 deletions

View File

@@ -128,7 +128,7 @@ class PullUpToMarkAsReadTableViewController: UITableViewController {
}
}
markAsRead()
pulledUpToMarkAsRead()
}
func stopMarkingAsRead() {
@@ -139,8 +139,8 @@ class PullUpToMarkAsReadTableViewController: UITableViewController {
self.tableView.contentInset = UIEdgeInsets.zero
}
func markAsRead() {
// to override by implementation, which should also call stopMarkingAsRead when done
func pulledUpToMarkAsRead() {
// to override by implementation, which should also call stopMarkingAsRead when done or call this
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
self.stopMarkingAsRead()