mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
add default phone number selection when there is only one
This commit is contained in:
parent
638543070b
commit
36a9bd267b
1 changed files with 5 additions and 0 deletions
|
|
@ -16,6 +16,11 @@ struct SignInPhoneListView: View {
|
|||
List(phoneNumbers, selection: $selectedPhoneNumberID) {
|
||||
Text($0.numberWithDialCode)
|
||||
}
|
||||
.onAppear {
|
||||
if phoneNumbers.count == 1 {
|
||||
selectedPhoneNumberID = phoneNumbers.first?.id
|
||||
}
|
||||
}
|
||||
} else {
|
||||
AttributedText(
|
||||
NSAttributedString(string: localizeString("NoTrustedPhones"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue