From 96fb9c741ae6decd14bd858cb6d5efd4356ca4fc Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Mon, 5 Aug 2024 17:09:10 +0200 Subject: [PATCH] profile switcher: hide email for chatmail profiles as on other places, hide chatmail email address from primary UI as well in the account switcher. non-chatmail addresses will stay for now; we are considering to add a "tag" or sth. like that for the user to differenciate between accounts if they're using same name+avatar. this also makes the dialog more on-point and easier to read. --- .../securesms/accounts/AccountSelectionListAdapter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/thoughtcrime/securesms/accounts/AccountSelectionListAdapter.java b/src/main/java/org/thoughtcrime/securesms/accounts/AccountSelectionListAdapter.java index 4ceaba93f..c64a29894 100644 --- a/src/main/java/org/thoughtcrime/securesms/accounts/AccountSelectionListAdapter.java +++ b/src/main/java/org/thoughtcrime/securesms/accounts/AccountSelectionListAdapter.java @@ -104,10 +104,12 @@ public class AccountSelectionListAdapter extends RecyclerView.Adapter name = context.getString(R.string.add_account); } else { dcContact = dcContext.getContact(DcContact.DC_CONTACT_ID_SELF); - addr = dcContact.getAddr(); name = dcContext.getConfig("displayname"); if (TextUtils.isEmpty(name)) { - name = addr; + name = dcContact.getAddr(); + } + if (!dcContext.isChatmail()) { + addr = dcContact.getAddr(); } unreadCount = dcContext.getFreshMsgs().length; }