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
+8
-9
@@ -16,14 +16,13 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import Combine
|
||||
import SwiftUI
|
||||
|
||||
typealias SpaceCreationEmailInvitesViewModelType = StateStoreViewModel<SpaceCreationEmailInvitesViewState,
|
||||
SpaceCreationEmailInvitesStateAction,
|
||||
SpaceCreationEmailInvitesViewAction>
|
||||
SpaceCreationEmailInvitesStateAction,
|
||||
SpaceCreationEmailInvitesViewAction>
|
||||
class SpaceCreationEmailInvitesViewModel: SpaceCreationEmailInvitesViewModelType, SpaceCreationEmailInvitesViewModelProtocol {
|
||||
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
@@ -86,14 +85,14 @@ class SpaceCreationEmailInvitesViewModel: SpaceCreationEmailInvitesViewModelType
|
||||
}
|
||||
|
||||
private func done() {
|
||||
self.creationParameters.emailInvites = self.context.emailInvites
|
||||
self.creationParameters.inviteType = .email
|
||||
let emailAddressesValidity = service.validate(self.context.emailInvites)
|
||||
creationParameters.emailInvites = context.emailInvites
|
||||
creationParameters.inviteType = .email
|
||||
let emailAddressesValidity = service.validate(context.emailInvites)
|
||||
|
||||
dispatch(action: .updateEmailValidity(emailAddressesValidity))
|
||||
if self.context.emailInvites.reduce(true, { $0 && $1.isEmpty }) {
|
||||
if context.emailInvites.reduce(true, { $0 && $1.isEmpty }) {
|
||||
completion?(.done)
|
||||
} else if emailAddressesValidity.reduce(true, { $0 && $1}) {
|
||||
} else if emailAddressesValidity.reduce(true, { $0 && $1 }) {
|
||||
if service.isIdentityServiceReady {
|
||||
completion?(.done)
|
||||
} else {
|
||||
|
||||
+1
-2
@@ -1,6 +1,6 @@
|
||||
// File created from SimpleUserProfileExample
|
||||
// $ createScreen.sh Spaces/SpaceCreation/SpaceCreationEmailInvites SpaceCreationEmailInvites
|
||||
//
|
||||
//
|
||||
// Copyright 2021 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -19,7 +19,6 @@
|
||||
import Foundation
|
||||
|
||||
protocol SpaceCreationEmailInvitesViewModelProtocol {
|
||||
|
||||
var completion: ((SpaceCreationEmailInvitesViewModelResult) -> Void)? { get set }
|
||||
var context: SpaceCreationEmailInvitesViewModelType.Context { get }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user