Skip to content

Commit

Permalink
Cleanup (#2129)
Browse files Browse the repository at this point in the history
Visibility of Scroll-to-Bottom-button is already handled in `UIScrollView`-Delegate-stuff
  • Loading branch information
zeitschlag committed Jul 11, 2024
1 parent 4d4a741 commit 969c6c9
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions deltachat-ios/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,8 @@ class ChatViewController: UITableViewController, UITableViewDropDelegate {
// MARK: - Notifications

@objc private func handleMessageChanged(_ notification: Notification) {

// if not visible -> do nothing
guard let ui = notification.userInfo else { return }

let chatId = ui["chat_id"] as? Int ?? 0
if chatId == 0 || chatId == self.chatId {
let messageId = ui["message_id"] as? Int ?? 0
Expand All @@ -440,16 +439,14 @@ class ChatViewController: UITableViewController, UITableViewDropDelegate {

refreshMessages()
updateTitle()
DispatchQueue.main.async {
self.updateScrollDownButtonVisibility()
}
markSeenMessagesInVisibleArea()

}
}

@objc private func handleMsgReadDeliveredReactionFailed(_ notification: Notification) {
guard let ui = notification.userInfo else { return }
guard let ui = notification.userInfo else { return }

let chatId = ui["chat_id"] as? Int ?? 0
if chatId == 0 || chatId == self.chatId {
let messageId = ui["message_id"] as? Int ?? 0
Expand All @@ -464,9 +461,6 @@ class ChatViewController: UITableViewController, UITableViewDropDelegate {

refreshMessages()
updateTitle()
DispatchQueue.main.async {
self.updateScrollDownButtonVisibility()
}
markSeenMessagesInVisibleArea()
}
}
Expand Down

0 comments on commit 969c6c9

Please sign in to comment.