mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Fixed an issue where non-visible messages were causing their conversations to appear
Fixed a crash when trying to unsend a message
This commit is contained in:
parent
2053b6b0cd
commit
19eddd79a1
1
Podfile
1
Podfile
|
@ -94,6 +94,7 @@ abstract_target 'GlobalDependencies' do
|
||||||
target 'SessionUIKit' do
|
target 'SessionUIKit' do
|
||||||
pod 'GRDB.swift/SQLCipher'
|
pod 'GRDB.swift/SQLCipher'
|
||||||
pod 'DifferenceKit'
|
pod 'DifferenceKit'
|
||||||
|
pod 'YYImage/libwebp', git: 'https://github.com/signalapp/YYImage'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -212,6 +212,6 @@ SPEC CHECKSUMS:
|
||||||
YYImage: f1ddd15ac032a58b78bbed1e012b50302d318331
|
YYImage: f1ddd15ac032a58b78bbed1e012b50302d318331
|
||||||
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb
|
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb
|
||||||
|
|
||||||
PODFILE CHECKSUM: f461937f78a0482496fea6fc4b2bb5d1351fe044
|
PODFILE CHECKSUM: 5a4993725a7d48be883663a52df2a5de45d2d099
|
||||||
|
|
||||||
COCOAPODS: 1.11.3
|
COCOAPODS: 1.11.3
|
||||||
|
|
|
@ -1791,8 +1791,10 @@ extension ConversationVC:
|
||||||
// Show a loading indicator
|
// Show a loading indicator
|
||||||
Deferred {
|
Deferred {
|
||||||
Future<Void, Error> { resolver in
|
Future<Void, Error> { resolver in
|
||||||
ModalActivityIndicatorViewController.present(fromViewController: viewController, canCancel: false) { _ in
|
DispatchQueue.main.async {
|
||||||
resolver(Result.success(()))
|
ModalActivityIndicatorViewController.present(fromViewController: viewController, canCancel: false) { _ in
|
||||||
|
resolver(Result.success(()))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,7 +175,7 @@ public extension ConfigurationSyncJob {
|
||||||
|
|
||||||
static func enqueue(_ db: Database, publicKey: String) {
|
static func enqueue(_ db: Database, publicKey: String) {
|
||||||
// FIXME: Remove this once `useSharedUtilForUserConfig` is permanent
|
// 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
|
// 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
|
// 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
|
// the first launch of a fresh install due to the migrations getting run and a few
|
||||||
|
|
|
@ -282,10 +282,22 @@ public enum MessageReceiver {
|
||||||
threadId: String,
|
threadId: String,
|
||||||
message: Message
|
message: Message
|
||||||
) throws {
|
) 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)
|
// visible (the only other spot this flag gets set is when sending messages)
|
||||||
switch message {
|
switch message {
|
||||||
|
case is ReadReceipt: break
|
||||||
case is TypingIndicator: 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:
|
default:
|
||||||
// Only update the `shouldBeVisible` flag if the thread is currently not visible
|
// Only update the `shouldBeVisible` flag if the thread is currently not visible
|
||||||
|
|
Loading…
Reference in a new issue