mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Add a migration to expire sync sessions so that m.space.* state is up to date. (#4482)
This commit is contained in:
@@ -2392,6 +2392,41 @@ class ClientProxyMock: ClientProxyProtocol, @unchecked Sendable {
|
||||
stopSyncCompletionCallsCount += 1
|
||||
stopSyncCompletionClosure?(completion)
|
||||
}
|
||||
//MARK: - expireSyncSessions
|
||||
|
||||
var expireSyncSessionsUnderlyingCallsCount = 0
|
||||
var expireSyncSessionsCallsCount: Int {
|
||||
get {
|
||||
if Thread.isMainThread {
|
||||
return expireSyncSessionsUnderlyingCallsCount
|
||||
} else {
|
||||
var returnValue: Int? = nil
|
||||
DispatchQueue.main.sync {
|
||||
returnValue = expireSyncSessionsUnderlyingCallsCount
|
||||
}
|
||||
|
||||
return returnValue!
|
||||
}
|
||||
}
|
||||
set {
|
||||
if Thread.isMainThread {
|
||||
expireSyncSessionsUnderlyingCallsCount = newValue
|
||||
} else {
|
||||
DispatchQueue.main.sync {
|
||||
expireSyncSessionsUnderlyingCallsCount = newValue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var expireSyncSessionsCalled: Bool {
|
||||
return expireSyncSessionsCallsCount > 0
|
||||
}
|
||||
var expireSyncSessionsClosure: (() async -> Void)?
|
||||
|
||||
func expireSyncSessions() async {
|
||||
expireSyncSessionsCallsCount += 1
|
||||
await expireSyncSessionsClosure?()
|
||||
}
|
||||
//MARK: - accountURL
|
||||
|
||||
var accountURLActionUnderlyingCallsCount = 0
|
||||
|
||||
Reference in New Issue
Block a user