Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the RustSDK to 25.01.27, adopt the new emoji boosting API. #3708

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions ElementX.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,6 @@
E3CA565A4B9704F191B191F0 /* JoinedRoomSize+MemberCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = CBF9AEA706926DD0DA2B954C /* JoinedRoomSize+MemberCount.swift */; };
E3E1E255DC8CB34BD8573E0D /* UserIndicatorControllerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = A12D3B1BCF920880CA8BBB6B /* UserIndicatorControllerProtocol.swift */; };
E3EBC3BF7CE3960B41757BAA /* Publisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7310D8DFE01AF45F0689C3AA /* Publisher.swift */; };
E45C9FA22BC13B477FD3B4AC /* EmojiDetection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D99730313BEBF08CDE81EE3 /* EmojiDetection.swift */; };
E468CC731C3F4D678499E52F /* LAContextMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1BA5A62DA4B543827FF82354 /* LAContextMock.swift */; };
E481C8FDCB6C089963C95344 /* DeviceKit in Frameworks */ = {isa = PBXBuildFile; productRef = BC01130651CB23340B899032 /* DeviceKit */; };
E49F74BD93230BDEFFE5EA51 /* RoomNotificationSettingsScreenViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58D295F0081084F38DB20893 /* RoomNotificationSettingsScreenViewModelTests.swift */; };
Expand Down Expand Up @@ -1216,7 +1215,6 @@
F66BBBE51B258BBB0B918C68 /* MatrixRustSDK in Frameworks */ = {isa = PBXBuildFile; productRef = C79D91A7F9F378CECEF64B5A /* MatrixRustSDK */; };
F66BCCC825D6CA51724A94D0 /* MediaPlayerProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8A1F98AE670377B20679FF5 /* MediaPlayerProvider.swift */; };
F6767F17D538578B370DD805 /* TimelineItemBubbleBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE739A6836E86E3780748477 /* TimelineItemBubbleBackground.swift */; };
F697284B9B5F2C00CFEA3B12 /* EmojiDetectionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A58E93D91DE3288010390DEE /* EmojiDetectionTests.swift */; };
F6BF52CB027393EE03CEC523 /* TimelineMediaPreviewViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C1F000589F2CEE6B03ECFAB /* TimelineMediaPreviewViewModelTests.swift */; };
F6DFA23885980118AD7359C5 /* NotificationSettingsScreenCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2389732B0E115A999A069083 /* NotificationSettingsScreenCoordinator.swift */; };
F6F49E37272AD7397CD29A01 /* HomeScreenViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 505208F28007C0FEC14E1FF0 /* HomeScreenViewModelTests.swift */; };
Expand Down Expand Up @@ -1797,7 +1795,6 @@
5CEEAE1BFAACD6C96B6DB731 /* PHGPostHogProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PHGPostHogProtocol.swift; sourceTree = "<group>"; };
5D26A086A8278D39B5756D6F /* project.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = project.yml; sourceTree = "<group>"; };
5D53754227CEBD06358956D7 /* PinnedEventsTimelineScreenCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinnedEventsTimelineScreenCoordinator.swift; sourceTree = "<group>"; };
5D99730313BEBF08CDE81EE3 /* EmojiDetection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiDetection.swift; sourceTree = "<group>"; };
5DE8D25D6A91030175D52A20 /* RoomTimelineItemProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoomTimelineItemProperties.swift; sourceTree = "<group>"; };
5E33FD32BBC44D703C7AE4F9 /* TextBasedRoomTimelineItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextBasedRoomTimelineItem.swift; sourceTree = "<group>"; };
5E75948AA1FE1D1A7809931F /* AuthenticationServiceProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationServiceProtocol.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2115,7 +2112,6 @@
A436057DBEA1A23CA8CB1FD7 /* UIFont+AttributedStringBuilder.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIFont+AttributedStringBuilder.h"; sourceTree = "<group>"; };
A443FAE2EE820A5790C35C8D /* et */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = et; path = et.lproj/Localizable.strings; sourceTree = "<group>"; };
A54AAF72E821B4084B7E4298 /* PinnedEventsTimelineFlowCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinnedEventsTimelineFlowCoordinator.swift; sourceTree = "<group>"; };
A58E93D91DE3288010390DEE /* EmojiDetectionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiDetectionTests.swift; sourceTree = "<group>"; };
A6702BC84D3CC2421D78CD4E /* WebRegistrationScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebRegistrationScreenViewModel.swift; sourceTree = "<group>"; };
A69869844D2B6F5BD9AABF85 /* OIDCConfigurationProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OIDCConfigurationProxy.swift; sourceTree = "<group>"; };
A6B19D10B102956066AF117B /* PollOptionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollOptionView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -4186,7 +4182,6 @@
D77F75B3E9F99864048A422A /* DeactivateAccountScreenViewModelTests.swift */,
6D0A27607AB09784C8501B5C /* DeveloperOptionsScreenViewModelTests.swift */,
906451FB8CF27C628152BF7A /* EditRoomAddressScreenViewModelTests.swift */,
A58E93D91DE3288010390DEE /* EmojiDetectionTests.swift */,
099F2D36C141D845A445B1E6 /* EmojiProviderTests.swift */,
84B7A28A6606D58D1E38C55A /* ExpiringTaskRunnerTests.swift */,
1A7ED2EF5BDBAD2A7DBC4636 /* GeoURITests.swift */,
Expand Down Expand Up @@ -5259,7 +5254,6 @@
AE52983FAFB4E0998C00EE8A /* CancellableTask.swift */,
127A57D053CE8C87B5EFB089 /* Consumable.swift */,
127C8472672A5BA09EF1ACF8 /* CurrentValuePublisher.swift */,
5D99730313BEBF08CDE81EE3 /* EmojiDetection.swift */,
7B25F959A434BB9923A3223F /* ExpiringTaskRunner.swift */,
6A580295A56B55A856CC4084 /* InfoPlistReader.swift */,
6AD1A853D605C2146B0DC028 /* MatrixEntityRegex.swift */,
Expand Down Expand Up @@ -6657,7 +6651,6 @@
80F6C8EFCA4564B67F0D34B0 /* DeactivateAccountScreenViewModelTests.swift in Sources */,
864C69CF951BF36D25BE0C03 /* DeveloperOptionsScreenViewModelTests.swift in Sources */,
EDB6915EC953BB2A44AA608E /* EditRoomAddressScreenViewModelTests.swift in Sources */,
F697284B9B5F2C00CFEA3B12 /* EmojiDetectionTests.swift in Sources */,
25618589E0DE0F1E95FC7B5C /* EmojiProviderTests.swift in Sources */,
71B62C48B8079D49F3FBC845 /* ExpiringTaskRunnerTests.swift in Sources */,
07756D532EFE33DD1FA258E5 /* GeoURITests.swift in Sources */,
Expand Down Expand Up @@ -7003,7 +6996,6 @@
370AF5BFCD4384DD455479B6 /* ElementCallWidgetDriverProtocol.swift in Sources */,
3F997171C3C79A45E92BF9EF /* ElementWellKnown.swift in Sources */,
7C1A7B594B2F8143F0DD0005 /* ElementXAttributeScope.swift in Sources */,
E45C9FA22BC13B477FD3B4AC /* EmojiDetection.swift in Sources */,
3A08584ECDD4A4541DBF21F8 /* EmojiLoaderProtocol.swift in Sources */,
340D39DB87F3800D53A6A621 /* EmojiPickerScreen.swift in Sources */,
C1910A16BDF131FECA77BE22 /* EmojiPickerScreenCoordinator.swift in Sources */,
Expand Down Expand Up @@ -8508,7 +8500,7 @@
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
requirement = {
kind = exactVersion;
version = 25.01.22;
version = 27.01.22;
};
};
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" : "0851aa6271d6aee77612f87638a5e30e45b3a7f8",
"version" : "25.1.22"
"revision" : "d6c94a77a3f97f698682ca049a89010542d0b068",
"version" : "27.1.22"
}
},
{
Expand Down
268 changes: 268 additions & 0 deletions ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8088,6 +8088,71 @@ open class LazyTimelineItemProviderSDKMock: MatrixRustSDK.LazyTimelineItemProvid

fileprivate var pointer: UnsafeMutableRawPointer!

//MARK: - containsOnlyEmojis

var containsOnlyEmojisUnderlyingCallsCount = 0
open var containsOnlyEmojisCallsCount: Int {
get {
if Thread.isMainThread {
return containsOnlyEmojisUnderlyingCallsCount
} else {
var returnValue: Int? = nil
DispatchQueue.main.sync {
returnValue = containsOnlyEmojisUnderlyingCallsCount
}

return returnValue!
}
}
set {
if Thread.isMainThread {
containsOnlyEmojisUnderlyingCallsCount = newValue
} else {
DispatchQueue.main.sync {
containsOnlyEmojisUnderlyingCallsCount = newValue
}
}
}
}
open var containsOnlyEmojisCalled: Bool {
return containsOnlyEmojisCallsCount > 0
}

var containsOnlyEmojisUnderlyingReturnValue: Bool!
open var containsOnlyEmojisReturnValue: Bool! {
get {
if Thread.isMainThread {
return containsOnlyEmojisUnderlyingReturnValue
} else {
var returnValue: Bool? = nil
DispatchQueue.main.sync {
returnValue = containsOnlyEmojisUnderlyingReturnValue
}

return returnValue!
}
}
set {
if Thread.isMainThread {
containsOnlyEmojisUnderlyingReturnValue = newValue
} else {
DispatchQueue.main.sync {
containsOnlyEmojisUnderlyingReturnValue = newValue
}
}
}
}
open var containsOnlyEmojisClosure: (() -> Bool)?

open override func containsOnlyEmojis() -> Bool {
containsOnlyEmojisCallsCount += 1
if let containsOnlyEmojisClosure = containsOnlyEmojisClosure {
return containsOnlyEmojisClosure()
} else {
return containsOnlyEmojisReturnValue
}
}

//MARK: - debugInfo

var debugInfoUnderlyingCallsCount = 0
Expand Down Expand Up @@ -13988,6 +14053,52 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
try await sendCallNotificationIfNeededClosure?()
}

