Skip to content
This repository has been archived by the owner on Jun 7, 2020. It is now read-only.

Commit

Permalink
Merge pull request #2005 from RocketChat/develop
Browse files Browse the repository at this point in the history
[RELEASE] Merge DEVELOP into MASTER
  • Loading branch information
rafaelks authored Jul 18, 2018
2 parents e9f83bd + 9a9a202 commit 1ed0cdc
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 30 deletions.
4 changes: 2 additions & 2 deletions Rocket.Chat.ShareExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>3.0.0</string>
<string>3.0.1</string>
<key>CFBundleVersion</key>
<string>191</string>
<string>199</string>
<key>ITSEncryptionExportComplianceCode</key>
<string></string>
<key>NSExtension</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
Expand Down
4 changes: 3 additions & 1 deletion Rocket.Chat/Controllers/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
26 changes: 13 additions & 13 deletions Rocket.Chat/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.0.0</string>
<string>3.0.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -222,7 +222,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>191</string>
<string>199</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
Expand Down Expand Up @@ -264,17 +264,6 @@
</dict>
</dict>
</dict>
<key>UIApplicationShortcutItems</key>
<array>
<dict>
<key>UIApplicationShortcutItemIconType</key>
<string>UIApplicationShortcutIconTypeAdd</string>
<key>UIApplicationShortcutItemTitle</key>
<string>add-server-shortcut</string>
<key>UIApplicationShortcutItemType</key>
<string>addserver</string>
</dict>
</array>
<key>NSCameraUsageDescription</key>
<string>NSCameraUsageDescription</string>
<key>NSMicrophoneUsageDescription</key>
Expand All @@ -285,6 +274,17 @@
<string>NSPhotoLibraryUsageDescription</string>
<key>RC_MIN_SERVER_VERSION</key>
<string>0.54.0</string>
<key>UIApplicationShortcutItems</key>
<array>
<dict>
<key>UIApplicationShortcutItemIconType</key>
<string>UIApplicationShortcutIconTypeAdd</string>
<key>UIApplicationShortcutItemTitle</key>
<string>add-server-shortcut</string>
<key>UIApplicationShortcutItemType</key>
<string>addserver</string>
</dict>
</array>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
Expand Down
6 changes: 5 additions & 1 deletion Rocket.Chat/Views/Chat/RCTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ed0cdc

Please sign in to comment.