mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Send UTD occurences to Posthog (#2575)
Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com>
This commit is contained in:
@@ -589,6 +589,7 @@ class ClientProxy: ClientProxyProtocol {
|
||||
let syncService = try await client
|
||||
.syncService()
|
||||
.withCrossProcessLock(appIdentifier: "MainApp")
|
||||
.withUtdHook(delegate: ClientDecryptionErrorDelegate(actionsSubject: actionsSubject))
|
||||
.finish()
|
||||
let roomListService = syncService.roomListService()
|
||||
|
||||
@@ -803,6 +804,18 @@ private class ClientDelegateWrapper: ClientDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
private class ClientDecryptionErrorDelegate: UnableToDecryptDelegate {
|
||||
private let actionsSubject: PassthroughSubject<ClientProxyAction, Never>
|
||||
|
||||
init(actionsSubject: PassthroughSubject<ClientProxyAction, Never>) {
|
||||
self.actionsSubject = actionsSubject
|
||||
}
|
||||
|
||||
func onUtd(info: UnableToDecryptInfo) {
|
||||
actionsSubject.send(.receivedDecryptionError(info))
|
||||
}
|
||||
}
|
||||
|
||||
private class IgnoredUsersListenerProxy: IgnoredUsersListener {
|
||||
private let onUpdateClosure: ([String]) -> Void
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import MatrixRustSDK
|
||||
enum ClientProxyAction {
|
||||
case receivedSyncUpdate
|
||||
case receivedAuthError(isSoftLogout: Bool)
|
||||
case receivedDecryptionError(UnableToDecryptInfo)
|
||||
|
||||
var isSyncUpdate: Bool {
|
||||
if case .receivedSyncUpdate = self {
|
||||
|
||||
Reference in New Issue
Block a user