mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:02:10 +00:00
Remove the Element Call Picture in Picture feature flag. (#3204)
This commit is contained in:
@@ -659,7 +659,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
|||||||
|
|
||||||
let callScreenCoordinator = CallScreenCoordinator(parameters: .init(elementCallService: elementCallService,
|
let callScreenCoordinator = CallScreenCoordinator(parameters: .init(elementCallService: elementCallService,
|
||||||
configuration: configuration,
|
configuration: configuration,
|
||||||
elementCallPictureInPictureEnabled: false,
|
allowPictureInPicture: false,
|
||||||
appHooks: appHooks))
|
appHooks: appHooks))
|
||||||
|
|
||||||
callScreenCoordinator.actions
|
callScreenCoordinator.actions
|
||||||
|
|||||||
@@ -47,7 +47,6 @@ final class AppSettings {
|
|||||||
case publicSearchEnabled
|
case publicSearchEnabled
|
||||||
case fuzzyRoomListSearchEnabled
|
case fuzzyRoomListSearchEnabled
|
||||||
case pinningEnabled
|
case pinningEnabled
|
||||||
case elementCallPictureInPictureEnabled
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static var suiteName: String = InfoPlistReader.main.appGroupIdentifier
|
private static var suiteName: String = InfoPlistReader.main.appGroupIdentifier
|
||||||
@@ -285,9 +284,6 @@ final class AppSettings {
|
|||||||
|
|
||||||
@UserPreference(key: UserDefaultsKeys.pinningEnabled, defaultValue: false, storageType: .userDefaults(store))
|
@UserPreference(key: UserDefaultsKeys.pinningEnabled, defaultValue: false, storageType: .userDefaults(store))
|
||||||
var pinningEnabled
|
var pinningEnabled
|
||||||
|
|
||||||
@UserPreference(key: UserDefaultsKeys.elementCallPictureInPictureEnabled, defaultValue: false, storageType: .userDefaults(store))
|
|
||||||
var elementCallPictureInPictureEnabled
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -589,7 +589,7 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
|||||||
|
|
||||||
let callScreenCoordinator = CallScreenCoordinator(parameters: .init(elementCallService: elementCallService,
|
let callScreenCoordinator = CallScreenCoordinator(parameters: .init(elementCallService: elementCallService,
|
||||||
configuration: configuration,
|
configuration: configuration,
|
||||||
elementCallPictureInPictureEnabled: appSettings.elementCallPictureInPictureEnabled,
|
allowPictureInPicture: true,
|
||||||
appHooks: appHooks))
|
appHooks: appHooks))
|
||||||
|
|
||||||
callScreenCoordinator.actions
|
callScreenCoordinator.actions
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import SwiftUI
|
|||||||
struct CallScreenCoordinatorParameters {
|
struct CallScreenCoordinatorParameters {
|
||||||
let elementCallService: ElementCallServiceProtocol
|
let elementCallService: ElementCallServiceProtocol
|
||||||
let configuration: ElementCallConfiguration
|
let configuration: ElementCallConfiguration
|
||||||
let elementCallPictureInPictureEnabled: Bool
|
let allowPictureInPicture: Bool
|
||||||
let appHooks: AppHooks
|
let appHooks: AppHooks
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ final class CallScreenCoordinator: CoordinatorProtocol {
|
|||||||
init(parameters: CallScreenCoordinatorParameters) {
|
init(parameters: CallScreenCoordinatorParameters) {
|
||||||
viewModel = CallScreenViewModel(elementCallService: parameters.elementCallService,
|
viewModel = CallScreenViewModel(elementCallService: parameters.elementCallService,
|
||||||
configuration: parameters.configuration,
|
configuration: parameters.configuration,
|
||||||
elementCallPictureInPictureEnabled: parameters.elementCallPictureInPictureEnabled,
|
allowPictureInPicture: parameters.allowPictureInPicture,
|
||||||
appHooks: parameters.appHooks)
|
appHooks: parameters.appHooks)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ typealias CallScreenViewModelType = StateStoreViewModel<CallScreenViewState, Cal
|
|||||||
class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol {
|
class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol {
|
||||||
private let elementCallService: ElementCallServiceProtocol
|
private let elementCallService: ElementCallServiceProtocol
|
||||||
private let configuration: ElementCallConfiguration
|
private let configuration: ElementCallConfiguration
|
||||||
private let isPictureInPictureEnabled: Bool
|
private let isPictureInPictureAllowed: Bool
|
||||||
|
|
||||||
private let widgetDriver: ElementCallWidgetDriverProtocol
|
private let widgetDriver: ElementCallWidgetDriverProtocol
|
||||||
|
|
||||||
@@ -43,11 +43,11 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
|
|||||||
/// - clientID: Something to identify the current client on the Element Call side
|
/// - clientID: Something to identify the current client on the Element Call side
|
||||||
init(elementCallService: ElementCallServiceProtocol,
|
init(elementCallService: ElementCallServiceProtocol,
|
||||||
configuration: ElementCallConfiguration,
|
configuration: ElementCallConfiguration,
|
||||||
elementCallPictureInPictureEnabled: Bool,
|
allowPictureInPicture: Bool,
|
||||||
appHooks: AppHooks) {
|
appHooks: AppHooks) {
|
||||||
self.elementCallService = elementCallService
|
self.elementCallService = elementCallService
|
||||||
self.configuration = configuration
|
self.configuration = configuration
|
||||||
isPictureInPictureEnabled = elementCallPictureInPictureEnabled
|
isPictureInPictureAllowed = allowPictureInPicture
|
||||||
|
|
||||||
switch configuration.kind {
|
switch configuration.kind {
|
||||||
case .genericCallLink(let url):
|
case .genericCallLink(let url):
|
||||||
@@ -189,7 +189,7 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
|
|||||||
|
|
||||||
private func handleBackwardsNavigation() async {
|
private func handleBackwardsNavigation() async {
|
||||||
guard state.url != nil,
|
guard state.url != nil,
|
||||||
isPictureInPictureEnabled,
|
isPictureInPictureAllowed,
|
||||||
let requestPictureInPictureHandler = state.bindings.requestPictureInPictureHandler else {
|
let requestPictureInPictureHandler = state.bindings.requestPictureInPictureHandler else {
|
||||||
actionsSubject.send(.dismiss)
|
actionsSubject.send(.dismiss)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ struct CallScreen_Previews: PreviewProvider {
|
|||||||
elementCallBaseURL: "https://call.element.io",
|
elementCallBaseURL: "https://call.element.io",
|
||||||
elementCallBaseURLOverride: nil,
|
elementCallBaseURLOverride: nil,
|
||||||
colorScheme: .light),
|
colorScheme: .light),
|
||||||
elementCallPictureInPictureEnabled: false,
|
allowPictureInPicture: false,
|
||||||
appHooks: AppHooks())
|
appHooks: AppHooks())
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|||||||
-1
@@ -53,7 +53,6 @@ protocol DeveloperOptionsProtocol: AnyObject {
|
|||||||
var elementCallBaseURLOverride: URL? { get set }
|
var elementCallBaseURLOverride: URL? { get set }
|
||||||
var fuzzyRoomListSearchEnabled: Bool { get set }
|
var fuzzyRoomListSearchEnabled: Bool { get set }
|
||||||
var pinningEnabled: Bool { get set }
|
var pinningEnabled: Bool { get set }
|
||||||
var elementCallPictureInPictureEnabled: Bool { get set }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extension AppSettings: DeveloperOptionsProtocol { }
|
extension AppSettings: DeveloperOptionsProtocol { }
|
||||||
|
|||||||
-5
@@ -69,11 +69,6 @@ struct DeveloperOptionsScreen: View {
|
|||||||
context.elementCallBaseURLOverride = url
|
context.elementCallBaseURLOverride = url
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Toggle(isOn: $context.elementCallPictureInPictureEnabled) {
|
|
||||||
Text("Picture in Picture support")
|
|
||||||
Text("Requires an Element Call deployment with support for signalling PiP availability.")
|
|
||||||
}
|
|
||||||
} header: {
|
} header: {
|
||||||
Text("Element Call")
|
Text("Element Call")
|
||||||
} footer: {
|
} footer: {
|
||||||
|
|||||||
Reference in New Issue
Block a user