diff --git a/Podfile b/Podfile index 1f8b96f72..d9f7d9613 100644 --- a/Podfile +++ b/Podfile @@ -94,6 +94,7 @@ abstract_target 'GlobalDependencies' do target 'SessionUIKit' do pod 'GRDB.swift/SQLCipher' pod 'DifferenceKit' + pod 'YYImage/libwebp', git: 'https://github.com/signalapp/YYImage' end end diff --git a/Podfile.lock b/Podfile.lock index 0d70b673b..051db4dda 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -212,6 +212,6 @@ SPEC CHECKSUMS: YYImage: f1ddd15ac032a58b78bbed1e012b50302d318331 ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb -PODFILE CHECKSUM: f461937f78a0482496fea6fc4b2bb5d1351fe044 +PODFILE CHECKSUM: 5a4993725a7d48be883663a52df2a5de45d2d099 COCOAPODS: 1.11.3 diff --git a/Session/Conversations/ConversationVC+Interaction.swift b/Session/Conversations/ConversationVC+Interaction.swift index ab105ca12..bdf4a4399 100644 --- a/Session/Conversations/ConversationVC+Interaction.swift +++ b/Session/Conversations/ConversationVC+Interaction.swift @@ -1791,8 +1791,10 @@ extension ConversationVC: // Show a loading indicator Deferred { Future { resolver in - ModalActivityIndicatorViewController.present(fromViewController: viewController, canCancel: false) { _ in - resolver(Result.success(())) + DispatchQueue.main.async { + ModalActivityIndicatorViewController.present(fromViewController: viewController, canCancel: false) { _ in + resolver(Result.success(())) + } } } } diff --git a/SessionMessagingKit/Jobs/Types/ConfigurationSyncJob.swift b/SessionMessagingKit/Jobs/Types/ConfigurationSyncJob.swift index bd7e183e1..7be4b4a3a 100644 --- a/SessionMessagingKit/Jobs/Types/ConfigurationSyncJob.swift +++ b/SessionMessagingKit/Jobs/Types/ConfigurationSyncJob.swift @@ -175,7 +175,7 @@ public extension ConfigurationSyncJob { static func enqueue(_ db: Database, publicKey: String) { // FIXME: Remove this once `useSharedUtilForUserConfig` is permanent - guard SessionUtil.userConfigsEnabled else { + guard SessionUtil.userConfigsEnabled(db) else { // If we don't have a userKeyPair (or name) yet then there is no need to sync the // configuration as the user doesn't fully exist yet (this will get triggered on // the first launch of a fresh install due to the migrations getting run and a few diff --git a/SessionMessagingKit/Sending & Receiving/MessageReceiver.swift b/SessionMessagingKit/Sending & Receiving/MessageReceiver.swift index d4ab2e3c7..ba5f4263b 100644 --- a/SessionMessagingKit/Sending & Receiving/MessageReceiver.swift +++ b/SessionMessagingKit/Sending & Receiving/MessageReceiver.swift @@ -282,10 +282,22 @@ public enum MessageReceiver { threadId: String, message: Message ) throws { - // When handling any non-typing indicator message we want to make sure the thread becomes + // When handling any message type which has related UI we want to make sure the thread becomes // visible (the only other spot this flag gets set is when sending messages) switch message { + case is ReadReceipt: break case is TypingIndicator: break + case is ConfigurationMessage: break + case is UnsendRequest: break + + case let message as ClosedGroupControlMessage: + // Only re-show a legacy group conversation if we are going to add a control text message + switch message.kind { + case .new, .encryptionKeyPair, .encryptionKeyPairRequest: return + default: break + } + + fallthrough default: // Only update the `shouldBeVisible` flag if the thread is currently not visible