mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Update the SDK and Element Call. (#4522)
* Update the SDK and Element Call. Additionally fix a bug where there was no way to navigate out of a call link after hanging up. * Remove the temporary parameters.
This commit is contained in:
@@ -9322,7 +9322,7 @@
|
||||
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
|
||||
requirement = {
|
||||
kind = exactVersion;
|
||||
version = "25.09.17-2";
|
||||
version = 25.09.18;
|
||||
};
|
||||
};
|
||||
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {
|
||||
@@ -9338,7 +9338,7 @@
|
||||
repositoryURL = "https://github.com/element-hq/element-call-swift";
|
||||
requirement = {
|
||||
kind = exactVersion;
|
||||
version = 0.15.0;
|
||||
version = "0.16.0-rc.2";
|
||||
};
|
||||
};
|
||||
821C67C9A7F8CC3FD41B28B4 /* XCRemoteSwiftPackageReference "emojibase-bindings" */ = {
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/element-hq/element-call-swift",
|
||||
"state" : {
|
||||
"revision" : "deab02926b07c276514149e1a63e60d284f31878",
|
||||
"version" : "0.15.0"
|
||||
"revision" : "2bf81a3c0a4a0cf6347290f2476a30e0ed96eb47",
|
||||
"version" : "0.16.0-rc.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -158,8 +158,8 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/element-hq/matrix-rust-components-swift",
|
||||
"state" : {
|
||||
"revision" : "d4b8e73d2ad8676fd711a2a0e7603b14ad4b0151",
|
||||
"version" : "25.9.17-2"
|
||||
"revision" : "859a9ae1428c0aae88588fd7b46e4bdc50dd7bee",
|
||||
"version" : "25.9.18"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@ enum CallScreenViewModelAction {
|
||||
struct CallScreenViewState: BindableState {
|
||||
let script: String?
|
||||
var url: URL?
|
||||
let isGenericCallLink: Bool
|
||||
|
||||
let certificateValidator: CertificateValidatorHookProtocol
|
||||
|
||||
|
||||
@@ -47,15 +47,18 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
|
||||
self.analyticsService = analyticsService
|
||||
isPictureInPictureAllowed = allowPictureInPicture
|
||||
|
||||
var isGenericCallLink = false
|
||||
switch configuration.kind {
|
||||
case .genericCallLink(let url):
|
||||
widgetDriver = GenericCallLinkWidgetDriver(url: url)
|
||||
isGenericCallLink = true
|
||||
case .roomCall(let roomProxy, let clientProxy, _, _, _, _):
|
||||
guard let deviceID = clientProxy.deviceID else { fatalError("Missing device ID for the call.") }
|
||||
widgetDriver = roomProxy.elementCallWidgetDriver(deviceID: deviceID)
|
||||
}
|
||||
|
||||
super.init(initialViewState: CallScreenViewState(script: CallScreenJavaScriptMessageName.allCasesInjectionScript,
|
||||
isGenericCallLink: isGenericCallLink,
|
||||
certificateValidator: appHooks.certificateValidatorHook))
|
||||
|
||||
elementCallService.actions
|
||||
|
||||
@@ -16,10 +16,16 @@ struct CallScreen: View {
|
||||
@ObservedObject var context: CallScreenViewModel.Context
|
||||
|
||||
var body: some View {
|
||||
content
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.background(Color.compound.bgCanvasDefault.ignoresSafeArea())
|
||||
.alert(item: $context.alertInfo)
|
||||
NavigationStack {
|
||||
content
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.background(Color.compound.bgCanvasDefault.ignoresSafeArea())
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar(context.viewState.isGenericCallLink ? .visible : .hidden, for: .navigationBar)
|
||||
.toolbar { toolbar }
|
||||
}
|
||||
.alert(item: $context.alertInfo)
|
||||
.preferredColorScheme(context.viewState.isGenericCallLink ? .dark : nil)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
@@ -33,6 +39,15 @@ struct CallScreen: View {
|
||||
.ignoresSafeArea(edges: .bottom)
|
||||
}
|
||||
}
|
||||
|
||||
var toolbar: some ToolbarContent {
|
||||
ToolbarItem(placement: .cancellationAction) {
|
||||
Button { context.send(viewAction: .navigateBack) } label: {
|
||||
Image(systemSymbol: .chevronBackward)
|
||||
.fontWeight(.semibold)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private struct CallView: UIViewRepresentable {
|
||||
|
||||
@@ -92,9 +92,7 @@ class ElementCallWidgetDriver: WidgetCapabilitiesProvider, ElementCallWidgetDriv
|
||||
rageshakeSubmitUrl: rageshakeURL,
|
||||
sentryDsn: analyticsConfiguration?.sentryDSN,
|
||||
sentryEnvironment: nil),
|
||||
config: .init(intent: intent,
|
||||
skipLobby: true, // Should be nil, but needs a new EC.
|
||||
preload: false)) // Should be nil, but needs a new EC.
|
||||
config: .init(intent: intent))
|
||||
} catch {
|
||||
MXLog.error("Failed to build widget settings: \(error)")
|
||||
return .failure(.failedBuildingWidgetSettings)
|
||||
|
||||
+2
-2
@@ -68,7 +68,7 @@ packages:
|
||||
# Element/Matrix dependencies
|
||||
MatrixRustSDK:
|
||||
url: https://github.com/element-hq/matrix-rust-components-swift
|
||||
exactVersion: 25.09.17-2
|
||||
exactVersion: 25.09.18
|
||||
# path: ../matrix-rust-sdk
|
||||
Compound:
|
||||
url: https://github.com/element-hq/compound-ios
|
||||
@@ -80,7 +80,7 @@ packages:
|
||||
# path: ../matrix-analytics-events
|
||||
EmbeddedElementCall:
|
||||
url: https://github.com/element-hq/element-call-swift
|
||||
exactVersion: 0.15.0
|
||||
exactVersion: 0.16.0-rc.2
|
||||
Emojibase:
|
||||
url: https://github.com/matrix-org/emojibase-bindings
|
||||
minorVersion: 1.4.2
|
||||
|
||||
Reference in New Issue
Block a user