mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Remove the Element Call Picture in Picture feature flag. (#3204)
This commit is contained in:
@@ -21,7 +21,7 @@ import SwiftUI
|
||||
struct CallScreenCoordinatorParameters {
|
||||
let elementCallService: ElementCallServiceProtocol
|
||||
let configuration: ElementCallConfiguration
|
||||
let elementCallPictureInPictureEnabled: Bool
|
||||
let allowPictureInPicture: Bool
|
||||
let appHooks: AppHooks
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ final class CallScreenCoordinator: CoordinatorProtocol {
|
||||
init(parameters: CallScreenCoordinatorParameters) {
|
||||
viewModel = CallScreenViewModel(elementCallService: parameters.elementCallService,
|
||||
configuration: parameters.configuration,
|
||||
elementCallPictureInPictureEnabled: parameters.elementCallPictureInPictureEnabled,
|
||||
allowPictureInPicture: parameters.allowPictureInPicture,
|
||||
appHooks: parameters.appHooks)
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ typealias CallScreenViewModelType = StateStoreViewModel<CallScreenViewState, Cal
|
||||
class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol {
|
||||
private let elementCallService: ElementCallServiceProtocol
|
||||
private let configuration: ElementCallConfiguration
|
||||
private let isPictureInPictureEnabled: Bool
|
||||
private let isPictureInPictureAllowed: Bool
|
||||
|
||||
private let widgetDriver: ElementCallWidgetDriverProtocol
|
||||
|
||||
@@ -43,11 +43,11 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
|
||||
/// - clientID: Something to identify the current client on the Element Call side
|
||||
init(elementCallService: ElementCallServiceProtocol,
|
||||
configuration: ElementCallConfiguration,
|
||||
elementCallPictureInPictureEnabled: Bool,
|
||||
allowPictureInPicture: Bool,
|
||||
appHooks: AppHooks) {
|
||||
self.elementCallService = elementCallService
|
||||
self.configuration = configuration
|
||||
isPictureInPictureEnabled = elementCallPictureInPictureEnabled
|
||||
isPictureInPictureAllowed = allowPictureInPicture
|
||||
|
||||
switch configuration.kind {
|
||||
case .genericCallLink(let url):
|
||||
@@ -189,7 +189,7 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
|
||||
|
||||
private func handleBackwardsNavigation() async {
|
||||
guard state.url != nil,
|
||||
isPictureInPictureEnabled,
|
||||
isPictureInPictureAllowed,
|
||||
let requestPictureInPictureHandler = state.bindings.requestPictureInPictureHandler else {
|
||||
actionsSubject.send(.dismiss)
|
||||
return
|
||||
|
||||
@@ -300,7 +300,7 @@ struct CallScreen_Previews: PreviewProvider {
|
||||
elementCallBaseURL: "https://call.element.io",
|
||||
elementCallBaseURLOverride: nil,
|
||||
colorScheme: .light),
|
||||
elementCallPictureInPictureEnabled: false,
|
||||
allowPictureInPicture: false,
|
||||
appHooks: AppHooks())
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user