mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-04-26 14:57:37 +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) {
|
List(phoneNumbers, selection: $selectedPhoneNumberID) {
|
||||||
Text($0.numberWithDialCode)
|
Text($0.numberWithDialCode)
|
||||||
}
|
}
|
||||||
|
.onAppear {
|
||||||
|
if phoneNumbers.count == 1 {
|
||||||
|
selectedPhoneNumberID = phoneNumbers.first?.id
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
AttributedText(
|
AttributedText(
|
||||||
NSAttributedString(string: localizeString("NoTrustedPhones"))
|
NSAttributedString(string: localizeString("NoTrustedPhones"))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue