Skip to content

Commit

Permalink
Display account preferred email
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Ruesga <[email protected]>
  • Loading branch information
jruesga committed May 3, 2020
1 parent 969a0dd commit 4d4f06b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/src/main/java/com/ruesga/rview/misc/Formatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -690,11 +690,14 @@ public static void toAccountEmails(TextView v, AccountDetailInfo account) {

StringBuilder emails = new StringBuilder(account.email);
if (account.secondaryEmails != null) {
emails.append(" <b>")
.append(v.getContext().getString(R.string.account_details_emails_preferred))
.append("</b>");
for (String email : account.secondaryEmails) {
emails.append("\n").append(email);
emails.append("<br/>").append(email);
}
}
v.setText(emails.toString());
v.setText(Html.fromHtml(emails.toString()));
}

@BindingAdapter("projectStatus")
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@
<string name="account_details_display_name">Display Name</string>
<string name="account_details_name">Name</string>
<string name="account_details_emails">Emails</string>
<string name="account_details_emails_preferred"> (preferred)</string>
<string name="account_details_registered_on">Registered</string>
<string name="account_details_status">Status</string>
<string name="account_details_active">Active</string>
Expand Down

0 comments on commit 4d4f06b

Please sign in to comment.