mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Generating SDK Mocks through the usage of swift run tools generate-sdk-mocks (#982)
* basic implementation, that works for now only with the local SDK * replaced a handmade mock with a generated mock
This commit is contained in:
@@ -30,7 +30,7 @@ class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScr
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
init(selectedUsers: CurrentValuePublisher<[UserProfile], Never>,
|
||||
init(selectedUsers: CurrentValuePublisher<[UserProfileProxy], Never>,
|
||||
roomType: InviteUsersScreenRoomType,
|
||||
mediaProvider: MediaProviderProtocol,
|
||||
userDiscoveryService: UserDiscoveryServiceProtocol) {
|
||||
@@ -85,7 +85,7 @@ class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScr
|
||||
@CancellableTask
|
||||
private var fetchUsersTask: Task<Void, Never>?
|
||||
|
||||
private func setupSubscriptions(selectedUsers: CurrentValuePublisher<[UserProfile], Never>) {
|
||||
private func setupSubscriptions(selectedUsers: CurrentValuePublisher<[UserProfileProxy], Never>) {
|
||||
context.$viewState
|
||||
.map(\.bindings.searchQuery)
|
||||
.debounceAndRemoveDuplicates()
|
||||
@@ -125,7 +125,7 @@ class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScr
|
||||
}
|
||||
}
|
||||
|
||||
private func handleResult(for sectionType: UserDiscoverySectionType, result: Result<[UserProfile], UserDiscoveryErrorType>) {
|
||||
private func handleResult(for sectionType: UserDiscoverySectionType, result: Result<[UserProfileProxy], UserDiscoveryErrorType>) {
|
||||
switch result {
|
||||
case .success(let users):
|
||||
state.usersSection = .init(type: sectionType, users: users)
|
||||
|
||||
Reference in New Issue
Block a user