diff --git a/Rocket.Chat.ShareExtension/Info.plist b/Rocket.Chat.ShareExtension/Info.plist index 705d8c380a..b9973dcaca 100644 --- a/Rocket.Chat.ShareExtension/Info.plist +++ b/Rocket.Chat.ShareExtension/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 3.0.0 + 3.0.1 CFBundleVersion - 191 + 199 ITSEncryptionExportComplianceCode NSExtension diff --git a/Rocket.Chat/Controllers/Auth/RegisterUsernameTableViewController.swift b/Rocket.Chat/Controllers/Auth/RegisterUsernameTableViewController.swift index f6b4f69554..cb08949c9f 100644 --- a/Rocket.Chat/Controllers/Auth/RegisterUsernameTableViewController.swift +++ b/Rocket.Chat/Controllers/Auth/RegisterUsernameTableViewController.swift @@ -44,17 +44,21 @@ final class RegisterUsernameTableViewController: BaseTableViewController { } func startLoading() { - textFieldUsername.alpha = 0.5 - requesting = true - view.layoutIfNeeded() - registerButton.startLoading() - textFieldUsername.resignFirstResponder() + DispatchQueue.main.async { + self.textFieldUsername.alpha = 0.5 + self.requesting = true + self.view.layoutIfNeeded() + self.registerButton.startLoading() + self.textFieldUsername.resignFirstResponder() + } } func stopLoading() { - textFieldUsername.alpha = 1 - requesting = false - registerButton.stopLoading() + DispatchQueue.main.async { + self.textFieldUsername.alpha = 1 + self.requesting = false + self.registerButton.stopLoading() + } } // MARK: Request username @@ -83,7 +87,9 @@ final class RegisterUsernameTableViewController: BaseTableViewController { self?.stopLoading() if !response.isError() { - self?.textFieldUsername.text = response.result["result"].stringValue + DispatchQueue.main.async { + self?.textFieldUsername.text = response.result["result"].stringValue + } } } } diff --git a/Rocket.Chat/Controllers/Chat/ChannelActionsViewController.swift b/Rocket.Chat/Controllers/Chat/ChannelActionsViewController.swift index e59fbd0f1f..aa255cf8f4 100644 --- a/Rocket.Chat/Controllers/Chat/ChannelActionsViewController.swift +++ b/Rocket.Chat/Controllers/Chat/ChannelActionsViewController.swift @@ -144,11 +144,11 @@ extension ChannelActionsViewController { guard let subscription = self.subscription else { return } SubscriptionManager.toggleFavorite(subscription) { [unowned self] (response) in - if response.isError() { - subscription.updateFavorite(!subscription.favorite) - } - DispatchQueue.main.async { + if response.isError() { + subscription.updateFavorite(!subscription.favorite) + } + self.updateButtonFavoriteImage() } } diff --git a/Rocket.Chat/Controllers/Chat/ChatViewController.swift b/Rocket.Chat/Controllers/Chat/ChatViewController.swift index 85897911e7..75eaeefb19 100644 --- a/Rocket.Chat/Controllers/Chat/ChatViewController.swift +++ b/Rocket.Chat/Controllers/Chat/ChatViewController.swift @@ -567,7 +567,9 @@ final class ChatViewController: SLKTextViewController { internal func subscribe(for subscription: Subscription) { MessageManager.changes(subscription) MessageManager.subscribeDeleteMessage(subscription) { [weak self] msgId in - self?.deleteMessage(msgId: msgId) + DispatchQueue.main.async { + self?.deleteMessage(msgId: msgId) + } } registerTypingEvent(subscription) } diff --git a/Rocket.Chat/Info.plist b/Rocket.Chat/Info.plist index 7cdb9cc477..2b5ca5c061 100644 --- a/Rocket.Chat/Info.plist +++ b/Rocket.Chat/Info.plist @@ -206,7 +206,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 3.0.0 + 3.0.1 CFBundleSignature ???? CFBundleURLTypes @@ -222,7 +222,7 @@ CFBundleVersion - 191 + 199 Fabric APIKey @@ -264,17 +264,6 @@ - UIApplicationShortcutItems - - - UIApplicationShortcutItemIconType - UIApplicationShortcutIconTypeAdd - UIApplicationShortcutItemTitle - add-server-shortcut - UIApplicationShortcutItemType - addserver - - NSCameraUsageDescription NSCameraUsageDescription NSMicrophoneUsageDescription @@ -285,6 +274,17 @@ NSPhotoLibraryUsageDescription RC_MIN_SERVER_VERSION 0.54.0 + UIApplicationShortcutItems + + + UIApplicationShortcutItemIconType + UIApplicationShortcutIconTypeAdd + UIApplicationShortcutItemTitle + add-server-shortcut + UIApplicationShortcutItemType + addserver + + UIBackgroundModes fetch diff --git a/Rocket.Chat/Views/Chat/RCTextView.swift b/Rocket.Chat/Views/Chat/RCTextView.swift index 3809697ef5..d150da8189 100644 --- a/Rocket.Chat/Views/Chat/RCTextView.swift +++ b/Rocket.Chat/Views/Chat/RCTextView.swift @@ -150,7 +150,11 @@ class HighlightLayoutManager: NSLayoutManager { extension RCTextView: UITextViewDelegate { - func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange) -> Bool { + func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool { + if interaction != .invokeDefaultAction { + return false + } + if URL.scheme == "http" || URL.scheme == "https" { delegate?.openURL(url: URL) return false