Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 11 additions & 1 deletion Sources/Kommunicate/Classes/FaqViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,18 @@ public class FaqViewController: UIViewController, Localizable {

override public func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationItem.leftBarButtonItem = getBackArrowButton(target: self, action: #selector(backTapped))
var backButton = getBackArrowButton(target: self, action: #selector(backTapped))
navigationItem.title = localizedString(forKey: "FaqTitle", fileName: configuration.localizedStringFileName)
backButton.tintColor = configuration.bottomSheetNavIconColor
navigationItem.leftBarButtonItem = backButton
if #available(iOS 26.0, *) {
navigationItem.rightBarButtonItems?.forEach {
$0.hidesSharedBackground = true
}
navigationItem.leftBarButtonItems?.forEach {
$0.hidesSharedBackground = true
}
}
}

@objc func backTapped() {
Expand Down
35 changes: 32 additions & 3 deletions Sources/Kommunicate/Classes/KMConversationListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public class KMConversationListViewController: KMChatBaseViewController, Localiz
target: self, action: #selector(compose)
)
barButton.accessibilityIdentifier = "startNewIcon"
barButton.tintColor = configuration.navCreateConversationIconColor
return barButton
}()

Expand Down Expand Up @@ -384,9 +385,21 @@ public class KMConversationListViewController: KMChatBaseViewController, Localiz
guard !configuration.hideBackButtonInConversationList else { return }

if configuration.enableBackArrowOnConversationListScreen {
navigationItem.leftBarButtonItem = getBackArrowButton(target: self, action: #selector(customBackAction))
let backArrowButton = getBackArrowButton(target: self, action: #selector(customBackAction))
backArrowButton.tintColor = configuration.conversationListScreenBackButtonColor
navigationItem.leftBarButtonItem = backArrowButton
} else {
navigationItem.leftBarButtonItem = getBackTextButton(title: LocalizedText.leftBarBackButtonText, target: self, action: #selector(customBackAction))
let backTextButton = getBackTextButton(title: LocalizedText.leftBarBackButtonText, target: self, action: #selector(customBackAction))
backTextButton.tintColor = configuration.conversationListScreenBackButtonColor
navigationItem.leftBarButtonItem = backTextButton
}
if #available(iOS 26.0, *) {
navigationItem.rightBarButtonItems?.forEach {
$0.hidesSharedBackground = true
}
navigationItem.leftBarButtonItems?.forEach {
$0.hidesSharedBackground = true
}
}
}

Expand Down Expand Up @@ -418,6 +431,14 @@ public class KMConversationListViewController: KMChatBaseViewController, Localiz
let rightButtons = rightBarButtonItems.prefix(3)
navigationItem.rightBarButtonItems = Array(rightButtons)
}
if #available(iOS 26.0, *) {
navigationItem.rightBarButtonItems?.forEach {
$0.hidesSharedBackground = true
}
navigationItem.leftBarButtonItems?.forEach {
$0.hidesSharedBackground = true
}
}
}

func setupSearchController() {
Expand All @@ -431,7 +452,15 @@ public class KMConversationListViewController: KMChatBaseViewController, Localiz
navigationItem.rightBarButtonItems = nil
navigationItem.leftBarButtonItems = nil
navigationItem.titleView = searchBar


if #available(iOS 26.0, *) {
navigationItem.rightBarButtonItems?.forEach {
$0.hidesSharedBackground = true
}
navigationItem.leftBarButtonItems?.forEach {
$0.hidesSharedBackground = true
}
}
UIView.animate(
withDuration: 0.5,
animations: { self.searchBar.show(true) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,14 @@ open class KMConversationViewController: KMChatConversationViewController, KMUpd
// Remove current title from center of navigation bar
navigationItem.titleView = UIView()
navigationItem.leftBarButtonItems = nil
if #available(iOS 26.0, *) {
navigationItem.rightBarButtonItems?.forEach {
$0.hidesSharedBackground = true
}
navigationItem.leftBarButtonItems?.forEach {
$0.hidesSharedBackground = true
}
}
// Create custom navigation view.
let (contact, channel) = conversationDetail.conversationAssignee(groupId: viewModel.channelKey, userId: viewModel.contactId)
if let alChannel = channel {
Expand Down
Loading