Bump SDK version and fix breaking changes. (#703)

This commit is contained in:
Doug 2023-03-15 12:42:19 +00:00 committed by GitHub
parent 0ae664933b
commit 266fccefbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 8 deletions

View File

@ -95,8 +95,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/matrix-org/matrix-rust-components-swift",
"state" : {
"revision" : "8d7ace5140d0f024b9a03939cdff29c837dc5645",
"version" : "1.0.45-alpha"
"revision" : "6e9c8b7f0f68fd8e617e9d6c1ad902736899557a",
"version" : "1.0.46-alpha"
}
},
{

View File

@ -36,13 +36,13 @@ actor MediaLoader: MediaLoaderProtocol {
func loadMediaContentForSource(_ source: MediaSourceProxy) async throws -> Data {
try await enqueueLoadMediaRequest(forSource: source) {
try self.client.getMediaContent(source: source.underlyingSource)
try self.client.getMediaContent(mediaSource: source.underlyingSource)
}
}
func loadMediaThumbnailForSource(_ source: MediaSourceProxy, width: UInt, height: UInt) async throws -> Data {
try await enqueueLoadMediaRequest(forSource: source) {
try self.client.getMediaThumbnail(source: source.underlyingSource, width: UInt64(width), height: UInt64(height))
try self.client.getMediaThumbnail(mediaSource: source.underlyingSource, width: UInt64(width), height: UInt64(height))
}
}

View File

@ -57,12 +57,12 @@ final class MediaLoaderTests: XCTestCase {
private class MockMediaLoadingClient: ClientProtocol {
private(set) var numberOfInvocations = 0
func getMediaContent(source: MatrixRustSDK.MediaSource) throws -> [UInt8] {
func getMediaContent(mediaSource: MatrixRustSDK.MediaSource) throws -> [UInt8] {
numberOfInvocations += 1
return []
}
func getMediaThumbnail(source: MatrixRustSDK.MediaSource, width: UInt64, height: UInt64) throws -> [UInt8] {
func getMediaThumbnail(mediaSource: MatrixRustSDK.MediaSource, width: UInt64, height: UInt64) throws -> [UInt8] {
numberOfInvocations += 1
return []
}
@ -93,7 +93,9 @@ private class MockMediaLoadingClient: ClientProtocol {
func setAccountData(eventType: String, content: String) throws { fatalError() }
func uploadMedia(mimeType: String, content: [UInt8]) throws -> String { fatalError() }
func uploadMedia(mimeType: String, data content: [UInt8]) throws -> String { fatalError() }
func getMediaFile(source: MatrixRustSDK.MediaSource, mimeType: String) throws -> MatrixRustSDK.MediaFileHandle { fatalError() }
func getSessionVerificationController() throws -> MatrixRustSDK.SessionVerificationController { fatalError() }
@ -114,4 +116,16 @@ private class MockMediaLoadingClient: ClientProtocol {
func slidingSync() -> MatrixRustSDK.SlidingSyncBuilder { fatalError() }
func startSync(timelineLimit: UInt16?) { }
func createRoom(request: MatrixRustSDK.CreateRoomParameters) throws -> String { fatalError() }
// swiftlint:disable:next function_parameter_count
func setPusher(identifiers: MatrixRustSDK.PusherIdentifiers,
kind: MatrixRustSDK.PusherKind,
appDisplayName: String,
deviceDisplayName: String,
profileTag: String?,
lang: String) throws {
fatalError()
}
}

View File

@ -0,0 +1 @@
Bump the SDK version and fix breaking changes.

View File

@ -40,7 +40,7 @@ include:
packages:
MatrixRustSDK:
url: https://github.com/matrix-org/matrix-rust-components-swift
exactVersion: 1.0.45-alpha
exactVersion: 1.0.46-alpha
# path: ../matrix-rust-sdk
DesignKit:
path: DesignKit