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

Release/7.1.6 #413

Merged
merged 7 commits into from
Mar 15, 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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# CHANGELOG

The changelog for [Kommunicate-iOS-SDK](https://github.com/Kommunicate-io/Kommunicate-iOS-SDK). Also see the [releases](https://github.com/Kommunicate-io/Kommunicate-iOS-SDK/releases) on Github.
## [7.1.6] 2024-03-15
- Fixed name getting cut issue in Navigation Bar.
- Improved the Flow of Showing Rating Bar.
- Improved read receipt label for messages.

## [7.1.5] 2024-03-11
- Added Dynamic online/offline status Feature
- Added the last Message icon in Conversation List Screen.
Expand Down
16 changes: 8 additions & 8 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ PODS:
- iOSSnapshotTestCase/SwiftSupport (8.0.0):
- iOSSnapshotTestCase/Core
- Kingfisher (7.6.2)
- Kommunicate (7.1.5):
- KommunicateChatUI-iOS-SDK (~> 1.2.9)
- KommunicateChatUI-iOS-SDK (1.2.9):
- KommunicateChatUI-iOS-SDK/Complete (= 1.2.9)
- KommunicateChatUI-iOS-SDK/Complete (1.2.9):
- Kommunicate (7.1.6):
- KommunicateChatUI-iOS-SDK (~> 1.3.0)
- KommunicateChatUI-iOS-SDK (1.3.0):
- KommunicateChatUI-iOS-SDK/Complete (= 1.3.0)
- KommunicateChatUI-iOS-SDK/Complete (1.3.0):
- iOSDropDown
- Kingfisher (~> 7.6.2)
- KommunicateChatUI-iOS-SDK/RichMessageKit
- KommunicateCore-iOS-SDK (~> 1.1.8)
- SwipeCellKit (~> 2.7.1)
- ZendeskChatProvidersSDK (~> 3.0.0)
- KommunicateChatUI-iOS-SDK/RichMessageKit (1.2.9)
- KommunicateChatUI-iOS-SDK/RichMessageKit (1.3.0)
- KommunicateCore-iOS-SDK (1.1.8)
- Nimble (13.1.2):
- CwlPreconditionTesting (~> 2.1.0)
Expand Down Expand Up @@ -77,8 +77,8 @@ SPEC CHECKSUMS:
iOSDropDown: ce9daa584eaa5567cafc1b633e3cc7eb6d9cea42
iOSSnapshotTestCase: a670511f9ee3829c2b9c23e6e68f315fd7b6790f
Kingfisher: 6c5449c6450c5239166510ba04afe374a98afc4f
Kommunicate: 8e07176722c8fb6d8bfeec52e4c6aa0c4d3700d0
KommunicateChatUI-iOS-SDK: c136dcb1e2bea0a00e9d53855fdafdfce826e28a
Kommunicate: 4f976cfb250c7bb80d44067307cf6741d68253ed
KommunicateChatUI-iOS-SDK: 6eb714cb6975ab2ff39bf04f11b310e1b6da24d2
KommunicateCore-iOS-SDK: 87c6e7c9f0e1e32d258c36b70ba20ffbd4428c90
Nimble: d733c860d832b324e9779034f12398993c536e7b
Nimble-Snapshots: 7f2710c507469eb0fc4912f45d0f280e15f91966
Expand Down
4 changes: 2 additions & 2 deletions Kommunicate.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Kommunicate'
s.version = '7.1.5'
s.version = '7.1.6'
s.summary = 'Kommunicate iOS SDK for customer support.'
s.homepage = 'https://github.com/Kommunicate-io/Kommunicate-iOS-SDK'
s.license = { :type => 'BSD-3-Clause', :file => 'LICENSE' }
Expand All @@ -10,5 +10,5 @@ Pod::Spec.new do |s|
s.swift_version = '5.0'
s.source_files = 'Sources/Kommunicate/Classes/**/*.{swift}'
s.resources = 'Sources/Resources/**/*{lproj,storyboard,xib,xcassets,json,strings}'
s.dependency 'KommunicateChatUI-iOS-SDK' , '~> 1.2.9'
s.dependency 'KommunicateChatUI-iOS-SDK' , '~> 1.3.0'
end
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"repositoryURL": "https://github.com/Kommunicate-io/KommunicateChatUI-iOS-SDK.git",
"state": {
"branch": null,
"revision": "fe18ada37346cd8994d1c8bd8dbb81c5af4819d1",
"version": "1.2.9"
"revision": "a83cda5f85247952bea5dc289399a3f5a3322959",
"version": "1.3.0"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let package = Package(
),
],
dependencies: [
.package(name: "KommunicateChatUI-iOS-SDK", url: "https://github.com/Kommunicate-io/KommunicateChatUI-iOS-SDK.git", from: "1.2.9"),
.package(name: "KommunicateChatUI-iOS-SDK", url: "https://github.com/Kommunicate-io/KommunicateChatUI-iOS-SDK.git", from: "1.3.0"),
],
targets: [
.target(
Expand Down
18 changes: 11 additions & 7 deletions Sources/Kommunicate/Classes/ConversationVCNavBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ class ConversationVCNavBar: UIView, Localizable {
let stackView = UIStackView(arrangedSubviews: [self.profileName])
stackView.alignment = .fill
stackView.axis = .vertical
stackView.distribution = .fillEqually
stackView.spacing = 2
stackView.distribution = .fill
stackView.spacing = 0.5
return stackView
}()

Expand Down Expand Up @@ -172,24 +172,28 @@ class ConversationVCNavBar: UIView, Localizable {
}
var subtitleText: String = ""
var showCustomSubtitle: Bool = false
if let toolbarSubtitle = configuration.toolbarSubtitleText as? String, !toolbarSubtitle.isEmpty {

if !configuration.toolbarSubtitleText.isEmpty {
customSubtitleView.addArrangedSubview(customSubtitleText)
subtitleText = toolbarSubtitle
subtitleText = configuration.toolbarSubtitleText
showCustomSubtitle = true
}
if let toolbarRating = configuration.toolbarSubtitleRating as? Float, !toolbarRating.isEqual(to: -1.0) {

if !configuration.toolbarSubtitleRating.isEqual(to: -1.0) {
subtitleText.append(subtitleText.isEmpty ? "" : " | ")
customSubtitleView.addArrangedSubview(ratingIcon)
customSubtitleView.addArrangedSubview(customRating)
customRating.text = toolbarRating.description
customRating.text = configuration.toolbarSubtitleRating.description
showCustomSubtitle = true
}

if(showCustomSubtitle) {
customSubtitleText.text = subtitleText
profileView.addArrangedSubview(self.customSubtitleView)
} else {
profileView.addArrangedSubview(self.onlineStatusText)
}

statusIconBackgroundColor.backgroundColor = navigationBarProxy.barTintColor
}

Expand All @@ -206,7 +210,7 @@ class ConversationVCNavBar: UIView, Localizable {
profileImage.topAnchor.constraint(equalTo: topAnchor, constant: 5).isActive = true
profileImage.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -5).isActive = true
profileImage.widthAnchor.constraint(equalToConstant: 37).isActive = true
profileName.heightAnchor.constraint(equalToConstant: 37).isActive = true
profileImage.heightAnchor.constraint(equalToConstant: 37).isActive = true

statusIconBackgroundColor.bottomAnchor.constraint(equalTo: profileImage.bottomAnchor, constant: 0).isActive = true
statusIconBackgroundColor.leadingAnchor.constraint(equalTo: profileImage.trailingAnchor, constant: -10).isActive = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,16 @@ extension UIViewController {
}

class func topViewController() -> UIViewController? {
guard let application = UIApplication.sharedUIApplication() , let keyWindow = application.keyWindow else { return nil }
return topViewControllerWithRootViewController(rootViewController: keyWindow.rootViewController)
var topController: UIViewController? = UIApplication.shared.windows.first?.rootViewController
while let presentedViewController = topController?.presentedViewController {
topController = presentedViewController
}
if let navigationController = topController as? UINavigationController {
return navigationController.topViewController
} else if let tabBarController = topController as? UITabBarController {
return tabBarController.selectedViewController
}
return topController
}

class func topViewControllerWithRootViewController(rootViewController: UIViewController?) -> UIViewController? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public struct KMConversationViewConfiguration {
public var startNewButtonIcon: UIImage? = UIImage(named: "icon_new_chat_red", in: Bundle.kommunicate, compatibleWith: nil)
/// If enabled, the user can't send a message when a conversation is assigned to a bot.
public var restrictMessageTypingWithBots = false
public var toolbarSubtitleText = ""
public var toolbarSubtitleText: String = ""
public var toolbarSubtitleRating: Float = -1.0
/// Customize Text color of FAQ button on conversation, conversation list screen
public var faqTextColor : UIColor = UIColor.white
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,8 @@ extension KMConversationViewController {
}

private func showRatingView() {
guard self.ratingVC == nil else { return }
guard let currentViewController = UIViewController.topViewController(), currentViewController is KMConversationViewController, self.ratingVC == nil else { return }

let ratingVC = RatingViewController()
ratingVC.closeButtontapped = { [weak self] in
self?.hideRatingView()
Expand Down
Loading