mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Run SwiftFormat.
This commit is contained in:
@@ -28,7 +28,7 @@ struct SpaceRoomCell: View {
|
||||
private var isEditModeActive: Bool {
|
||||
editMode?.wrappedValue ?? .inactive != .inactive
|
||||
}
|
||||
|
||||
|
||||
private var isHighlighted: Bool {
|
||||
isSelected && !isEditModeActive
|
||||
}
|
||||
|
||||
@@ -15,10 +15,10 @@ class LeaveSpaceViewModel: LeaveSpaceViewModelType {
|
||||
var actions: AnyPublisher<LeaveSpaceViewModelAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
|
||||
private let userIndicatorController: UserIndicatorControllerProtocol
|
||||
private let mediaProvider: MediaProviderProtocol
|
||||
|
||||
|
||||
init(spaceName: String, canEditRolesAndPermissions: Bool, leaveHandle: LeaveSpaceHandleProxy, userIndicatorController: UserIndicatorControllerProtocol, mediaProvider: MediaProviderProtocol) {
|
||||
self.userIndicatorController = userIndicatorController
|
||||
self.mediaProvider = mediaProvider
|
||||
@@ -61,7 +61,7 @@ class LeaveSpaceViewModel: LeaveSpaceViewModelType {
|
||||
private static var leavingIndicatorID: String {
|
||||
"\(Self.self)-Leaving"
|
||||
}
|
||||
|
||||
|
||||
private static var failureIndicatorID: String {
|
||||
"\(Self.self)-Failure"
|
||||
}
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ final class SpaceAddRoomsScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(SpaceAddRoomsScreen(context: viewModel.context))
|
||||
}
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@ class SpaceAddRoomsScreenViewModel: SpaceAddRoomsScreenViewModelType, SpaceAddRo
|
||||
var actions: AnyPublisher<SpaceAddRoomsScreenViewModelAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
|
||||
init(spaceRoomListProxy: SpaceRoomListProxyProtocol,
|
||||
userSession: UserSessionProtocol,
|
||||
roomSummaryProvider: RoomSummaryProviderProtocol,
|
||||
@@ -167,7 +167,7 @@ class SpaceAddRoomsScreenViewModel: SpaceAddRoomsScreenViewModelType, SpaceAddRo
|
||||
private var savingIndicatorID: String {
|
||||
"\(Self.self)-Saving"
|
||||
}
|
||||
|
||||
|
||||
private var failureIndicatorID: String {
|
||||
"\(Self.self)-Failure"
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ final class SpaceScreenCoordinator: CoordinatorProtocol {
|
||||
private let viewModel: SpaceScreenViewModelProtocol
|
||||
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
|
||||
|
||||
private let actionsSubject: PassthroughSubject<SpaceScreenCoordinatorAction, Never> = .init()
|
||||
var actionsPublisher: AnyPublisher<SpaceScreenCoordinatorAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
@@ -87,7 +87,7 @@ final class SpaceScreenCoordinator: CoordinatorProtocol {
|
||||
func stop() {
|
||||
viewModel.stop()
|
||||
}
|
||||
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(SpaceScreen(context: viewModel.context))
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class SpaceScreenViewModel: SpaceScreenViewModelType, SpaceScreenViewModelProtoc
|
||||
var actionsPublisher: AnyPublisher<SpaceScreenViewModelAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
|
||||
init(spaceRoomListProxy: SpaceRoomListProxyProtocol,
|
||||
spaceServiceProxy: SpaceServiceProxyProtocol,
|
||||
selectedSpaceRoomPublisher: CurrentValuePublisher<String?, Never>,
|
||||
@@ -269,13 +269,13 @@ class SpaceScreenViewModel: SpaceScreenViewModelType, SpaceScreenViewModelProtoc
|
||||
|
||||
state.bindings.leaveSpaceViewModel = leaveSpaceViewModel
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Indicators
|
||||
|
||||
private static var removingIndicatorID: String {
|
||||
"\(Self.self)-Removing"
|
||||
}
|
||||
|
||||
|
||||
private static var failureIndicatorID: String {
|
||||
"\(Self.self)-Failure"
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ struct SpaceSettingsScreen_Previews: PreviewProvider, TestablePreview {
|
||||
attributedStringBuilder: AttributedStringBuilder(mentionBuilder: MentionBuilder()),
|
||||
appSettings: .volatile())
|
||||
}
|
||||
|
||||
|
||||
static var previews: some View {
|
||||
ElementNavigationStack {
|
||||
SpaceSettingsScreen(context: ownerViewModel.context)
|
||||
|
||||
@@ -27,7 +27,7 @@ final class SpacesScreenCoordinator: CoordinatorProtocol {
|
||||
private let viewModel: SpacesScreenViewModelProtocol
|
||||
|
||||
private var cancellables = Set<AnyCancellable>()
|
||||
|
||||
|
||||
private let actionsSubject: PassthroughSubject<SpacesScreenCoordinatorAction, Never> = .init()
|
||||
var actionsPublisher: AnyPublisher<SpacesScreenCoordinatorAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
@@ -58,7 +58,7 @@ final class SpacesScreenCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
AnyView(SpacesScreen(context: viewModel.context))
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class SpacesScreenViewModel: SpacesScreenViewModelType, SpacesScreenViewModelPro
|
||||
var actionsPublisher: AnyPublisher<SpacesScreenViewModelAction, Never> {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
|
||||
init(userSession: UserSessionProtocol,
|
||||
selectedSpacePublisher: CurrentValuePublisher<String?, Never>,
|
||||
appSettings: AppSettings,
|
||||
|
||||
Reference in New Issue
Block a user