Skip to content

Commit c85b3c2

Browse files
authored
Merge pull request #462 from redryerye/feat/preselect-phonenumber
Add default phone number selection when there is only one
2 parents 6385430 + 36a9bd2 commit c85b3c2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Xcodes/Frontend/SignIn/SignInPhoneListView.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ struct SignInPhoneListView: View {
1616
List(phoneNumbers, selection: $selectedPhoneNumberID) {
1717
Text($0.numberWithDialCode)
1818
}
19+
.onAppear {
20+
if phoneNumbers.count == 1 {
21+
selectedPhoneNumberID = phoneNumbers.first?.id
22+
}
23+
}
1924
} else {
2025
AttributedText(
2126
NSAttributedString(string: localizeString("NoTrustedPhones"))

0 commit comments

Comments
 (0)