mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 09:02:44 +02:00
Configured and applied SwiftFormat
This commit is contained in:
committed by
Stefan Ceriu
parent
ff2e6ddfa7
commit
43c28d23b7
+2
-2
@@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -18,6 +18,6 @@ import SwiftUI
|
||||
|
||||
class AddRoomSelectorViewProvider: MatrixItemChooserCoordinatorViewProvider {
|
||||
func view(with viewModel: MatrixItemChooserViewModelType.Context) -> AnyView {
|
||||
return AnyView(AddRoomSelector(viewModel: viewModel))
|
||||
AnyView(AddRoomSelector(viewModel: viewModel))
|
||||
}
|
||||
}
|
||||
|
||||
+4
-5
@@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -17,7 +17,6 @@
|
||||
import Foundation
|
||||
|
||||
class AddRoomItemsProcessor: MatrixItemChooserProcessorProtocol {
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private let parentSpace: MXSpace
|
||||
@@ -40,14 +39,14 @@ class AddRoomItemsProcessor: MatrixItemChooserProcessorProtocol {
|
||||
addChild(from: itemsIds, at: 0, completion: completion)
|
||||
}
|
||||
|
||||
func isItemIncluded(_ item: (MatrixListItemData)) -> Bool {
|
||||
return !parentSpace.isRoomAChild(roomId: item.id)
|
||||
func isItemIncluded(_ item: MatrixListItemData) -> Bool {
|
||||
!parentSpace.isRoomAChild(roomId: item.id)
|
||||
}
|
||||
|
||||
// MARK: Private
|
||||
|
||||
/// Add room with roomId from list of room IDs at index to the parentSpace.
|
||||
/// Recurse to the next index once done.
|
||||
/// Recurse to the next index once done.
|
||||
func addChild(from roomIds: [String], at index: Int, completion: @escaping (Result<Void, Error>) -> Void) {
|
||||
guard index < roomIds.count else {
|
||||
// last item has been processed or list is empty --> the recursion has finished
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -17,7 +17,6 @@
|
||||
import SwiftUI
|
||||
|
||||
struct AddRoomSelector: View {
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
@ObservedObject var viewModel: MatrixItemChooserViewModel.Context
|
||||
@@ -26,7 +25,7 @@ struct AddRoomSelector: View {
|
||||
|
||||
@Environment(\.theme) private var theme: ThemeSwiftUI
|
||||
private var isDoneEnabled: Bool {
|
||||
return !viewModel.viewState.selectedItemIds.isEmpty && !viewModel.viewState.loading
|
||||
!viewModel.viewState.selectedItemIds.isEmpty && !viewModel.viewState.loading
|
||||
}
|
||||
|
||||
// MARK: Setup
|
||||
|
||||
Reference in New Issue
Block a user