Bump the RustSDK to v25.01.15 and fix (most) concurrency sendability warnings in the generated mocks.

This commit is contained in:
Stefan Ceriu 2025-01-15 12:29:17 +02:00 committed by Stefan Ceriu
parent e3ad925285
commit 0bcc59ae0a
20 changed files with 209 additions and 116 deletions

View File

@ -2486,6 +2486,7 @@
F3A1AB5A84D843B6AC8D5F1E /* AuthenticationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationService.swift; sourceTree = "<group>"; };
F3C7252B3461D06175D975A4 /* et */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = et; path = et.lproj/SAS.strings; sourceTree = "<group>"; };
F3EAE3E9D5EF4A6D5D9C6CFD /* EmojiPickerScreenViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmojiPickerScreenViewModel.swift; sourceTree = "<group>"; };
F409D44C2E6BE50462E82F8A /* en-US */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "en-US"; path = "en-US.lproj/Localizable.strings"; sourceTree = "<group>"; };
F4469F6AE311BDC439B3A5EC /* UserSessionMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserSessionMock.swift; sourceTree = "<group>"; };
F4548A9BDE5CB3AB864BCA9F /* EffectsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EffectsView.swift; sourceTree = "<group>"; };
F506C6ADB1E1DA6638078E11 /* UITests.xctest */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = wrapper.cfbundle; path = UITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
@ -6230,6 +6231,7 @@
de,
el,
en,
"en-US",
es,
et,
fa,
@ -7790,6 +7792,7 @@
35AFCF4C05DEED04E3DB1A16 /* de */,
113356152C099951A6D17D85 /* el */,
CACA846B3E3E9A521D98B178 /* en */,
F409D44C2E6BE50462E82F8A /* en-US */,
CBBCC6E74774E79B599625D0 /* es */,
A443FAE2EE820A5790C35C8D /* et */,
A9873374E72AA53260AE90A2 /* fa */,
@ -8459,7 +8462,7 @@
repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift";
requirement = {
kind = exactVersion;
version = 25.01.13;
version = 25.01.15;
};
};
701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = {

View File

@ -149,8 +149,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/element-hq/matrix-rust-components-swift",
"state" : {
"revision" : "0e9afdf46c3128a0dc13c2d2fcee32ad3298a1a6",
"version" : "25.1.13"
"revision" : "f7460b89b3d7789da40c7af53f3b3e01ec209932",
"version" : "25.1.15"
}
},
{

View File

@ -28,6 +28,7 @@ extension EventTimelineItem {
timestamp: 0,
reactions: [],
localSendState: nil,
localCreatedAt: nil,
readReceipts: [:],
origin: nil,
canBeRepliedTo: false,

View File

@ -1,16 +1,19 @@
// Generated using Sourcery 2.2.5 https://github.com/krzysztofzablocki/Sourcery
// Generated using Sourcery 2.2.6 https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
// swiftlint:disable all
@preconcurrency import Combine
@preconcurrency import SwiftUI
@preconcurrency import MatrixRustSDK
import AnalyticsEvents
import AVFoundation
import Combine
import Foundation
import LocalAuthentication
import MatrixRustSDK
import Photos
import SwiftUI
class AnalyticsClientMock: AnalyticsClientProtocol {
class AnalyticsClientMock: AnalyticsClientProtocol, @unchecked Sendable {
var isRunning: Bool {
get { return underlyingIsRunning }
set(value) { underlyingIsRunning = value }
@ -252,7 +255,7 @@ class AnalyticsClientMock: AnalyticsClientProtocol {
updateUserPropertiesClosure?(event)
}
}
class AppLockServiceMock: AppLockServiceProtocol {
class AppLockServiceMock: AppLockServiceProtocol, @unchecked Sendable {
var isMandatory: Bool {
get { return underlyingIsMandatory }
set(value) { underlyingIsMandatory = value }
@ -803,7 +806,7 @@ class AppLockServiceMock: AppLockServiceProtocol {
}
}
}
class AppMediatorMock: AppMediatorProtocol {
class AppMediatorMock: AppMediatorProtocol, @unchecked Sendable {
var windowManager: WindowManagerProtocol {
get { return underlyingWindowManager }
set(value) { underlyingWindowManager = value }
@ -1107,7 +1110,7 @@ class AppMediatorMock: AppMediatorProtocol {
}
}
}
class AudioConverterMock: AudioConverterProtocol {
class AudioConverterMock: AudioConverterProtocol, @unchecked Sendable {
//MARK: - convertToOpusOgg
@ -1200,7 +1203,7 @@ class AudioConverterMock: AudioConverterProtocol {
try convertToMPEG4AACSourceURLDestinationURLClosure?(sourceURL, destinationURL)
}
}
class AudioPlayerMock: AudioPlayerProtocol {
class AudioPlayerMock: AudioPlayerProtocol, @unchecked Sendable {
var sourceURL: URL?
var duration: TimeInterval {
get { return underlyingDuration }
@ -1447,7 +1450,7 @@ class AudioPlayerMock: AudioPlayerProtocol {
await seekToClosure?(progress)
}
}
class AudioRecorderMock: AudioRecorderProtocol {
class AudioRecorderMock: AudioRecorderProtocol, @unchecked Sendable {
var actions: AnyPublisher<AudioRecorderAction, Never> {
get { return underlyingActions }
set(value) { underlyingActions = value }
@ -1641,7 +1644,7 @@ class AudioRecorderMock: AudioRecorderProtocol {
}
}
}
class AudioSessionMock: AudioSessionProtocol {
class AudioSessionMock: AudioSessionProtocol, @unchecked Sendable {
//MARK: - requestRecordPermission
@ -1820,7 +1823,7 @@ class AudioSessionMock: AudioSessionProtocol {
try setActiveOptionsClosure?(active, options)
}
}
class AuthenticationClientBuilderFactoryMock: AuthenticationClientBuilderFactoryProtocol {
class AuthenticationClientBuilderFactoryMock: AuthenticationClientBuilderFactoryProtocol, @unchecked Sendable {
//MARK: - makeBuilder
@ -1893,7 +1896,7 @@ class AuthenticationClientBuilderFactoryMock: AuthenticationClientBuilderFactory
}
}
}
class AuthenticationClientBuilderMock: AuthenticationClientBuilderProtocol {
class AuthenticationClientBuilderMock: AuthenticationClientBuilderProtocol, @unchecked Sendable {
//MARK: - build
@ -2044,7 +2047,7 @@ class AuthenticationClientBuilderMock: AuthenticationClientBuilderProtocol {
}
}
}
class BugReportServiceMock: BugReportServiceProtocol {
class BugReportServiceMock: BugReportServiceProtocol, @unchecked Sendable {
var crashedLastRun: Bool {
get { return underlyingCrashedLastRun }
set(value) { underlyingCrashedLastRun = value }
@ -2123,7 +2126,7 @@ class BugReportServiceMock: BugReportServiceProtocol {
}
}
}
class ClientProxyMock: ClientProxyProtocol {
class ClientProxyMock: ClientProxyProtocol, @unchecked Sendable {
var actionsPublisher: AnyPublisher<ClientProxyAction, Never> {
get { return underlyingActionsPublisher }
set(value) { underlyingActionsPublisher = value }
@ -5036,7 +5039,7 @@ class ClientProxyMock: ClientProxyProtocol {
}
}
}
class CompletionSuggestionServiceMock: CompletionSuggestionServiceProtocol {
class CompletionSuggestionServiceMock: CompletionSuggestionServiceProtocol, @unchecked Sendable {
var suggestionsPublisher: AnyPublisher<[SuggestionItem], Never> {
get { return underlyingSuggestionsPublisher }
set(value) { underlyingSuggestionsPublisher = value }
@ -5126,7 +5129,7 @@ class CompletionSuggestionServiceMock: CompletionSuggestionServiceProtocol {
setSuggestionTriggerClosure?(suggestionTrigger)
}
}
class ComposerDraftServiceMock: ComposerDraftServiceProtocol {
class ComposerDraftServiceMock: ComposerDraftServiceProtocol, @unchecked Sendable {
//MARK: - saveDraft
@ -5537,7 +5540,7 @@ class ComposerDraftServiceMock: ComposerDraftServiceProtocol {
}
}
}
class ElementCallServiceMock: ElementCallServiceProtocol {
class ElementCallServiceMock: ElementCallServiceProtocol, @unchecked Sendable {
var actions: AnyPublisher<ElementCallServiceAction, Never> {
get { return underlyingActions }
set(value) { underlyingActions = value }
@ -5708,7 +5711,7 @@ class ElementCallServiceMock: ElementCallServiceProtocol {
setAudioEnabledRoomIDClosure?(enabled, roomID)
}
}
class ElementCallWidgetDriverMock: ElementCallWidgetDriverProtocol {
class ElementCallWidgetDriverMock: ElementCallWidgetDriverProtocol, @unchecked Sendable {
var widgetID: String {
get { return underlyingWidgetID }
set(value) { underlyingWidgetID = value }
@ -5866,7 +5869,7 @@ class ElementCallWidgetDriverMock: ElementCallWidgetDriverProtocol {
}
}
}
class InvitedRoomProxyMock: InvitedRoomProxyProtocol {
class InvitedRoomProxyMock: InvitedRoomProxyProtocol, @unchecked Sendable {
var info: BaseRoomInfoProxyProtocol {
get { return underlyingInfo }
set(value) { underlyingInfo = value }
@ -5949,7 +5952,7 @@ class InvitedRoomProxyMock: InvitedRoomProxyProtocol {
}
}
}
class JoinedRoomProxyMock: JoinedRoomProxyProtocol {
class JoinedRoomProxyMock: JoinedRoomProxyProtocol, @unchecked Sendable {
var isEncrypted: Bool {
get { return underlyingIsEncrypted }
set(value) { underlyingIsEncrypted = value }
@ -9560,7 +9563,7 @@ class JoinedRoomProxyMock: JoinedRoomProxyProtocol {
}
}
}
class KeychainControllerMock: KeychainControllerProtocol {
class KeychainControllerMock: KeychainControllerProtocol, @unchecked Sendable {
//MARK: - setRestorationToken
@ -10164,7 +10167,7 @@ class KeychainControllerMock: KeychainControllerProtocol {
removePINCodeBiometricStateClosure?()
}
}
class KnockRequestProxyMock: KnockRequestProxyProtocol {
class KnockRequestProxyMock: KnockRequestProxyProtocol, @unchecked Sendable {
var eventID: String {
get { return underlyingEventID }
set(value) { underlyingEventID = value }
@ -10442,7 +10445,7 @@ class KnockRequestProxyMock: KnockRequestProxyProtocol {
}
}
}
class KnockedRoomProxyMock: KnockedRoomProxyProtocol {
class KnockedRoomProxyMock: KnockedRoomProxyProtocol, @unchecked Sendable {
var info: BaseRoomInfoProxyProtocol {
get { return underlyingInfo }
set(value) { underlyingInfo = value }
@ -10524,7 +10527,7 @@ class KnockedRoomProxyMock: KnockedRoomProxyProtocol {
}
}
}
class MediaLoaderMock: MediaLoaderProtocol {
class MediaLoaderMock: MediaLoaderProtocol, @unchecked Sendable {
//MARK: - loadMediaContentForSource
@ -10749,7 +10752,7 @@ class MediaLoaderMock: MediaLoaderProtocol {
}
}
}
class MediaPlayerProviderMock: MediaPlayerProviderProtocol {
class MediaPlayerProviderMock: MediaPlayerProviderProtocol, @unchecked Sendable {
var player: AudioPlayerProtocol {
get { return underlyingPlayer }
set(value) { underlyingPlayer = value }
@ -10950,7 +10953,7 @@ class MediaPlayerProviderMock: MediaPlayerProviderProtocol {
await detachAllStatesExceptClosure?(exception)
}
}
class MediaProviderMock: MediaProviderProtocol {
class MediaProviderMock: MediaProviderProtocol, @unchecked Sendable {
//MARK: - imageFromSource
@ -11373,7 +11376,7 @@ class MediaProviderMock: MediaProviderProtocol {
}
}
}
class NetworkMonitorMock: NetworkMonitorProtocol {
class NetworkMonitorMock: NetworkMonitorProtocol, @unchecked Sendable {
var reachabilityPublisher: CurrentValuePublisher<NetworkMonitorReachability, Never> {
get { return underlyingReachabilityPublisher }
set(value) { underlyingReachabilityPublisher = value }
@ -11381,7 +11384,7 @@ class NetworkMonitorMock: NetworkMonitorProtocol {
var underlyingReachabilityPublisher: CurrentValuePublisher<NetworkMonitorReachability, Never>!
}
class NotificationManagerMock: NotificationManagerProtocol {
class NotificationManagerMock: NotificationManagerProtocol, @unchecked Sendable {
weak var delegate: NotificationManagerDelegate?
//MARK: - start
@ -11724,7 +11727,7 @@ class NotificationManagerMock: NotificationManagerProtocol {
await removeDeliveredInviteNotificationsClosure?()
}
}
class NotificationSettingsProxyMock: NotificationSettingsProxyProtocol {
class NotificationSettingsProxyMock: NotificationSettingsProxyProtocol, @unchecked Sendable {
var callbacks: PassthroughSubject<NotificationSettingsProxyCallback, Never> {
get { return underlyingCallbacks }
set(value) { underlyingCallbacks = value }
@ -12601,7 +12604,7 @@ class NotificationSettingsProxyMock: NotificationSettingsProxyProtocol {
}
}
}
class OrientationManagerMock: OrientationManagerProtocol {
class OrientationManagerMock: OrientationManagerProtocol, @unchecked Sendable {
//MARK: - setOrientation
@ -12686,7 +12689,7 @@ class OrientationManagerMock: OrientationManagerProtocol {
lockOrientationClosure?(orientation)
}
}
class PHGPostHogMock: PHGPostHogProtocol {
class PHGPostHogMock: PHGPostHogProtocol, @unchecked Sendable {
//MARK: - optIn
@ -12876,7 +12879,7 @@ class PHGPostHogMock: PHGPostHogProtocol {
screenPropertiesClosure?(screenTitle, properties)
}
}
class PhotoLibraryManagerMock: PhotoLibraryManagerProtocol {
class PhotoLibraryManagerMock: PhotoLibraryManagerProtocol, @unchecked Sendable {
//MARK: - addResource
@ -12949,7 +12952,7 @@ class PhotoLibraryManagerMock: PhotoLibraryManagerProtocol {
}
}
}
class PollInteractionHandlerMock: PollInteractionHandlerProtocol {
class PollInteractionHandlerMock: PollInteractionHandlerProtocol, @unchecked Sendable {
//MARK: - sendPollResponse
@ -13092,7 +13095,7 @@ class PollInteractionHandlerMock: PollInteractionHandlerProtocol {
}
}
}
class QRCodeLoginServiceMock: QRCodeLoginServiceProtocol {
class QRCodeLoginServiceMock: QRCodeLoginServiceProtocol, @unchecked Sendable {
var qrLoginProgressPublisher: AnyPublisher<QrLoginProgress, Never> {
get { return underlyingQrLoginProgressPublisher }
set(value) { underlyingQrLoginProgressPublisher = value }
@ -13170,7 +13173,7 @@ class QRCodeLoginServiceMock: QRCodeLoginServiceProtocol {
}
}
}
class RoomDirectorySearchProxyMock: RoomDirectorySearchProxyProtocol {
class RoomDirectorySearchProxyMock: RoomDirectorySearchProxyProtocol, @unchecked Sendable {
var resultsPublisher: CurrentValuePublisher<[RoomDirectorySearchResult], Never> {
get { return underlyingResultsPublisher }
set(value) { underlyingResultsPublisher = value }
@ -13312,7 +13315,7 @@ class RoomDirectorySearchProxyMock: RoomDirectorySearchProxyProtocol {
}
}
}
class RoomMemberProxyMock: RoomMemberProxyProtocol {
class RoomMemberProxyMock: RoomMemberProxyProtocol, @unchecked Sendable {
var userID: String {
get { return underlyingUserID }
set(value) { underlyingUserID = value }
@ -13326,6 +13329,7 @@ class RoomMemberProxyMock: RoomMemberProxyProtocol {
set(value) { underlyingMembership = value }
}
var underlyingMembership: MembershipState!
var membershipChangeReason: String?
var isIgnored: Bool {
get { return underlyingIsIgnored }
set(value) { underlyingIsIgnored = value }
@ -13343,7 +13347,7 @@ class RoomMemberProxyMock: RoomMemberProxyProtocol {
var underlyingRole: RoomMemberRole!
}
class RoomNotificationSettingsProxyMock: RoomNotificationSettingsProxyProtocol {
class RoomNotificationSettingsProxyMock: RoomNotificationSettingsProxyProtocol, @unchecked Sendable {
var mode: RoomNotificationModeProxy {
get { return underlyingMode }
set(value) { underlyingMode = value }
@ -13356,7 +13360,7 @@ class RoomNotificationSettingsProxyMock: RoomNotificationSettingsProxyProtocol {
var underlyingIsDefault: Bool!
}
class RoomProxyMock: RoomProxyProtocol {
class RoomProxyMock: RoomProxyProtocol, @unchecked Sendable {
var id: String {
get { return underlyingId }
set(value) { underlyingId = value }
@ -13369,7 +13373,7 @@ class RoomProxyMock: RoomProxyProtocol {
var underlyingOwnUserID: String!
}
class RoomSummaryProviderMock: RoomSummaryProviderProtocol {
class RoomSummaryProviderMock: RoomSummaryProviderProtocol, @unchecked Sendable {
var roomListPublisher: CurrentValuePublisher<[RoomSummary], Never> {
get { return underlyingRoomListPublisher }
set(value) { underlyingRoomListPublisher = value }
@ -13505,7 +13509,7 @@ class RoomSummaryProviderMock: RoomSummaryProviderProtocol {
setFilterClosure?(filter)
}
}
class RoomTimelineControllerFactoryMock: RoomTimelineControllerFactoryProtocol {
class RoomTimelineControllerFactoryMock: RoomTimelineControllerFactoryProtocol, @unchecked Sendable {
//MARK: - buildRoomTimelineController
@ -13718,7 +13722,7 @@ class RoomTimelineControllerFactoryMock: RoomTimelineControllerFactoryProtocol {
}
}
}
class RoomTimelineProviderMock: RoomTimelineProviderProtocol {
class RoomTimelineProviderMock: RoomTimelineProviderProtocol, @unchecked Sendable {
var updatePublisher: AnyPublisher<([TimelineItemProxy], PaginationState), Never> {
get { return underlyingUpdatePublisher }
set(value) { underlyingUpdatePublisher = value }
@ -13742,7 +13746,7 @@ class RoomTimelineProviderMock: RoomTimelineProviderProtocol {
var underlyingMembershipChangePublisher: AnyPublisher<Void, Never>!
}
class SecureBackupControllerMock: SecureBackupControllerProtocol {
class SecureBackupControllerMock: SecureBackupControllerProtocol, @unchecked Sendable {
var recoveryState: CurrentValuePublisher<SecureBackupRecoveryState, Never> {
get { return underlyingRecoveryState }
set(value) { underlyingRecoveryState = value }
@ -14081,7 +14085,7 @@ class SecureBackupControllerMock: SecureBackupControllerProtocol {
}
}
}
class SessionVerificationControllerProxyMock: SessionVerificationControllerProxyProtocol {
class SessionVerificationControllerProxyMock: SessionVerificationControllerProxyProtocol, @unchecked Sendable {
var actions: PassthroughSubject<SessionVerificationControllerProxyAction, Never> {
get { return underlyingActions }
set(value) { underlyingActions = value }
@ -14543,7 +14547,7 @@ class SessionVerificationControllerProxyMock: SessionVerificationControllerProxy
}
}
}
class TimelineProxyMock: TimelineProxyProtocol {
class TimelineProxyMock: TimelineProxyProtocol, @unchecked Sendable {
var timelineProvider: RoomTimelineProviderProtocol {
get { return underlyingTimelineProvider }
set(value) { underlyingTimelineProvider = value }
@ -16248,7 +16252,7 @@ class TimelineProxyMock: TimelineProxyProtocol {
}
}
}
class UserDiscoveryServiceMock: UserDiscoveryServiceProtocol {
class UserDiscoveryServiceMock: UserDiscoveryServiceProtocol, @unchecked Sendable {
//MARK: - searchProfiles
@ -16321,7 +16325,7 @@ class UserDiscoveryServiceMock: UserDiscoveryServiceProtocol {
}
}
}
class UserIndicatorControllerMock: UserIndicatorControllerProtocol {
class UserIndicatorControllerMock: UserIndicatorControllerProtocol, @unchecked Sendable {
var window: UIWindow?
var alertInfo: AlertInfo<UUID>?
@ -16577,7 +16581,7 @@ class UserIndicatorControllerMock: UserIndicatorControllerProtocol {
}
}
}
class UserNotificationCenterMock: UserNotificationCenterProtocol {
class UserNotificationCenterMock: UserNotificationCenterProtocol, @unchecked Sendable {
weak var delegate: UNUserNotificationCenterDelegate?
//MARK: - add
@ -16910,7 +16914,7 @@ class UserNotificationCenterMock: UserNotificationCenterProtocol {
}
}
}
class UserSessionMock: UserSessionProtocol {
class UserSessionMock: UserSessionProtocol, @unchecked Sendable {
var clientProxy: ClientProxyProtocol {
get { return underlyingClientProxy }
set(value) { underlyingClientProxy = value }
@ -16938,7 +16942,7 @@ class UserSessionMock: UserSessionProtocol {
var underlyingCallbacks: PassthroughSubject<UserSessionCallback, Never>!
}
class UserSessionStoreMock: UserSessionStoreProtocol {
class UserSessionStoreMock: UserSessionStoreProtocol, @unchecked Sendable {
var hasSessions: Bool {
get { return underlyingHasSessions }
set(value) { underlyingHasSessions = value }
@ -17203,7 +17207,7 @@ class UserSessionStoreMock: UserSessionStoreProtocol {
clearCacheForClosure?(userID)
}
}
class VoiceMessageCacheMock: VoiceMessageCacheProtocol {
class VoiceMessageCacheMock: VoiceMessageCacheProtocol, @unchecked Sendable {
var urlForRecording: URL {
get { return underlyingUrlForRecording }
set(value) { underlyingUrlForRecording = value }
@ -17386,7 +17390,7 @@ class VoiceMessageCacheMock: VoiceMessageCacheProtocol {
clearCacheClosure?()
}
}
class VoiceMessageMediaManagerMock: VoiceMessageMediaManagerProtocol {
class VoiceMessageMediaManagerMock: VoiceMessageMediaManagerProtocol, @unchecked Sendable {
//MARK: - loadVoiceMessageFromSource
@ -17463,7 +17467,7 @@ class VoiceMessageMediaManagerMock: VoiceMessageMediaManagerProtocol {
}
}
}
class VoiceMessageRecorderMock: VoiceMessageRecorderProtocol {
class VoiceMessageRecorderMock: VoiceMessageRecorderProtocol, @unchecked Sendable {
var previewAudioPlayerState: AudioPlayerState?
var isRecording: Bool {
get { return underlyingIsRecording }
@ -17863,7 +17867,7 @@ class VoiceMessageRecorderMock: VoiceMessageRecorderProtocol {
}
}
}
class WindowManagerMock: WindowManagerProtocol {
class WindowManagerMock: WindowManagerProtocol, @unchecked Sendable {
var mainWindow: UIWindow!
var overlayWindow: UIWindow!
var globalSearchWindow: UIWindow!

View File

@ -1,10 +1,12 @@
// Generated using Sourcery 2.2.5 https://github.com/krzysztofzablocki/Sourcery
// Generated using Sourcery 2.2.6 https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
// swiftlint:disable all
@preconcurrency import MatrixRustSDK
import Foundation
import MatrixRustSDK
open class ClientSDKMock: MatrixRustSDK.Client {
open class ClientSDKMock: MatrixRustSDK.Client, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -4235,7 +4237,7 @@ open class ClientSDKMock: MatrixRustSDK.Client {
}
}
}
open class ClientBuilderSDKMock: MatrixRustSDK.ClientBuilder {
open class ClientBuilderSDKMock: MatrixRustSDK.ClientBuilder, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -5999,7 +6001,7 @@ open class ClientBuilderSDKMock: MatrixRustSDK.ClientBuilder {
}
}
}
open class EncryptionSDKMock: MatrixRustSDK.Encryption {
open class EncryptionSDKMock: MatrixRustSDK.Encryption, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -7257,7 +7259,7 @@ open class EncryptionSDKMock: MatrixRustSDK.Encryption {
await waitForE2eeInitializationTasksClosure?()
}
}
open class HomeserverLoginDetailsSDKMock: MatrixRustSDK.HomeserverLoginDetails {
open class HomeserverLoginDetailsSDKMock: MatrixRustSDK.HomeserverLoginDetails, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -7593,7 +7595,7 @@ open class HomeserverLoginDetailsSDKMock: MatrixRustSDK.HomeserverLoginDetails {
}
}
}
open class IdentityResetHandleSDKMock: MatrixRustSDK.IdentityResetHandle {
open class IdentityResetHandleSDKMock: MatrixRustSDK.IdentityResetHandle, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -7751,7 +7753,7 @@ open class IdentityResetHandleSDKMock: MatrixRustSDK.IdentityResetHandle {
try await resetAuthClosure?(auth)
}
}
open class InReplyToDetailsSDKMock: MatrixRustSDK.InReplyToDetails {
open class InReplyToDetailsSDKMock: MatrixRustSDK.InReplyToDetails, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -7892,7 +7894,7 @@ open class InReplyToDetailsSDKMock: MatrixRustSDK.InReplyToDetails {
}
}
}
open class KnockRequestActionsSDKMock: MatrixRustSDK.KnockRequestActions {
open class KnockRequestActionsSDKMock: MatrixRustSDK.KnockRequestActions, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -8075,7 +8077,7 @@ open class KnockRequestActionsSDKMock: MatrixRustSDK.KnockRequestActions {
try await markAsSeenClosure?()
}
}
open class LazyTimelineItemProviderSDKMock: MatrixRustSDK.LazyTimelineItemProvider {
open class LazyTimelineItemProviderSDKMock: MatrixRustSDK.LazyTimelineItemProvider, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -8287,7 +8289,7 @@ open class LazyTimelineItemProviderSDKMock: MatrixRustSDK.LazyTimelineItemProvid
}
}
}
open class MediaFileHandleSDKMock: MatrixRustSDK.MediaFileHandle {
open class MediaFileHandleSDKMock: MatrixRustSDK.MediaFileHandle, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -8442,7 +8444,7 @@ open class MediaFileHandleSDKMock: MatrixRustSDK.MediaFileHandle {
}
}
}
open class MediaSourceSDKMock: MatrixRustSDK.MediaSource {
open class MediaSourceSDKMock: MatrixRustSDK.MediaSource, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -8586,7 +8588,7 @@ open class MediaSourceSDKMock: MatrixRustSDK.MediaSource {
}
}
}
open class NotificationClientSDKMock: MatrixRustSDK.NotificationClient {
open class NotificationClientSDKMock: MatrixRustSDK.NotificationClient, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -8672,7 +8674,7 @@ open class NotificationClientSDKMock: MatrixRustSDK.NotificationClient {
}
}
}
open class NotificationSettingsSDKMock: MatrixRustSDK.NotificationSettings {
open class NotificationSettingsSDKMock: MatrixRustSDK.NotificationSettings, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -9856,7 +9858,7 @@ open class NotificationSettingsSDKMock: MatrixRustSDK.NotificationSettings {
try await unmuteRoomRoomIdIsEncryptedIsOneToOneClosure?(roomId, isEncrypted, isOneToOne)
}
}
open class OidcAuthorizationDataSDKMock: MatrixRustSDK.OidcAuthorizationData {
open class OidcAuthorizationDataSDKMock: MatrixRustSDK.OidcAuthorizationData, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -9932,7 +9934,7 @@ open class OidcAuthorizationDataSDKMock: MatrixRustSDK.OidcAuthorizationData {
}
}
}
open class QrCodeDataSDKMock: MatrixRustSDK.QrCodeData {
open class QrCodeDataSDKMock: MatrixRustSDK.QrCodeData, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -9946,7 +9948,7 @@ open class QrCodeDataSDKMock: MatrixRustSDK.QrCodeData {
{
}
}
open class RoomSDKMock: MatrixRustSDK.Room {
open class RoomSDKMock: MatrixRustSDK.Room, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -15398,7 +15400,7 @@ open class RoomSDKMock: MatrixRustSDK.Room {
try await withdrawVerificationAndResendUserIdsSendHandleClosure?(userIds, sendHandle)
}
}
open class RoomDirectorySearchSDKMock: MatrixRustSDK.RoomDirectorySearch {
open class RoomDirectorySearchSDKMock: MatrixRustSDK.RoomDirectorySearch, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -15704,7 +15706,7 @@ open class RoomDirectorySearchSDKMock: MatrixRustSDK.RoomDirectorySearch {
try await searchFilterBatchSizeViaServerNameClosure?(filter, batchSize, viaServerName)
}
}
open class RoomListSDKMock: MatrixRustSDK.RoomList {
open class RoomListSDKMock: MatrixRustSDK.RoomList, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -15936,7 +15938,7 @@ open class RoomListSDKMock: MatrixRustSDK.RoomList {
}
}
}
open class RoomListDynamicEntriesControllerSDKMock: MatrixRustSDK.RoomListDynamicEntriesController {
open class RoomListDynamicEntriesControllerSDKMock: MatrixRustSDK.RoomListDynamicEntriesController, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -16090,7 +16092,7 @@ open class RoomListDynamicEntriesControllerSDKMock: MatrixRustSDK.RoomListDynami
}
}
}
open class RoomListEntriesWithDynamicAdaptersResultSDKMock: MatrixRustSDK.RoomListEntriesWithDynamicAdaptersResult {
open class RoomListEntriesWithDynamicAdaptersResultSDKMock: MatrixRustSDK.RoomListEntriesWithDynamicAdaptersResult, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -16231,7 +16233,7 @@ open class RoomListEntriesWithDynamicAdaptersResultSDKMock: MatrixRustSDK.RoomLi
}
}
}
open class RoomListItemSDKMock: MatrixRustSDK.RoomListItem {
open class RoomListItemSDKMock: MatrixRustSDK.RoomListItem, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -17155,7 +17157,7 @@ open class RoomListItemSDKMock: MatrixRustSDK.RoomListItem {
}
}
}
open class RoomListServiceSDKMock: MatrixRustSDK.RoomListService {
open class RoomListServiceSDKMock: MatrixRustSDK.RoomListService, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -17498,7 +17500,7 @@ open class RoomListServiceSDKMock: MatrixRustSDK.RoomListService {
}
}
}
open class RoomMembersIteratorSDKMock: MatrixRustSDK.RoomMembersIterator {
open class RoomMembersIteratorSDKMock: MatrixRustSDK.RoomMembersIterator, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -17645,7 +17647,7 @@ open class RoomMembersIteratorSDKMock: MatrixRustSDK.RoomMembersIterator {
}
}
}
open class RoomMessageEventContentWithoutRelationSDKMock: MatrixRustSDK.RoomMessageEventContentWithoutRelation {
open class RoomMessageEventContentWithoutRelationSDKMock: MatrixRustSDK.RoomMessageEventContentWithoutRelation, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -17727,7 +17729,7 @@ open class RoomMessageEventContentWithoutRelationSDKMock: MatrixRustSDK.RoomMess
}
}
}
open class RoomPreviewSDKMock: MatrixRustSDK.RoomPreview {
open class RoomPreviewSDKMock: MatrixRustSDK.RoomPreview, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -17911,8 +17913,73 @@ open class RoomPreviewSDKMock: MatrixRustSDK.RoomPreview {
leaveCallsCount += 1
try await leaveClosure?()
}
//MARK: - ownMembershipDetails
var ownMembershipDetailsUnderlyingCallsCount = 0
open var ownMembershipDetailsCallsCount: Int {
get {
if Thread.isMainThread {
return ownMembershipDetailsUnderlyingCallsCount
} else {
var returnValue: Int? = nil
DispatchQueue.main.sync {
returnValue = ownMembershipDetailsUnderlyingCallsCount
}
return returnValue!
}
}
set {
if Thread.isMainThread {
ownMembershipDetailsUnderlyingCallsCount = newValue
} else {
DispatchQueue.main.sync {
ownMembershipDetailsUnderlyingCallsCount = newValue
}
}
}
}
open var ownMembershipDetailsCalled: Bool {
return ownMembershipDetailsCallsCount > 0
}
var ownMembershipDetailsUnderlyingReturnValue: RoomMembershipDetails?
open var ownMembershipDetailsReturnValue: RoomMembershipDetails? {
get {
if Thread.isMainThread {
return ownMembershipDetailsUnderlyingReturnValue
} else {
var returnValue: RoomMembershipDetails?? = nil
DispatchQueue.main.sync {
returnValue = ownMembershipDetailsUnderlyingReturnValue
}
return returnValue!
}
}
set {
if Thread.isMainThread {
ownMembershipDetailsUnderlyingReturnValue = newValue
} else {
DispatchQueue.main.sync {
ownMembershipDetailsUnderlyingReturnValue = newValue
}
}
}
}
open var ownMembershipDetailsClosure: (() async -> RoomMembershipDetails?)?
open override func ownMembershipDetails() async -> RoomMembershipDetails? {
ownMembershipDetailsCallsCount += 1
if let ownMembershipDetailsClosure = ownMembershipDetailsClosure {
return await ownMembershipDetailsClosure()
} else {
return ownMembershipDetailsReturnValue
}
}
}
open class SendAttachmentJoinHandleSDKMock: MatrixRustSDK.SendAttachmentJoinHandle {
open class SendAttachmentJoinHandleSDKMock: MatrixRustSDK.SendAttachmentJoinHandle, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -17999,7 +18066,7 @@ open class SendAttachmentJoinHandleSDKMock: MatrixRustSDK.SendAttachmentJoinHand
try await joinClosure?()
}
}
open class SendHandleSDKMock: MatrixRustSDK.SendHandle {
open class SendHandleSDKMock: MatrixRustSDK.SendHandle, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -18119,7 +18186,7 @@ open class SendHandleSDKMock: MatrixRustSDK.SendHandle {
try await tryResendClosure?()
}
}
open class SessionVerificationControllerSDKMock: MatrixRustSDK.SessionVerificationController {
open class SessionVerificationControllerSDKMock: MatrixRustSDK.SessionVerificationController, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -18458,7 +18525,7 @@ open class SessionVerificationControllerSDKMock: MatrixRustSDK.SessionVerificati
try await startSasVerificationClosure?()
}
}
open class SessionVerificationEmojiSDKMock: MatrixRustSDK.SessionVerificationEmoji {
open class SessionVerificationEmojiSDKMock: MatrixRustSDK.SessionVerificationEmoji, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -18599,7 +18666,7 @@ open class SessionVerificationEmojiSDKMock: MatrixRustSDK.SessionVerificationEmo
}
}
}
open class SpanSDKMock: MatrixRustSDK.Span {
open class SpanSDKMock: MatrixRustSDK.Span, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -18750,7 +18817,7 @@ open class SpanSDKMock: MatrixRustSDK.Span {
}
}
}
open class SsoHandlerSDKMock: MatrixRustSDK.SsoHandler {
open class SsoHandlerSDKMock: MatrixRustSDK.SsoHandler, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -18872,7 +18939,7 @@ open class SsoHandlerSDKMock: MatrixRustSDK.SsoHandler {
}
}
}
open class SyncServiceSDKMock: MatrixRustSDK.SyncService {
open class SyncServiceSDKMock: MatrixRustSDK.SyncService, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -19095,7 +19162,7 @@ open class SyncServiceSDKMock: MatrixRustSDK.SyncService {
try await stopClosure?()
}
}
open class SyncServiceBuilderSDKMock: MatrixRustSDK.SyncServiceBuilder {
open class SyncServiceBuilderSDKMock: MatrixRustSDK.SyncServiceBuilder, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -19311,7 +19378,7 @@ open class SyncServiceBuilderSDKMock: MatrixRustSDK.SyncServiceBuilder {
}
}
}
open class TaskHandleSDKMock: MatrixRustSDK.TaskHandle {
open class TaskHandleSDKMock: MatrixRustSDK.TaskHandle, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -19423,7 +19490,7 @@ open class TaskHandleSDKMock: MatrixRustSDK.TaskHandle {
}
}
}
open class TimelineSDKMock: MatrixRustSDK.Timeline {
open class TimelineSDKMock: MatrixRustSDK.Timeline, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -21131,7 +21198,7 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline {
}
}
}
open class TimelineDiffSDKMock: MatrixRustSDK.TimelineDiff {
open class TimelineDiffSDKMock: MatrixRustSDK.TimelineDiff, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -21727,7 +21794,7 @@ open class TimelineDiffSDKMock: MatrixRustSDK.TimelineDiff {
}
}
}
open class TimelineEventSDKMock: MatrixRustSDK.TimelineEvent {
open class TimelineEventSDKMock: MatrixRustSDK.TimelineEvent, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -22002,7 +22069,7 @@ open class TimelineEventSDKMock: MatrixRustSDK.TimelineEvent {
}
}
}
open class TimelineEventTypeFilterSDKMock: MatrixRustSDK.TimelineEventTypeFilter {
open class TimelineEventTypeFilterSDKMock: MatrixRustSDK.TimelineEventTypeFilter, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -22016,7 +22083,7 @@ open class TimelineEventTypeFilterSDKMock: MatrixRustSDK.TimelineEventTypeFilter
{
}
}
open class TimelineItemSDKMock: MatrixRustSDK.TimelineItem {
open class TimelineItemSDKMock: MatrixRustSDK.TimelineItem, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -22287,7 +22354,7 @@ open class TimelineItemSDKMock: MatrixRustSDK.TimelineItem {
}
}
}
open class UnreadNotificationsCountSDKMock: MatrixRustSDK.UnreadNotificationsCount {
open class UnreadNotificationsCountSDKMock: MatrixRustSDK.UnreadNotificationsCount, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -22493,7 +22560,7 @@ open class UnreadNotificationsCountSDKMock: MatrixRustSDK.UnreadNotificationsCou
}
}
}
open class UserIdentitySDKMock: MatrixRustSDK.UserIdentity {
open class UserIdentitySDKMock: MatrixRustSDK.UserIdentity, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -22714,7 +22781,7 @@ open class UserIdentitySDKMock: MatrixRustSDK.UserIdentity {
try await withdrawVerificationClosure?()
}
}
open class WidgetDriverSDKMock: MatrixRustSDK.WidgetDriver {
open class WidgetDriverSDKMock: MatrixRustSDK.WidgetDriver, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}
@ -22767,7 +22834,7 @@ open class WidgetDriverSDKMock: MatrixRustSDK.WidgetDriver {
await runRoomCapabilitiesProviderClosure?(room, capabilitiesProvider)
}
}
open class WidgetDriverHandleSDKMock: MatrixRustSDK.WidgetDriverHandle {
open class WidgetDriverHandleSDKMock: MatrixRustSDK.WidgetDriverHandle, @unchecked Sendable {
init() {
super.init(noPointer: .init())
}

View File

@ -75,6 +75,7 @@ private extension RoomMember {
powerLevel: Int64(proxy.powerLevel),
normalizedPowerLevel: Int64(proxy.powerLevel),
isIgnored: proxy.isIgnored,
suggestedRoleForPowerLevel: proxy.role)
suggestedRoleForPowerLevel: proxy.role,
membershipChangeReason: proxy.membershipChangeReason)
}
}

View File

@ -156,7 +156,8 @@ extension RoomInfo {
powerLevel: Int64($0.powerLevel),
normalizedPowerLevel: Int64($0.powerLevel),
isIgnored: $0.isIgnored,
suggestedRoleForPowerLevel: $0.role) },
suggestedRoleForPowerLevel: $0.role,
membershipChangeReason: $0.membershipChangeReason) },
heroes: [],
activeMembersCount: UInt64(configuration.members.filter { $0.membership == .join || $0.membership == .invite }.count),
invitedMembersCount: UInt64(configuration.members.filter { $0.membership == .invite }.count),

View File

@ -952,8 +952,7 @@ class ClientProxy: ClientProxyProtocol {
case .left:
return .left
case .banned:
// TODO: Implement a `bannedRoomProxy` and/or `.banned` case
return .left
return .banned
}
} catch {
MXLog.error("Failed retrieving room: \(roomID), with error: \(error)")

View File

@ -31,6 +31,8 @@ final class RoomMemberProxy: RoomMemberProxyProtocol {
var membership: MembershipState { member.membership }
var membershipChangeReason: String? { member.membershipChangeReason }
var isIgnored: Bool { member.isIgnored }
var powerLevel: Int { Int(member.powerLevel) }

View File

@ -19,6 +19,8 @@ protocol RoomMemberProxyProtocol: AnyObject {
var membership: MembershipState { get }
var membershipChangeReason: String? { get }
var isIgnored: Bool { get }
var powerLevel: Int { get }

View File

@ -23,6 +23,7 @@ enum RoomProxyType {
case invited(InvitedRoomProxyProtocol)
case knocked(KnockedRoomProxyProtocol)
case left
case banned
}
// sourcery: AutoMockable

View File

@ -1,4 +1,4 @@
// Generated using Sourcery 2.2.5 https://github.com/krzysztofzablocki/Sourcery
// Generated using Sourcery 2.2.6 https://github.com/krzysztofzablocki/Sourcery
// DO NOT EDIT
// swiftlint:disable all

View File

@ -1,4 +1,15 @@
// swiftlint:disable all
@preconcurrency import Combine
@preconcurrency import SwiftUI
@preconcurrency import MatrixRustSDK
import AnalyticsEvents
import AVFoundation
import Foundation
import LocalAuthentication
import Photos
{% for import in argument.autoMockableImports %}
import {{ import }}
{% endfor %}
@ -221,7 +232,7 @@ import {{ import }}
{% macro underlyingMockedVariableName variable %}underlying{{ variable.name|upperFirstLetter }}{% endmacro %}
{% macro mockedVariableName variable %}{{ variable.name }}{% endmacro %}
{% for type in types.protocols where type.based.AutoMockable or type|annotated:"AutoMockable" %}{% if type.name != "AutoMockable" %}
{% call accessLevel type.accessLevel %}class {{ type.name | replace:"Protocol","" }}Mock: {{ type.name }} {
{% call accessLevel type.accessLevel %}class {{ type.name | replace:"Protocol","" }}Mock: {{ type.name }}, @unchecked Sendable {
{% if type.accessLevel == "public" %}public init() {}{% endif %}
{% for variable in type.allVariables|!definedInExtension %}
{% if variable.isAsync or variable.throws %}{% call mockAsyncOrThrowingVariable variable %}{% elif variable.isOptional %}{% call mockOptionalVariable variable %}{% elif variable.isArray or variable.isDictionary %}{% call mockNonOptionalArrayOrDictionaryVariable variable %}{% else %}{% call mockNonOptionalVariable variable %}{% endif %}

View File

@ -7,6 +7,3 @@ templates:
- AutoMockable.stencil
output:
../../ElementX/Sources/Mocks/Generated/GeneratedMocks.swift
args:
automMockableTestableImports: []
autoMockableImports: [AnalyticsEvents, AVFoundation, Combine, Foundation, LocalAuthentication, MatrixRustSDK, Photos, SwiftUI]

View File

@ -1,4 +1,8 @@
// swiftlint:disable all
@preconcurrency import MatrixRustSDK
import Foundation
{% for import in argument.autoMockableImports %}
import {{ import }}
{% endfor %}
@ -218,7 +222,7 @@ import {{ import }}
{% macro underlyingMockedVariableName variable %}underlying{{ variable.name|upperFirstLetter }}{% endmacro %}
{% macro mockedVariableName variable %}{{ variable.name }}{% endmacro %}
{% for type in types.classes %}{% if type.name != "AutoMockable" %}{% if type.accessLevel == "open" %}
{% call accessLevel type.accessLevel %}class {{ type.name | replace:"Protocol","" }}SDKMock: MatrixRustSDK.{{ type.name }} {
{% call accessLevel type.accessLevel %}class {{ type.name | replace:"Protocol","" }}SDKMock: MatrixRustSDK.{{ type.name }}, @unchecked Sendable {
{% if type.accessLevel == "open" %}
init() {
super.init(noPointer: .init())

View File

@ -27,7 +27,7 @@ struct GenerateSDKMocks: ParsableCommand {
/// Generates the SDK mocks using Sourcery.
func generateSDKMocks(ffiPath: String) throws {
try Zsh.run(command: "sourcery --sources \(ffiPath) --templates Tools/Sourcery/SDKAutoMockable.stencil --output ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift --args autoMockableImports=\"Foundation\",autoMockableImports=\"MatrixRustSDK\"")
try Zsh.run(command: "sourcery --sources \(ffiPath) --templates Tools/Sourcery/SDKAutoMockable.stencil --output ElementX/Sources/Mocks/Generated/SDKGeneratedMocks.swift")
}
/// Downloads the specified version of the `matrix_sdk_ffi.swift` file and returns the path to the downloaded file.

View File

@ -73,7 +73,7 @@ final class MediaProviderTests: XCTestCase {
}
func test_whenImageFromSourceWithSourceNil_nilReturned() throws {
let image = try mediaProvider.imageFromSource(nil, size: Avatars.Size.room(on: .timeline).scaledSize)
let image = mediaProvider.imageFromSource(nil, size: Avatars.Size.room(on: .timeline).scaledSize)
XCTAssertNil(image)
}

View File

@ -8,7 +8,7 @@
@testable import Kingfisher
import UIKit
class MockImageCache: ImageCache {
class MockImageCache: ImageCache, @unchecked Sendable {
var retrievedImagesInMemory = [String: UIImage]()
var retrievedImages = [String: UIImage]()
var storedImages = [String: UIImage]()

View File

@ -345,7 +345,7 @@ class RoomScreenViewModelTests: XCTestCase {
userIndicatorController: ServiceLocator.shared.userIndicatorController)
self.viewModel = viewModel
var deferred = deferFulfillment(viewModel.context.$viewState) { state in
let deferred = deferFulfillment(viewModel.context.$viewState) { state in
state.unseenKnockRequests == [.init(displayName: "Alice", avatarURL: nil, userID: "@alice:matrix.org", reason: "Hello World!", eventID: "1")] &&
!state.shouldSeeKnockRequests
}

View File

@ -61,7 +61,7 @@ packages:
# Element/Matrix dependencies
MatrixRustSDK:
url: https://github.com/element-hq/matrix-rust-components-swift
exactVersion: 25.01.13
exactVersion: 25.01.15
# path: ../matrix-rust-sdk
Compound:
url: https://github.com/element-hq/compound-ios