Move room subscriptions to a separate call, fix side effects when requesting other room data (leaving, inviter etc)

This commit is contained in:
Stefan Ceriu
2023-08-16 15:53:42 +03:00
committed by Stefan Ceriu
parent c64fb44c96
commit 54164b8437
4 changed files with 32 additions and 8 deletions
@@ -778,6 +778,18 @@ class RoomProxyMock: RoomProxyProtocol {
}
var underlyingTimelineProvider: RoomTimelineProviderProtocol!
//MARK: - subscribeForUpdates
var subscribeForUpdatesCallsCount = 0
var subscribeForUpdatesCalled: Bool {
return subscribeForUpdatesCallsCount > 0
}
var subscribeForUpdatesClosure: (() async -> Void)?
func subscribeForUpdates() async {
subscribeForUpdatesCallsCount += 1
await subscribeForUpdatesClosure?()
}
//MARK: - loadAvatarURLForUserId
var loadAvatarURLForUserIdCallsCount = 0