mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:44:05 +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";
|
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = exactVersion;
|
kind = exactVersion;
|
||||||
version = "25.09.17-2";
|
version = 25.09.18;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {
|
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {
|
||||||
@@ -9338,7 +9338,7 @@
|
|||||||
repositoryURL = "https://github.com/element-hq/element-call-swift";
|
repositoryURL = "https://github.com/element-hq/element-call-swift";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = exactVersion;
|
kind = exactVersion;
|
||||||
version = 0.15.0;
|
version = "0.16.0-rc.2";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
821C67C9A7F8CC3FD41B28B4 /* XCRemoteSwiftPackageReference "emojibase-bindings" */ = {
|
821C67C9A7F8CC3FD41B28B4 /* XCRemoteSwiftPackageReference "emojibase-bindings" */ = {
|
||||||
|
|||||||
@@ -59,8 +59,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/element-hq/element-call-swift",
|
"location" : "https://github.com/element-hq/element-call-swift",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "deab02926b07c276514149e1a63e60d284f31878",
|
"revision" : "2bf81a3c0a4a0cf6347290f2476a30e0ed96eb47",
|
||||||
"version" : "0.15.0"
|
"version" : "0.16.0-rc.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -158,8 +158,8 @@
|
|||||||
"kind" : "remoteSourceControl",
|
"kind" : "remoteSourceControl",
|
||||||
"location" : "https://github.com/element-hq/matrix-rust-components-swift",
|
"location" : "https://github.com/element-hq/matrix-rust-components-swift",
|
||||||
"state" : {
|
"state" : {
|
||||||
"revision" : "d4b8e73d2ad8676fd711a2a0e7603b14ad4b0151",
|
"revision" : "859a9ae1428c0aae88588fd7b46e4bdc50dd7bee",
|
||||||
"version" : "25.9.17-2"
|
"version" : "25.9.18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ enum CallScreenViewModelAction {
|
|||||||
struct CallScreenViewState: BindableState {
|
struct CallScreenViewState: BindableState {
|
||||||
let script: String?
|
let script: String?
|
||||||
var url: URL?
|
var url: URL?
|
||||||
|
let isGenericCallLink: Bool
|
||||||
|
|
||||||
let certificateValidator: CertificateValidatorHookProtocol
|
let certificateValidator: CertificateValidatorHookProtocol
|
||||||
|
|
||||||
|
|||||||
@@ -47,15 +47,18 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
|
|||||||
self.analyticsService = analyticsService
|
self.analyticsService = analyticsService
|
||||||
isPictureInPictureAllowed = allowPictureInPicture
|
isPictureInPictureAllowed = allowPictureInPicture
|
||||||
|
|
||||||
|
var isGenericCallLink = false
|
||||||
switch configuration.kind {
|
switch configuration.kind {
|
||||||
case .genericCallLink(let url):
|
case .genericCallLink(let url):
|
||||||
widgetDriver = GenericCallLinkWidgetDriver(url: url)
|
widgetDriver = GenericCallLinkWidgetDriver(url: url)
|
||||||
|
isGenericCallLink = true
|
||||||
case .roomCall(let roomProxy, let clientProxy, _, _, _, _):
|
case .roomCall(let roomProxy, let clientProxy, _, _, _, _):
|
||||||
guard let deviceID = clientProxy.deviceID else { fatalError("Missing device ID for the call.") }
|
guard let deviceID = clientProxy.deviceID else { fatalError("Missing device ID for the call.") }
|
||||||
widgetDriver = roomProxy.elementCallWidgetDriver(deviceID: deviceID)
|
widgetDriver = roomProxy.elementCallWidgetDriver(deviceID: deviceID)
|
||||||
}
|
}
|
||||||
|
|
||||||
super.init(initialViewState: CallScreenViewState(script: CallScreenJavaScriptMessageName.allCasesInjectionScript,
|
super.init(initialViewState: CallScreenViewState(script: CallScreenJavaScriptMessageName.allCasesInjectionScript,
|
||||||
|
isGenericCallLink: isGenericCallLink,
|
||||||
certificateValidator: appHooks.certificateValidatorHook))
|
certificateValidator: appHooks.certificateValidatorHook))
|
||||||
|
|
||||||
elementCallService.actions
|
elementCallService.actions
|
||||||
|
|||||||
@@ -16,10 +16,16 @@ struct CallScreen: View {
|
|||||||
@ObservedObject var context: CallScreenViewModel.Context
|
@ObservedObject var context: CallScreenViewModel.Context
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
content
|
NavigationStack {
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
content
|
||||||
.background(Color.compound.bgCanvasDefault.ignoresSafeArea())
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
.alert(item: $context.alertInfo)
|
.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
|
@ViewBuilder
|
||||||
@@ -33,6 +39,15 @@ struct CallScreen: View {
|
|||||||
.ignoresSafeArea(edges: .bottom)
|
.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 {
|
private struct CallView: UIViewRepresentable {
|
||||||
|
|||||||
@@ -92,9 +92,7 @@ class ElementCallWidgetDriver: WidgetCapabilitiesProvider, ElementCallWidgetDriv
|
|||||||
rageshakeSubmitUrl: rageshakeURL,
|
rageshakeSubmitUrl: rageshakeURL,
|
||||||
sentryDsn: analyticsConfiguration?.sentryDSN,
|
sentryDsn: analyticsConfiguration?.sentryDSN,
|
||||||
sentryEnvironment: nil),
|
sentryEnvironment: nil),
|
||||||
config: .init(intent: intent,
|
config: .init(intent: intent))
|
||||||
skipLobby: true, // Should be nil, but needs a new EC.
|
|
||||||
preload: false)) // Should be nil, but needs a new EC.
|
|
||||||
} catch {
|
} catch {
|
||||||
MXLog.error("Failed to build widget settings: \(error)")
|
MXLog.error("Failed to build widget settings: \(error)")
|
||||||
return .failure(.failedBuildingWidgetSettings)
|
return .failure(.failedBuildingWidgetSettings)
|
||||||
|
|||||||
+2
-2
@@ -68,7 +68,7 @@ packages:
|
|||||||
# Element/Matrix dependencies
|
# Element/Matrix dependencies
|
||||||
MatrixRustSDK:
|
MatrixRustSDK:
|
||||||
url: https://github.com/element-hq/matrix-rust-components-swift
|
url: https://github.com/element-hq/matrix-rust-components-swift
|
||||||
exactVersion: 25.09.17-2
|
exactVersion: 25.09.18
|
||||||
# path: ../matrix-rust-sdk
|
# path: ../matrix-rust-sdk
|
||||||
Compound:
|
Compound:
|
||||||
url: https://github.com/element-hq/compound-ios
|
url: https://github.com/element-hq/compound-ios
|
||||||
@@ -80,7 +80,7 @@ packages:
|
|||||||
# path: ../matrix-analytics-events
|
# path: ../matrix-analytics-events
|
||||||
EmbeddedElementCall:
|
EmbeddedElementCall:
|
||||||
url: https://github.com/element-hq/element-call-swift
|
url: https://github.com/element-hq/element-call-swift
|
||||||
exactVersion: 0.15.0
|
exactVersion: 0.16.0-rc.2
|
||||||
Emojibase:
|
Emojibase:
|
||||||
url: https://github.com/matrix-org/emojibase-bindings
|
url: https://github.com/matrix-org/emojibase-bindings
|
||||||
minorVersion: 1.4.2
|
minorVersion: 1.4.2
|
||||||
|
|||||||
Reference in New Issue
Block a user