mirror of
https://github.com/lux-tel/session-ios.git
synced 2026-10-30 20:38:32 +00:00
• Rebuild the observation system so UI updates can be triggered arbitrarily rather than just from database changes (requires manual evert firing) • Refactored the TypingIndicators to be an actor • Fixed an issue where sharing something from within the app via Session wouldn't update the conversation list content
26 lines
1009 B
Swift
26 lines
1009 B
Swift
// Copyright © 2025 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
import UIKit
|
|
import SessionMessagingKit
|
|
import SessionUtilitiesKit
|
|
|
|
public extension UIActivityViewController {
|
|
static func notifyIfNeeded(_ success: Bool, using dependencies: Dependencies) {
|
|
if success {
|
|
if let threadId: String = dependencies[defaults: .appGroup, key: .lastSharedThreadId] {
|
|
let interactionId: Int64 = Int64(dependencies[defaults: .appGroup, key: .lastSharedMessageId])
|
|
|
|
dependencies[singleton: .storage].readAsync(
|
|
retrieve: { db in
|
|
db.addMessageEvent(id: interactionId, threadId: threadId, type: .created)
|
|
},
|
|
completion: { _ in }
|
|
)
|
|
}
|
|
|
|
dependencies[defaults: .appGroup].removeObject(forKey: .lastSharedThreadId)
|
|
dependencies[defaults: .appGroup].removeObject(forKey: .lastSharedMessageId)
|
|
}
|
|
}
|
|
}
|