swiftformat now enforces newlines for ifs

This commit is contained in:
Mauro Romito
2026-06-19 13:46:46 +02:00
committed by Mauro
parent f32b9eeb26
commit 3aedd0ccff
17 changed files with 87 additions and 29 deletions
@@ -49,7 +49,9 @@ struct InviteUsersScreenViewState: BindableState {
}
func isUserDisabled(_ user: UserProfileProxy) -> Bool {
if isInviteeMandatory(user) { return true }
if isInviteeMandatory(user) {
return true
}
let membershipState = membershipState(user)
return membershipState == .invite || membershipState == .join
}
@@ -38,7 +38,11 @@ class InviteUsersScreenViewModel: InviteUsersScreenViewModelType, InviteUsersScr
self.userIndicatorController = userIndicatorController
self.appSettings = appSettings
let mandatoryInvitees: [UserProfileProxy] = if case .draft(let invitees) = roomType { invitees } else { [] }
let mandatoryInvitees: [UserProfileProxy] = if case .draft(let invitees) = roomType {
invitees
} else {
[]
}
super.init(initialViewState: InviteUsersScreenViewState(selectedUsers: mandatoryInvitees,
mandatoryInvitees: mandatoryInvitees,