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 #1298 from RocketChat/develop
Browse files Browse the repository at this point in the history
[RELEASE] Merge develop into beta
  • Loading branch information
rafaelks authored Feb 20, 2018
2 parents 306ce9d + 9ab73ee commit d932778
Show file tree
Hide file tree
Showing 127 changed files with 239 additions and 161 deletions.
19 changes: 10 additions & 9 deletions Rocket.Chat/Controllers/Chat/ChatControllerMessageActions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,16 @@ extension ChatViewController {
self.report(message: message)
}))

alert.addAction(UIAlertAction(title: localized("chat.message.actions.block"), style: .default, handler: { [weak self] (_) in
guard let user = message.user else { return }

DispatchQueue.main.async {
MessageManager.blockMessagesFrom(user, completion: {
self?.updateSubscriptionInfo()
})
}
}))
if AuthManager.isAuthenticated()?.canBlockMessage(message) == .allowed {
alert.addAction(UIAlertAction(title: localized("chat.message.actions.block"), style: .default, handler: { [weak self] (_) in
guard let user = message.user else { return }
DispatchQueue.main.async {
MessageManager.blockMessagesFrom(user, completion: {
self?.updateSubscriptionInfo()
})
}
}))
}

alert.addAction(UIAlertAction(title: localized("chat.message.actions.copy"), style: .default, handler: { (_) in
UIPasteboard.general.string = message.text
Expand Down
6 changes: 5 additions & 1 deletion Rocket.Chat/Controllers/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,11 @@ final class ChatViewController: SLKTextViewController {
}

override func didPressReturnKey(_ keyCommand: UIKeyCommand?) {
didPressRightButton(nil)
if messageToEdit != nil {
didCommitTextEditing(self)
} else {
didPressRightButton(self)
}
}

override func textViewDidBeginEditing(_ textView: UITextView) {
Expand Down
5 changes: 5 additions & 0 deletions Rocket.Chat/Controllers/Settings/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
import UIKit
import MessageUI
import SafariServices

#if BETA || DEBUG
import FLEX
#endif

final class SettingsViewController: UITableViewController {

Expand Down Expand Up @@ -94,7 +97,9 @@ final class SettingsViewController: UITableViewController {
}

if indexPath.section == 1, indexPath.row == 0 {
#if BETA || DEBUG
FLEXManager.shared().showExplorer()
#endif
}

tableView.deselectRow(at: indexPath, animated: true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ extension NSAttributedString {
return emojis.reduce(mutableSelf) { attributedString, emoji in
guard case let .custom(imageUrl) = emoji.type else { return attributedString }

let regexPattern = ":\(emoji.shortname):|:\(emoji.alternates.joined(separator: ":|:")):"
let alternates = emoji.alternates.filter { !$0.isEmpty }

let regexPattern = ":\(emoji.shortname):" + (alternates.isEmpty ? "" : "|:\(alternates.joined(separator: ":|:")):")

guard let regex = try? NSRegularExpression(pattern: regexPattern, options: []) else { return attributedString }

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d932778

Please sign in to comment.