Skip to content

Commit

Permalink
Merge pull request #462 from redryerye/feat/preselect-phonenumber
Browse files Browse the repository at this point in the history
Add default phone number selection when there is only one
  • Loading branch information
MattKiazyk authored Dec 20, 2023
2 parents 6385430 + 36a9bd2 commit c85b3c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Xcodes/Frontend/SignIn/SignInPhoneListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit c85b3c2

Please sign in to comment.