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

Commit fe87b92

Browse files
authored
Merge pull request #2171 from RocketChat/develop
[RELEASE] Merge DEVELOP into BETA
2 parents f69ff39 + f257e91 commit fe87b92

File tree

24 files changed

+556
-141
lines changed

24 files changed

+556
-141
lines changed

Podfile.lock

Lines changed: 69 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,57 @@
11
PODS:
22
- 1PasswordExtension (1.8.5)
3-
- Crashlytics (3.10.5):
4-
- Fabric (~> 1.7.9)
5-
- DifferenceKit (0.5.2):
6-
- DifferenceKit/Core (= 0.5.2)
7-
- DifferenceKit/UIExtensions (= 0.5.2)
8-
- DifferenceKit/Core (0.5.2)
9-
- DifferenceKit/UIExtensions (0.5.2):
3+
- Crashlytics (3.10.7):
4+
- Fabric (~> 1.7.11)
5+
- DifferenceKit (0.5.3):
6+
- DifferenceKit/Core (= 0.5.3)
7+
- DifferenceKit/UIExtensions (= 0.5.3)
8+
- DifferenceKit/Core (0.5.3)
9+
- DifferenceKit/UIExtensions (0.5.3):
1010
- DifferenceKit/Core
11-
- Fabric (1.7.9)
12-
- Firebase/Core (5.4.1):
11+
- Fabric (1.7.11)
12+
- Firebase/Core (5.7.0):
1313
- Firebase/CoreOnly
14-
- FirebaseAnalytics (= 5.0.1)
15-
- Firebase/CoreOnly (5.4.1):
16-
- FirebaseCore (= 5.0.6)
17-
- FirebaseAnalytics (5.0.1):
18-
- FirebaseCore (~> 5.0)
19-
- FirebaseInstanceID (~> 3.0)
20-
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
14+
- FirebaseAnalytics (= 5.1.1)
15+
- Firebase/CoreOnly (5.7.0):
16+
- FirebaseCore (= 5.1.2)
17+
- FirebaseAnalytics (5.1.1):
18+
- FirebaseCore (~> 5.1)
19+
- FirebaseInstanceID (~> 3.2)
20+
- GoogleAppMeasurement (~> 5.1)
21+
- GoogleUtilities/AppDelegateSwizzler (~> 5.2.0)
22+
- GoogleUtilities/MethodSwizzler (~> 5.2.0)
23+
- GoogleUtilities/Network (~> 5.2)
24+
- "GoogleUtilities/NSData+zlib (~> 5.2)"
2125
- nanopb (~> 0.3)
22-
- FirebaseCore (5.0.6):
23-
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
24-
- FirebaseInstanceID (3.1.1):
25-
- FirebaseCore (~> 5.0)
26+
- FirebaseCore (5.1.2):
27+
- GoogleUtilities/Logger (~> 5.2)
28+
- FirebaseInstanceID (3.2.1):
29+
- FirebaseCore (~> 5.1)
30+
- GoogleUtilities/Environment (~> 5.2)
2631
- FLAnimatedImage (1.0.12)
2732
- FLEX (2.4.0)
28-
- GoogleToolboxForMac/Defines (2.1.4)
29-
- "GoogleToolboxForMac/NSData+zlib (2.1.4)":
30-
- GoogleToolboxForMac/Defines (= 2.1.4)
33+
- GoogleAppMeasurement (5.1.1):
34+
- GoogleUtilities/AppDelegateSwizzler (~> 5.2.0)
35+
- GoogleUtilities/MethodSwizzler (~> 5.2.0)
36+
- GoogleUtilities/Network (~> 5.2)
37+
- "GoogleUtilities/NSData+zlib (~> 5.2)"
38+
- nanopb (~> 0.3)
39+
- GoogleUtilities/AppDelegateSwizzler (5.2.2):
40+
- GoogleUtilities/Environment
41+
- GoogleUtilities/Logger
42+
- GoogleUtilities/Network
43+
- GoogleUtilities/Environment (5.2.2)
44+
- GoogleUtilities/Logger (5.2.2):
45+
- GoogleUtilities/Environment
46+
- GoogleUtilities/MethodSwizzler (5.2.2):
47+
- GoogleUtilities/Logger
48+
- GoogleUtilities/Network (5.2.2):
49+
- GoogleUtilities/Logger
50+
- "GoogleUtilities/NSData+zlib"
51+
- GoogleUtilities/Reachability
52+
- "GoogleUtilities/NSData+zlib (5.2.2)"
53+
- GoogleUtilities/Reachability (5.2.2):
54+
- GoogleUtilities/Logger
3155
- MBProgressHUD (1.1.0)
3256
- MobilePlayer (1.2.0)
3357
- nanopb (0.3.8):
@@ -41,18 +65,18 @@ PODS:
4165
- Nuke (~> 7.0)
4266
- OAuthSwift (1.2.2)
4367
- RCMarkdownParser (3.0.6)
44-
- ReachabilitySwift (4.1.0)
45-
- Realm (3.7.5):
46-
- Realm/Headers (= 3.7.5)
47-
- Realm/Headers (3.7.5)
48-
- RealmSwift (3.7.5):
49-
- Realm (= 3.7.5)
68+
- ReachabilitySwift (4.2.1)
69+
- Realm (3.7.6):
70+
- Realm/Headers (= 3.7.6)
71+
- Realm/Headers (3.7.6)
72+
- RealmSwift (3.7.6):
73+
- Realm (= 3.7.6)
5074
- semver (1.1.0)
5175
- SimpleImageViewer (1.2.0):
5276
- FLAnimatedImage
5377
- SlackTextViewController (1.9.6)
5478
- Starscream (2.1.1)
55-
- SwiftLint (0.26.0)
79+
- SwiftLint (0.27.0)
5680
- SwiftyJSON (4.1.0)
5781
- SwipeCellKit (2.4.3)
5882

