Skip to content

Commit

Permalink
swift
Browse files Browse the repository at this point in the history
  • Loading branch information
link2xt committed Apr 4, 2024
1 parent 5a99387 commit acac41d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions deltachat-ios/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ class ChatViewController: UITableViewController, UITableViewDropDelegate {
if wasLastSectionScrolledToBottom {
self.scrollToBottom(animated: true)
}
updateScrollDownButtonVisibility()
markSeenMessagesInVisibleArea()
self.updateScrollDownButtonVisibility()
self.markSeenMessagesInVisibleArea()
}
}
}
Expand Down Expand Up @@ -1993,17 +1993,17 @@ extension ChatViewController {

let messageId = self.messageIds[indexPath.row]
if sentThisReaction {
dcContext.sendReaction(messageId: messageId, reaction: nil)
self.dcContext.sendReaction(messageId: messageId, reaction: nil)
} else {
dcContext.sendReaction(messageId: messageId, reaction: reaction.emoji)
self.dcContext.sendReaction(messageId: messageId, reaction: reaction.emoji)
}
}
}

reactionsMenuItems.append(
UIAction(title: "•••") { [weak self] _ in
guard let self else { return }
reactionMessageId = self.messageIds[indexPath.row]
self.reactionMessageId = self.messageIds[indexPath.row]

let pickerViewController = MCEmojiPickerViewController()
pickerViewController.navigationItem.title = String.localized("react")
Expand All @@ -2016,7 +2016,7 @@ extension ChatViewController {
sheet.preferredCornerRadius = 20
}
}
present(navigationController, animated: true)
self.present(navigationController, animated: true)
}
)

Expand All @@ -2042,21 +2042,21 @@ extension ChatViewController {
actionProvider: { [weak self] _ in
guard let self else { return nil }

let message = dcContext.getMessage(id: messageId)
let message = self.dcContext.getMessage(id: messageId)

var children: [UIMenuElement] = []

let showReaction = message.isInfo == false && message.isSetupMessage == false && message.type != DC_MSG_VIDEOCHAT_INVITATION && dcChat.canSend
let showReaction = message.isInfo == false && message.isSetupMessage == false && message.type != DC_MSG_VIDEOCHAT_INVITATION && self.dcChat.canSend
if showReaction {
children.append(reactionsMenu(indexPath: indexPath))
children.append(self.reactionsMenu(indexPath: indexPath))
}

let replyMenuChildren: [UIMenuElement]
let messageIsFromMe = message.isFromCurrentSender

if message.isInfo {
replyMenuChildren = []
} else if dcChat.canSend && self.isGroupChat && messageIsFromMe == false {
} else if self.dcChat.canSend && self.isGroupChat && messageIsFromMe == false {
replyMenuChildren = [
UIAction.menuAction(localizationKey: "notify_reply_button", systemImageName: "arrowshape.turn.up.left.fill", indexPath: indexPath, action: { self.reply(at: $0 ) }),
UIAction.menuAction(localizationKey: "reply_privately", systemImageName: "arrowshape.turn.up.left", indexPath: indexPath, action: { self.replyPrivatelyToMessage(at: $0 ) }),
Expand Down

0 comments on commit acac41d

Please sign in to comment.