mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Make room proxy unsubscriptions explicit. Fixes problems in which creating and deallocating room proxies would unexpectedly unsubscribe other proxies.
This commit is contained in:
@@ -1864,6 +1864,18 @@ class RoomProxyMock: RoomProxyProtocol {
|
||||
subscribeForUpdatesCallsCount += 1
|
||||
await subscribeForUpdatesClosure?()
|
||||
}
|
||||
//MARK: - unsubscribeFromUpdates
|
||||
|
||||
var unsubscribeFromUpdatesCallsCount = 0
|
||||
var unsubscribeFromUpdatesCalled: Bool {
|
||||
return unsubscribeFromUpdatesCallsCount > 0
|
||||
}
|
||||
var unsubscribeFromUpdatesClosure: (() -> Void)?
|
||||
|
||||
func unsubscribeFromUpdates() {
|
||||
unsubscribeFromUpdatesCallsCount += 1
|
||||
unsubscribeFromUpdatesClosure?()
|
||||
}
|
||||
//MARK: - redact
|
||||
|
||||
var redactCallsCount = 0
|
||||
|
||||
Reference in New Issue
Block a user