mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
Merge pull request #462 from redryerye/feat/preselect-phonenumber
Add default phone number selection when there is only one
This commit is contained in:
commit
c85b3c2b6c
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