Skip to content

Commit

Permalink
Merge pull request #1918 from nextcloud/follow-up-to-1916
Browse files Browse the repository at this point in the history
Fixes for displaying context chats
  • Loading branch information
Ivansss authored Dec 16, 2024
2 parents bbd8b50 + 71b4548 commit b5adb98
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
4 changes: 2 additions & 2 deletions NextcloudTalk/ContextChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import Foundation

@objcMembers public class ContextChatViewController: BaseChatViewController {

public override func viewDidLoad() {
super.viewDidLoad()
override func setTitleView() {
super.setTitleView()

self.titleView?.longPressGestureRecognizer.isEnabled = false
}
Expand Down
8 changes: 1 addition & 7 deletions NextcloudTalk/InputbarViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,8 @@ import UIKit
self.textView.layer.borderColor = UIColor.systemGray4.cgColor
self.textView.tintColor = UIColor(cgColor: UIColor.systemBlue.cgColor)
}
}

public override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)

coordinator.animate(alongsideTransition: nil) { _ in
self.setTitleView()
}
self.setTitleView()
}

// MARK: - Configuration
Expand Down
7 changes: 5 additions & 2 deletions NextcloudTalk/NCMediaViewerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import UIKit
private lazy var showMessageButton = {
let showMessageButton = UIBarButtonItem(title: nil, style: .plain, target: nil, action: nil)
showMessageButton.isEnabled = false
showMessageButton.primaryAction = UIAction(title: "", image: .init(systemName: "text.magnifyingglass"), handler: { [unowned self, unowned showMessageButton] _ in
showMessageButton.primaryAction = UIAction(title: "", image: .init(systemName: "text.magnifyingglass"), handler: { [unowned self] _ in
guard let mediaPageViewController = self.getCurrentPageViewController() else { return }

let message = mediaPageViewController.message
Expand All @@ -55,9 +55,12 @@ import UIKit

chatViewController.appendMessages(messages: messages)
chatViewController.reloadDataAndHighlightMessage(messageId: message.messageId)

}

chatViewController.navigationItem.rightBarButtonItem = UIBarButtonItem(title: NSLocalizedString("Close", comment: ""), primaryAction: UIAction { [weak chatViewController] _ in
chatViewController?.dismiss(animated: true)
})

let navController = NCNavigationController(rootViewController: chatViewController)
self.present(navController, animated: true)
}
Expand Down
2 changes: 1 addition & 1 deletion NextcloudTalk/RoomSharedItemsTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ import QuickLook

self.present(previewNavigationChatViewController, animated: false)

previewChatViewController.navigationItem.rightBarButtonItem = UIBarButtonItem(systemItem: .cancel, primaryAction: UIAction { [weak previewChatViewController] _ in
previewChatViewController.navigationItem.rightBarButtonItem = UIBarButtonItem(title: NSLocalizedString("Close", comment: ""), primaryAction: UIAction { [weak previewChatViewController] _ in
previewChatViewController?.dismiss(animated: true)
})
}
Expand Down

0 comments on commit b5adb98

Please sign in to comment.