Skip to content

Commit

Permalink
add default phone number selection when there is only one
Browse files Browse the repository at this point in the history
  • Loading branch information
redryerye committed Dec 19, 2023
1 parent 6385430 commit 36a9bd2
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 36a9bd2

Please sign in to comment.