@@ -91,7 +115,8 @@ SPEC REPOS:
91115
- FirebaseInstanceID
92116
- FLAnimatedImage
93117
- FLEX
94-
- GoogleToolboxForMac
118+
- GoogleAppMeasurement
119+
- GoogleUtilities
95120
- MBProgressHUD
96121
- nanopb
97122
- Nuke
@@ -132,31 +157,32 @@ CHECKOUT OPTIONS:
132157

133158
SPEC CHECKSUMS:
134159
1PasswordExtension: 0e95bdea64ec8ff2f4f693be5467a09fac42a83d
135-
Crashlytics: 7f2e38d302d9da96475b3d64d86fb29e31a542b7
136-
DifferenceKit: 3999ddee5146dbd12d7418e2b907c6f5e2673805
137-
Fabric: a2917d3895e4c1569b9c3170de7320ea1b1e6661
138-
Firebase: 355bd535bfdacaa82a7fe8d9784115edefd6fc03
139-
FirebaseAnalytics: b3628aea54c50464c32c393fb2ea032566e7ecc2
140-
FirebaseCore: 4c28e3b9708ba48a765e76515f913a71596eb5dd
141-
FirebaseInstanceID: f3f0657372592ecdfdfe2cac604a5a75758376a6
160+
Crashlytics: ccaac42660eb9351b9960c0d66106b0bcf99f4fa
161+
DifferenceKit: 2037137305c55a39ff729baa72697efa30b1052d
162+
Fabric: f233c9492b3bbc1f04e3882986740f7988a58edb
163+
Firebase: 734a4f92957aa6c40e7ae3fda3d9359e1890aa87
164+
FirebaseAnalytics: 993577e91157feb40945abedd6ab346d8a4b6ac8
165+
FirebaseCore: 3a97432acb324b439fbed338e642f9cbb516a63d
166+
FirebaseInstanceID: ea5af6920d0a4a29b40459d055bebe4a6c1333c4
142167
FLAnimatedImage: 4a0b56255d9b05f18b6dd7ee06871be5d3b89e31
143168
FLEX: bd1a39e55b56bb413b6f1b34b3c10a0dc44ef079
144-
GoogleToolboxForMac: 91c824d21e85b31c2aae9bb011c5027c9b4e738f
169+
GoogleAppMeasurement: f7507b39b70ad0bd80b3d81518b2f43868974307
170+
GoogleUtilities: 06b66f9567769a7958db20a92f0128b2843e49d5
145171
MBProgressHUD: e7baa36a220447d8aeb12769bf0585582f3866d9
146172
MobilePlayer: 069b13482499f14c25b6ce53f63a91e17975b073
147173
nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
148174
Nuke: a9a31bbd6c6723753ab024ef22057dcaaf046c1b
149175
Nuke-FLAnimatedImage-Plugin: 6dfb9335ce298eaff9fdfed8d20d1bbfb2a6c326
150176
OAuthSwift: 27b34fe80b76b67cd8f45571e0be2432bc9f6de1
151177
RCMarkdownParser: 518b616a4f48bb02247243544d4fd55c048288a4
152-
ReachabilitySwift: 6849231cd4e06559f3b9ef4a97a0a0f96d41e09f
153-
Realm: c286caf4dbf346ce24aad49ca76c7ce622d4a082
154-
RealmSwift: 2a9281e37d6de55f66f76254d49d28aeb1b729e4
178+
ReachabilitySwift: 35720ffea59c1c76d15f885be77fd33e33985427
179+
Realm: 9eaecad54712d6246d08ba34c10f354e4715d7d3
180+
RealmSwift: 1fe08b4ebaeeaacf17f9ba0343f7b25c9fc31fa6
155181
semver: 11ae3bc4a6036efbc86b5863ef5fa32c065c8bbd
156182
SimpleImageViewer: 6ed0d2acf7c166a5b4e795bccc7b9ea1b225ff9b
157183
SlackTextViewController: b854e62c1c156336bc4fd409c6ca79b5773e8f9d
158184
Starscream: 142bd8ef24592d985daee9fa48c936070b85b15f
159-
SwiftLint: f6b83e8d95ee1e91e11932d843af4fdcbf3fc764
185+
SwiftLint: 3207c1faa2240bf8973b191820a116113cd11073
160186
SwiftyJSON: c29297daf073d2aa016295d5809cdd68045c39b3
161187
SwipeCellKit: cee9906e6d3a36e22ad1a852fba7f8fa0839d113
162188

