mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 15:22:39 +00:00
Fix: renamed parameter for code clarity
This commit is contained in:
parent
e848158db4
commit
ee63d417d3
1 changed files with 4 additions and 4 deletions
|
@ -212,17 +212,17 @@ extension ContactsPickerViewModel: ContactsTableViewControllerDelegate {
|
|||
}, failure: { [weak self] error in
|
||||
guard let self = self else { return }
|
||||
self.coordinatorDelegate?.contactsPickerViewModelDidEndValidatingUser(self)
|
||||
self.displayInvitePrompt(contact: contact, contactFound: false)
|
||||
self.displayInvitePrompt(contact: contact, isUnknownUser: true)
|
||||
})
|
||||
} else {
|
||||
displayInvitePrompt(contact: contact)
|
||||
}
|
||||
}
|
||||
|
||||
private func displayInvitePrompt(contact: MXKContact, contactFound: Bool = true) {
|
||||
private func displayInvitePrompt(contact: MXKContact, isUnknownUser: Bool = false) {
|
||||
let roomName = room.displayName ?? VectorL10n.spaceTag
|
||||
let message = contactFound ? VectorL10n.roomParticipantsInvitePromptToMsg(contact.displayName, roomName) : VectorL10n.roomParticipantsInviteUnknownParticipantPromptToMsg(contact.displayName, roomName)
|
||||
let inviteActionTitle = contactFound ? VectorL10n.invite : VectorL10n.roomParticipantsInviteAnyway
|
||||
let message = isUnknownUser ? VectorL10n.roomParticipantsInviteUnknownParticipantPromptToMsg(contact.displayName, roomName) : VectorL10n.roomParticipantsInvitePromptToMsg(contact.displayName, roomName)
|
||||
let inviteActionTitle = isUnknownUser ? VectorL10n.roomParticipantsInviteAnyway : VectorL10n.invite
|
||||
coordinatorDelegate?.contactsPickerViewModel(self, display: message, title: VectorL10n.roomParticipantsInvitePromptTitle, actions: [
|
||||
UIAlertAction(title: VectorL10n.cancel, style: .cancel),
|
||||
UIAlertAction(title: VectorL10n.invite, style: .default, handler: { [weak self] _ in
|
||||
|
|
Loading…
Reference in a new issue