//MARK: - sendLiveLocation

open var sendLiveLocationGeoUriThrowableError: Error?
var sendLiveLocationGeoUriUnderlyingCallsCount = 0
open var sendLiveLocationGeoUriCallsCount: Int {
get {
if Thread.isMainThread {
return sendLiveLocationGeoUriUnderlyingCallsCount
} else {
var returnValue: Int? = nil
DispatchQueue.main.sync {
returnValue = sendLiveLocationGeoUriUnderlyingCallsCount
}

return returnValue!
}
}
set {
if Thread.isMainThread {
sendLiveLocationGeoUriUnderlyingCallsCount = newValue
} else {
DispatchQueue.main.sync {
sendLiveLocationGeoUriUnderlyingCallsCount = newValue
}
}
}
}
open var sendLiveLocationGeoUriCalled: Bool {
return sendLiveLocationGeoUriCallsCount > 0
}
open var sendLiveLocationGeoUriReceivedGeoUri: String?
open var sendLiveLocationGeoUriReceivedInvocations: [String] = []
open var sendLiveLocationGeoUriClosure: ((String) async throws -> Void)?

open override func sendLiveLocation(geoUri: String) async throws {
if let error = sendLiveLocationGeoUriThrowableError {
throw error
}
sendLiveLocationGeoUriCallsCount += 1
sendLiveLocationGeoUriReceivedGeoUri = geoUri
DispatchQueue.main.async {
self.sendLiveLocationGeoUriReceivedInvocations.append(geoUri)
}
try await sendLiveLocationGeoUriClosure?(geoUri)
}

