Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for displaying context chats #1918

Merged
merged 5 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading