Skip to content

Commit

Permalink
updated SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
Velin92 committed Jul 26, 2024
1 parent 1218e94 commit e920432
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 58 deletions.
2 changes: 1 addition & 1 deletion ElementX.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7501,7 +7501,7 @@
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
requirement = {
kind = exactVersion;
version = 1.0.28;
version = 1.0.29;
};
};
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/element-hq/matrix-rust-components-swift",
"state" : {
"revision" : "1a1cbc9d9d43a188d9b07fe00a141d02f7c43c7c",
"version" : "1.0.28"
"revision" : "d0226f669526e908d45bf9b5682f372d84cf9ffe",
"version" : "1.0.29"
}
},
{
Expand Down
104 changes: 52 additions & 52 deletions ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18568,76 +18568,76 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {

//MARK: - pinEvent

open var pinEventEventIdStrThrowableError: Error?
var pinEventEventIdStrUnderlyingCallsCount = 0
open var pinEventEventIdStrCallsCount: Int {
open var pinEventEventIdThrowableError: Error?
var pinEventEventIdUnderlyingCallsCount = 0
open var pinEventEventIdCallsCount: Int {
get {
if Thread.isMainThread {
return pinEventEventIdStrUnderlyingCallsCount
return pinEventEventIdUnderlyingCallsCount
} else {
var returnValue: Int? = nil
DispatchQueue.main.sync {
returnValue = pinEventEventIdStrUnderlyingCallsCount
returnValue = pinEventEventIdUnderlyingCallsCount
}

return returnValue!
}
}
set {
if Thread.isMainThread {
pinEventEventIdStrUnderlyingCallsCount = newValue
pinEventEventIdUnderlyingCallsCount = newValue
} else {
DispatchQueue.main.sync {
pinEventEventIdStrUnderlyingCallsCount = newValue
pinEventEventIdUnderlyingCallsCount = newValue
}
}
}
}
open var pinEventEventIdStrCalled: Bool {
return pinEventEventIdStrCallsCount > 0
open var pinEventEventIdCalled: Bool {
return pinEventEventIdCallsCount > 0
}
open var pinEventEventIdStrReceivedEventIdStr: String?
open var pinEventEventIdStrReceivedInvocations: [String] = []
open var pinEventEventIdReceivedEventId: String?
open var pinEventEventIdReceivedInvocations: [String] = []

var pinEventEventIdStrUnderlyingReturnValue: Bool!
open var pinEventEventIdStrReturnValue: Bool! {
var pinEventEventIdUnderlyingReturnValue: Bool!
open var pinEventEventIdReturnValue: Bool! {
get {
if Thread.isMainThread {
return pinEventEventIdStrUnderlyingReturnValue
return pinEventEventIdUnderlyingReturnValue
} else {
var returnValue: Bool? = nil
DispatchQueue.main.sync {
returnValue = pinEventEventIdStrUnderlyingReturnValue
returnValue = pinEventEventIdUnderlyingReturnValue
}

return returnValue!
}
}
set {
if Thread.isMainThread {
pinEventEventIdStrUnderlyingReturnValue = newValue
pinEventEventIdUnderlyingReturnValue = newValue
} else {
DispatchQueue.main.sync {
pinEventEventIdStrUnderlyingReturnValue = newValue
pinEventEventIdUnderlyingReturnValue = newValue
}
}
}
}
open var pinEventEventIdStrClosure: ((String) async throws -> Bool)?
open var pinEventEventIdClosure: ((String) async throws -> Bool)?

open override func pinEvent(eventIdStr: String) async throws -> Bool {
if let error = pinEventEventIdStrThrowableError {
open override func pinEvent(eventId: String) async throws -> Bool {
if let error = pinEventEventIdThrowableError {
throw error
}
pinEventEventIdStrCallsCount += 1
pinEventEventIdStrReceivedEventIdStr = eventIdStr
pinEventEventIdCallsCount += 1
pinEventEventIdReceivedEventId = eventId
DispatchQueue.main.async {
self.pinEventEventIdStrReceivedInvocations.append(eventIdStr)
self.pinEventEventIdReceivedInvocations.append(eventId)
}
if let pinEventEventIdStrClosure = pinEventEventIdStrClosure {
return try await pinEventEventIdStrClosure(eventIdStr)
if let pinEventEventIdClosure = pinEventEventIdClosure {
return try await pinEventEventIdClosure(eventId)
} else {
return pinEventEventIdStrReturnValue
return pinEventEventIdReturnValue
}
}

Expand Down Expand Up @@ -19491,76 +19491,76 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {

//MARK: - unpinEvent

open var unpinEventEventIdStrThrowableError: Error?
var unpinEventEventIdStrUnderlyingCallsCount = 0
open var unpinEventEventIdStrCallsCount: Int {
open var unpinEventEventIdThrowableError: Error?
var unpinEventEventIdUnderlyingCallsCount = 0
open var unpinEventEventIdCallsCount: Int {
get {
if Thread.isMainThread {
return unpinEventEventIdStrUnderlyingCallsCount
return unpinEventEventIdUnderlyingCallsCount
} else {
var returnValue: Int? = nil
DispatchQueue.main.sync {
returnValue = unpinEventEventIdStrUnderlyingCallsCount
returnValue = unpinEventEventIdUnderlyingCallsCount
}

return returnValue!
}
}
set {
if Thread.isMainThread {
unpinEventEventIdStrUnderlyingCallsCount = newValue
unpinEventEventIdUnderlyingCallsCount = newValue
} else {
DispatchQueue.main.sync {
unpinEventEventIdStrUnderlyingCallsCount = newValue
unpinEventEventIdUnderlyingCallsCount = newValue
}
}
}
}
open var unpinEventEventIdStrCalled: Bool {
return unpinEventEventIdStrCallsCount > 0
open var unpinEventEventIdCalled: Bool {
return unpinEventEventIdCallsCount > 0
}
open var unpinEventEventIdStrReceivedEventIdStr: String?
open var unpinEventEventIdStrReceivedInvocations: [String] = []
open var unpinEventEventIdReceivedEventId: String?
open var unpinEventEventIdReceivedInvocations: [String] = []

var unpinEventEventIdStrUnderlyingReturnValue: Bool!
open var unpinEventEventIdStrReturnValue: Bool! {
var unpinEventEventIdUnderlyingReturnValue: Bool!
open var unpinEventEventIdReturnValue: Bool! {
get {
if Thread.isMainThread {
return unpinEventEventIdStrUnderlyingReturnValue
return unpinEventEventIdUnderlyingReturnValue
} else {
var returnValue: Bool? = nil
DispatchQueue.main.sync {
returnValue = unpinEventEventIdStrUnderlyingReturnValue
returnValue = unpinEventEventIdUnderlyingReturnValue
}

return returnValue!
}
}
set {
if Thread.isMainThread {
unpinEventEventIdStrUnderlyingReturnValue = newValue
unpinEventEventIdUnderlyingReturnValue = newValue
} else {
DispatchQueue.main.sync {
unpinEventEventIdStrUnderlyingReturnValue = newValue
unpinEventEventIdUnderlyingReturnValue = newValue
}
}
}
}
open var unpinEventEventIdStrClosure: ((String) async throws -> Bool)?
open var unpinEventEventIdClosure: ((String) async throws -> Bool)?

open override func unpinEvent(eventIdStr: String) async throws -> Bool {
if let error = unpinEventEventIdStrThrowableError {
open override func unpinEvent(eventId: String) async throws -> Bool {
if let error = unpinEventEventIdThrowableError {
throw error
}
unpinEventEventIdStrCallsCount += 1
unpinEventEventIdStrReceivedEventIdStr = eventIdStr
unpinEventEventIdCallsCount += 1
unpinEventEventIdReceivedEventId = eventId
DispatchQueue.main.async {
self.unpinEventEventIdStrReceivedInvocations.append(eventIdStr)
self.unpinEventEventIdReceivedInvocations.append(eventId)
}
if let unpinEventEventIdStrClosure = unpinEventEventIdStrClosure {
return try await unpinEventEventIdStrClosure(eventIdStr)
if let unpinEventEventIdClosure = unpinEventEventIdClosure {
return try await unpinEventEventIdClosure(eventId)
} else {
return unpinEventEventIdStrReturnValue
return unpinEventEventIdReturnValue
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions ElementX/Sources/Services/Timeline/TimelineProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ final class TimelineProxy: TimelineProxyProtocol {

func pin(eventID: String) async -> Result<Bool, TimelineProxyError> {
do {
return try await .success(timeline.pinEvent(eventIdStr: eventID))
return try await .success(timeline.pinEvent(eventId: eventID))
} catch {
MXLog.error("Failed to pin the event \(eventID) with error: \(error)")
return .failure(.sdkError(error))
Expand All @@ -213,7 +213,7 @@ final class TimelineProxy: TimelineProxyProtocol {

func unpin(eventID: String) async -> Result<Bool, TimelineProxyError> {
do {
return try await .success(timeline.unpinEvent(eventIdStr: eventID))
return try await .success(timeline.unpinEvent(eventId: eventID))
} catch {
MXLog.error("Failed to unpin the event \(eventID) with error: \(error)")
return .failure(.sdkError(error))
Expand Down
2 changes: 1 addition & 1 deletion project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ packages:
# Element/Matrix dependencies
MatrixRustSDK:
url: https://github.com/element-hq/matrix-rust-components-swift
exactVersion: 1.0.28
exactVersion: 1.0.29
# path: ../matrix-rust-sdk
Compound:
url: https://github.com/element-hq/compound-ios
Expand Down

0 comments on commit e920432

Please sign in to comment.