//MARK: - sendRaw

open var sendRawEventTypeContentThrowableError: Error?
Expand Down Expand Up @@ -14264,6 +14375,92 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
try await setUnreadFlagNewValueClosure?(newValue)
}

//MARK: - startLiveLocationShare

open var startLiveLocationShareDurationMillisThrowableError: Error?
var startLiveLocationShareDurationMillisUnderlyingCallsCount = 0
open var startLiveLocationShareDurationMillisCallsCount: Int {
get {
if Thread.isMainThread {
return startLiveLocationShareDurationMillisUnderlyingCallsCount
} else {
var returnValue: Int? = nil
DispatchQueue.main.sync {
returnValue = startLiveLocationShareDurationMillisUnderlyingCallsCount
}

return returnValue!
}
}
set {
if Thread.isMainThread {
startLiveLocationShareDurationMillisUnderlyingCallsCount = newValue
} else {
DispatchQueue.main.sync {
startLiveLocationShareDurationMillisUnderlyingCallsCount = newValue
}
}
}
}
open var startLiveLocationShareDurationMillisCalled: Bool {
return startLiveLocationShareDurationMillisCallsCount > 0
}
open var startLiveLocationShareDurationMillisReceivedDurationMillis: UInt64?
open var startLiveLocationShareDurationMillisReceivedInvocations: [UInt64] = []
open var startLiveLocationShareDurationMillisClosure: ((UInt64) async throws -> Void)?