Rocket.Chat.ShareExtension/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>3.1.0</string>
2121
<key>CFBundleVersion</key>
22-
<string>207</string>
22+
<string>210</string>
2323
<key>ITSEncryptionExportComplianceCode</key>
2424
<string></string>
2525
<key>NSExtension</key>

Rocket.Chat.xcodeproj/project.pbxproj

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3735,6 +3735,7 @@
37353735
FC8FBCDB0132F52FB242368E /* [CP] Embed Pods Frameworks */,
37363736
FD5E5CD0D343F2BAB726ADF9 /* 📦 Embed Pods Frameworks */,
37373737
807FB5672046E7DD00E21429 /* Embed App Extensions */,
3738+
805378D121344458004A3D16 /* Validate Strings */,
37383739
);
37393740
buildRules = (
37403741
);
@@ -4114,6 +4115,20 @@
41144115
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
41154116
showEnvVarsInLog = 0;
41164117
};
4118+
805378D121344458004A3D16 /* Validate Strings */ = {
4119+
isa = PBXShellScriptBuildPhase;
4120+
buildActionMask = 2147483647;
4121+
files = (
4122+
);
4123+
inputPaths = (
4124+
);
4125+
name = "Validate Strings";
4126+
outputPaths = (
4127+
);
4128+
runOnlyForDeploymentPostprocessing = 0;
4129+
shellPath = /bin/sh;
4130+
shellScript = "${SRCROOT}/Scripts/Localize.swift";
4131+
};
41174132
D37272A11E13E60E00A25E1A /* SwiftLint */ = {
41184133
isa = PBXShellScriptBuildPhase;
41194134
buildActionMask = 12;
@@ -4145,7 +4160,7 @@
41454160
"${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework",
41464161
"${BUILT_PRODUCTS_DIR}/1PasswordExtension/OnePasswordExtension.framework",
41474162
"${BUILT_PRODUCTS_DIR}/FLEX/FLEX.framework",
4148-
"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework",
4163+
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
41494164
"${BUILT_PRODUCTS_DIR}/MobilePlayer/MobilePlayer.framework",
41504165
"${BUILT_PRODUCTS_DIR}/OAuthSwift/OAuthSwift.framework",
41514166
"${BUILT_PRODUCTS_DIR}/RCMarkdownParser/RCMarkdownParser.framework",
@@ -4169,7 +4184,7 @@
41694184
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework",
41704185
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OnePasswordExtension.framework",
41714186
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FLEX.framework",
4172-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
4187+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
41734188
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MobilePlayer.framework",
41744189
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OAuthSwift.framework",
41754190
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCMarkdownParser.framework",
@@ -4251,7 +4266,7 @@
42514266
"${BUILT_PRODUCTS_DIR}/SwiftyJSON/SwiftyJSON.framework",
42524267
"${BUILT_PRODUCTS_DIR}/1PasswordExtension/OnePasswordExtension.framework",
42534268
"${BUILT_PRODUCTS_DIR}/FLEX/FLEX.framework",
4254-
"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework",
4269+
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
42554270
"${BUILT_PRODUCTS_DIR}/MobilePlayer/MobilePlayer.framework",
42564271
"${BUILT_PRODUCTS_DIR}/OAuthSwift/OAuthSwift.framework",
42574272
"${BUILT_PRODUCTS_DIR}/RCMarkdownParser/RCMarkdownParser.framework",
@@ -4275,7 +4290,7 @@
42754290
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftyJSON.framework",
42764291
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OnePasswordExtension.framework",
42774292
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FLEX.framework",
4278-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
4293+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
42794294
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MobilePlayer.framework",
42804295
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OAuthSwift.framework",
42814296
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCMarkdownParser.framework",

Rocket.Chat/AppDelegate.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2121

2222
PushManager.setupNotificationCenter()
2323
application.registerForRemoteNotifications()
24+
2425
if let launchOptions = launchOptions,
2526
let notification = launchOptions[.remoteNotification] as? [AnyHashable: Any] {
2627
PushManager.handleNotification(raw: notification)

Rocket.Chat/Controllers/Chat/ChatDataController.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ final class ChatDataController {
248248
}
249249

250250
func needsUnreadSeparator(_ obj: ChatData) -> Bool {
251-
if let currentUser = AuthManager.currentUser(), let objUser = obj.message?.user, currentUser != objUser {
251+
if let currentUser = AuthManager.currentUser(), let objUser = obj.message?.validated()?.user, currentUser != objUser {
252252
if obj.timestamp > lastSeen && !unreadSeparator {
253253
unreadSeparator = true
254254
return true
@@ -308,14 +308,16 @@ final class ChatDataController {
308308

309309
func update(_ message: Message) -> Int {
310310
for (idx, obj) in data.enumerated()
311-
where obj.message?.identifier == message.identifier {
311+
where obj.message?.validated()?.identifier == message.identifier {
312312
invalidateLayout(for: obj.identifier)
313313

314-
if obj.message?.updatedAt?.timeIntervalSince1970 == message.updatedAt?.timeIntervalSince1970 && obj.message?.markedForDeletion == message.markedForDeletion {
314+
let objMessage = obj.message?.validated()
315+
316+
if objMessage?.updatedAt?.timeIntervalSince1970 == message.updatedAt?.timeIntervalSince1970 && objMessage?.markedForDeletion == message.markedForDeletion {
315317
return -1
316318
}
317319

318-
if let oldMessage = obj.message {
320+
if let oldMessage = objMessage {
319321
if !(oldMessage == message) {
320322
MessageTextCacheManager.shared.update(for: message, with: nil)
321323
}
@@ -340,7 +342,7 @@ final class ChatDataController {
340342

341343
func oldestMessage() -> Message? {
342344
for obj in data where obj.type == .message {
343-
return obj.message
345+
return obj.message?.validated()
344346
}
345347

346348
return nil

Rocket.Chat/Controllers/Chat/ChatViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ final class ChatViewController: SLKTextViewController {
233233
override func viewDidDisappear(_ animated: Bool) {
234234
super.viewDidDisappear(true)
235235

236-
if let subscription = subscription {
236+
if let subscription = subscription?.validated() {
237237
unsubscribe(for: subscription)
238238
}
239239
}
@@ -1025,7 +1025,7 @@ extension ChatViewController {
10251025
override func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
10261026
guard
10271027
dataController.data.count > indexPath.row,
1028-
let subscription = subscription,
1028+
let subscription = subscription?.validated(),
10291029
let obj = dataController.itemAt(indexPath)
10301030
else {
10311031
return cellForEmpty(at: indexPath)

Rocket.Chat/Controllers/Subscriptions/SubscriptionsList/SubscriptionsViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,7 @@ extension SubscriptionsViewController {
646646
return
647647
}
648648

649+
tableView.selectRow(at: indexPath, animated: true, scrollPosition: .none)
649650
onSelectRowAt(indexPath)
650651

651652
DispatchQueue.main.async { [weak self] in

Rocket.Chat/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
</dict>
223223
</array>
224224
<key>CFBundleVersion</key>
225-
<string>207</string>
225+
<string>210</string>
226226
<key>Fabric</key>
227227
<dict>
228228
<key>APIKey</key>

Rocket.Chat/Managers/AnalyticsManager.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ enum Event {
2020
case signup
2121
case login
2222
case updateStatus
23+
case replyNotification
2324
case screenView(screenName: String)
2425
case messageSent(subscriptionType: String, server: String)
2526
case mediaUpload(mediaType: String, subscriptionType: String)
@@ -106,6 +107,7 @@ extension Event {
106107
return provider == .firebase ? AnalyticsEventLogin : "login"
107108
case .showNewWorkspace: return "show_new_workspace"
108109
case .updateStatus: return "status_update"
110+
case .replyNotification: return "reply_notification"
109111
case .screenView: return "screen_view"
110112
case .messageSent: return "message_sent"
111113
case .mediaUpload: return "media_upload"

Rocket.Chat/Managers/AppManager.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ struct AppManager {
117117

118118
extension AppManager {
119119

120-
static func changeSelectedServer(index: Int) {
120+
static func changeSelectedServer(index: Int, completion: (() -> Void)? = nil) {
121121
guard index != DatabaseManager.selectedIndex else {
122122
DatabaseManager.changeDatabaseInstance(index: index)
123-
reloadApp()
123+
reloadApp(completion: completion)
124124
return
125125
}
126126

@@ -131,7 +131,7 @@ extension AppManager {
131131
AuthSettingsManager.shared.updateCachedSettings()
132132
AuthManager.recoverAuthIfNeeded()
133133

134-
reloadApp()
134+
reloadApp(completion: completion)
135135
}
136136
}
137137

@@ -185,7 +185,7 @@ extension AppManager {
185185
}
186186
}
187187

188-
static func reloadApp() {
188+
static func reloadApp(completion: (() -> Void)? = nil) {
189189
SocketManager.sharedInstance.connectionHandlers.removeAllObjects()
190190
SocketManager.disconnect { (_, _) in
191191
DispatchQueue.main.async {
@@ -212,6 +212,8 @@ extension AppManager {
212212
} else {
213213
WindowManager.open(.auth(serverUrl: "", credentials: nil))
214214
}
215+
216+
completion?()
215217
}
216218
}
217219
}

0 commit comments

Comments
 (0)