mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Expose isLiveKitRTCSupported on the ClientProxy. (#4238)
This commit is contained in:
@@ -97,6 +97,7 @@ extension ClientProxyMock {
|
||||
userIdentityForReturnValue = .success(UserIdentityProxyMock(configuration: .init()))
|
||||
|
||||
underlyingIsReportRoomSupported = true
|
||||
underlyingIsLiveKitRTCSupported = true
|
||||
|
||||
underlyingTimelineMediaVisibilityPublisher = CurrentValueSubject<TimelineMediaVisibility, Never>(configuration.timelineMediaVisibility).asCurrentValuePublisher()
|
||||
underlyingHideInviteAvatarsPublisher = CurrentValueSubject<Bool, Never>(configuration.hideInviteAvatars).asCurrentValuePublisher()
|
||||
|
||||
@@ -2330,6 +2330,23 @@ class ClientProxyMock: ClientProxyProtocol, @unchecked Sendable {
|
||||
}
|
||||
var underlyingIsReportRoomSupported: Bool!
|
||||
var isReportRoomSupportedClosure: (() async -> Bool)?
|
||||
var isLiveKitRTCSupportedCallsCount = 0
|
||||
var isLiveKitRTCSupportedCalled: Bool {
|
||||
return isLiveKitRTCSupportedCallsCount > 0
|
||||
}
|
||||
|
||||
var isLiveKitRTCSupported: Bool {
|
||||
get async {
|
||||
isLiveKitRTCSupportedCallsCount += 1
|
||||
if let isLiveKitRTCSupportedClosure = isLiveKitRTCSupportedClosure {
|
||||
return await isLiveKitRTCSupportedClosure()
|
||||
} else {
|
||||
return underlyingIsLiveKitRTCSupported
|
||||
}
|
||||
}
|
||||
}
|
||||
var underlyingIsLiveKitRTCSupported: Bool!
|
||||
var isLiveKitRTCSupportedClosure: (() async -> Bool)?
|
||||
|
||||
//MARK: - isOnlyDeviceLeft
|
||||
|
||||
|
||||
Reference in New Issue
Block a user