open override func startLiveLocationShare(durationMillis: UInt64) async throws {
if let error = startLiveLocationShareDurationMillisThrowableError {
throw error
}
startLiveLocationShareDurationMillisCallsCount += 1
startLiveLocationShareDurationMillisReceivedDurationMillis = durationMillis
DispatchQueue.main.async {
self.startLiveLocationShareDurationMillisReceivedInvocations.append(durationMillis)
}
try await startLiveLocationShareDurationMillisClosure?(durationMillis)
}

//MARK: - stopLiveLocationShare

open var stopLiveLocationShareThrowableError: Error?
var stopLiveLocationShareUnderlyingCallsCount = 0
open var stopLiveLocationShareCallsCount: Int {
get {
if Thread.isMainThread {
return stopLiveLocationShareUnderlyingCallsCount
} else {
var returnValue: Int? = nil
DispatchQueue.main.sync {
returnValue = stopLiveLocationShareUnderlyingCallsCount
}

return returnValue!
}
}
set {
if Thread.isMainThread {
stopLiveLocationShareUnderlyingCallsCount = newValue
} else {
DispatchQueue.main.sync {
stopLiveLocationShareUnderlyingCallsCount = newValue
}
}
}
}
open var stopLiveLocationShareCalled: Bool {
return stopLiveLocationShareCallsCount > 0
}
open var stopLiveLocationShareClosure: (() async throws -> Void)?

open override func stopLiveLocationShare() async throws {
if let error = stopLiveLocationShareThrowableError {
throw error
}
stopLiveLocationShareCallsCount += 1
try await stopLiveLocationShareClosure?()
}

//MARK: - subscribeToIdentityStatusChanges

var subscribeToIdentityStatusChangesListenerUnderlyingCallsCount = 0
Expand Down Expand Up @@ -14410,6 +14607,77 @@ open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
}
}

//MARK: - subscribeToLiveLocationShares

var subscribeToLiveLocationSharesListenerUnderlyingCallsCount = 0
open var subscribeToLiveLocationSharesListenerCallsCount: Int {
get {
if Thread.isMainThread {
return subscribeToLiveLocationSharesListenerUnderlyingCallsCount
} else {
var returnValue: Int? = nil
DispatchQueue.main.sync {
returnValue = subscribeToLiveLocationSharesListenerUnderlyingCallsCount
}

return returnValue!
}
}
set {
if Thread.isMainThread {
subscribeToLiveLocationSharesListenerUnderlyingCallsCount = newValue
} else {
DispatchQueue.main.sync {
subscribeToLiveLocationSharesListenerUnderlyingCallsCount = newValue
}
}
}
}
open var subscribeToLiveLocationSharesListenerCalled: Bool {
return subscribeToLiveLocationSharesListenerCallsCount > 0
}
open var subscribeToLiveLocationSharesListenerReceivedListener: LiveLocationShareListener?
open var subscribeToLiveLocationSharesListenerReceivedInvocations: [LiveLocationShareListener] = []

var subscribeToLiveLocationSharesListenerUnderlyingReturnValue: TaskHandle!
open var subscribeToLiveLocationSharesListenerReturnValue: TaskHandle! {
get {
if Thread.isMainThread {
return subscribeToLiveLocationSharesListenerUnderlyingReturnValue
} else {
var returnValue: TaskHandle? = nil
DispatchQueue.main.sync {
returnValue = subscribeToLiveLocationSharesListenerUnderlyingReturnValue
}

return returnValue!
}
}
set {
if Thread.isMainThread {
subscribeToLiveLocationSharesListenerUnderlyingReturnValue = newValue
} else {
DispatchQueue.main.sync {
subscribeToLiveLocationSharesListenerUnderlyingReturnValue = newValue
}
}
}
}
open var subscribeToLiveLocationSharesListenerClosure: ((LiveLocationShareListener) -> TaskHandle)?

open override func subscribeToLiveLocationShares(listener: LiveLocationShareListener) -> TaskHandle {
subscribeToLiveLocationSharesListenerCallsCount += 1
subscribeToLiveLocationSharesListenerReceivedListener = listener
DispatchQueue.main.async {
self.subscribeToLiveLocationSharesListenerReceivedInvocations.append(listener)
}
if let subscribeToLiveLocationSharesListenerClosure = subscribeToLiveLocationSharesListenerClosure {
return subscribeToLiveLocationSharesListenerClosure(listener)
} else {
return subscribeToLiveLocationSharesListenerReturnValue
}
}

//MARK: - subscribeToRoomInfoUpdates

var subscribeToRoomInfoUpdatesListenerUnderlyingCallsCount = 0
Expand Down
Loading
Loading