mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 09:49:21 +02:00
tune down green checkmark (#3828)
* remove green checkmarks from chatlist * remove green checkmark from contact lists * remove green checkmark from chat-protected info-message (DC_INFO_PROTECTION_ENABLED) * remove green checkmark from profile title * add green checkmark to "Introduced by..." line * when tapping chat-protected or chat-e2ee info-message, open help at #e2ee * update changelog * Update CHANGELOG.md Co-authored-by: Hocuri <hocuri@gmx.de> * add verified checkmark when verifier is unknown but contact is verified * Update CHANGELOG.md --------- Co-authored-by: Hocuri <hocuri@gmx.de> Co-authored-by: bjoern <r10s@b44t.com>
This commit is contained in:
parent
9c6271b1d1
commit
8b52a99327
13 changed files with 17 additions and 54 deletions
|
@ -18,6 +18,7 @@
|
|||
* After some time, add a device message asking to donate. Can't wait? Donate today at https://delta.chat/donate
|
||||
* Allow to sort profiles up in the profile switcher
|
||||
* Add new option to create unencrypted email thread
|
||||
* Green checkmarks are removed where they mostly refer to guaranteed encryption, which is the default now. They are still used for profile's "Introduced by"
|
||||
* Update to core 2.3.0
|
||||
|
||||
## v1.58.4
|
||||
|
|
|
@ -164,7 +164,7 @@ public class ConversationListItem extends RelativeLayout
|
|||
fromView.setCompoundDrawablesWithIntrinsicBounds(
|
||||
thread.isMuted()? R.drawable.ic_volume_off_grey600_18dp : 0,
|
||||
0,
|
||||
thread.isProtected()? R.drawable.ic_verified : 0,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
|
||||
|
|
|
@ -68,17 +68,6 @@ public class ConversationTitleView extends RelativeLayout {
|
|||
title.setText(dcChat.getName());
|
||||
String subtitleStr = null;
|
||||
|
||||
// set icons etc.
|
||||
int imgLeft = 0;
|
||||
int imgRight = 0;
|
||||
|
||||
if (dcChat.isMuted()) {
|
||||
imgLeft = R.drawable.ic_volume_off_white_18dp;
|
||||
}
|
||||
if (dcChat.isProtected()) {
|
||||
imgRight = R.drawable.ic_verified;
|
||||
}
|
||||
|
||||
boolean isOnline = false;
|
||||
int[] chatContacts = dcContext.getChatContacts(chatId);
|
||||
if (dcChat.isMailingList()) {
|
||||
|
@ -117,7 +106,8 @@ public class ConversationTitleView extends RelativeLayout {
|
|||
|
||||
avatar.setAvatar(glideRequests, new Recipient(getContext(), dcChat), false);
|
||||
avatar.setSeenRecently(isOnline);
|
||||
title.setCompoundDrawablesWithIntrinsicBounds(imgLeft, 0, imgRight, 0);
|
||||
int imgLeft = dcChat.isMuted()? R.drawable.ic_volume_off_white_18dp : 0;
|
||||
title.setCompoundDrawablesWithIntrinsicBounds(imgLeft, 0, 0, 0);
|
||||
if (!TextUtils.isEmpty(subtitleStr)) {
|
||||
subtitle.setText(subtitleStr);
|
||||
subtitle.setVisibility(View.VISIBLE);
|
||||
|
@ -135,13 +125,7 @@ public class ConversationTitleView extends RelativeLayout {
|
|||
avatar.setAvatar(glideRequests, new Recipient(getContext(), contact), false);
|
||||
avatar.setSeenRecently(contact.wasSeenRecently());
|
||||
|
||||
int imgRight = 0;
|
||||
if (contact.isVerified()) {
|
||||
imgRight = R.drawable.ic_verified;
|
||||
}
|
||||
|
||||
title.setText(contact.getDisplayName());
|
||||
title.setCompoundDrawablesWithIntrinsicBounds(0, 0, imgRight, 0);
|
||||
subtitle.setText(contact.getAddr());
|
||||
subtitle.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ public class ConversationUpdateItem extends BaseConversationItem
|
|||
{
|
||||
private DeliveryStatusView deliveryStatusView;
|
||||
private AppCompatImageView appIcon;
|
||||
private AppCompatImageView verifiedIcon;
|
||||
private int textColor;
|
||||
|
||||
public ConversationUpdateItem(Context context) {
|
||||
|
@ -46,7 +45,6 @@ public class ConversationUpdateItem extends BaseConversationItem
|
|||
bodyText = findViewById(R.id.conversation_update_body);
|
||||
deliveryStatusView = new DeliveryStatusView(findViewById(R.id.delivery_indicator));
|
||||
appIcon = findViewById(R.id.app_icon);
|
||||
verifiedIcon = findViewById(R.id.verified_icon);
|
||||
|
||||
|
||||
bodyText.setOnLongClickListener(passthroughClickListener);
|
||||
|
@ -113,13 +111,6 @@ public class ConversationUpdateItem extends BaseConversationItem
|
|||
appIcon.setVisibility(GONE);
|
||||
}
|
||||
|
||||
if (infoType == DcMsg.DC_INFO_PROTECTION_ENABLED) {
|
||||
verifiedIcon.setVisibility(VISIBLE);
|
||||
verifiedIcon.setImageResource(R.drawable.ic_verified);
|
||||
} else {
|
||||
verifiedIcon.setVisibility(GONE);
|
||||
}
|
||||
|
||||
bodyText.setText(messageRecord.getDisplayBody());
|
||||
bodyText.setVisibility(VISIBLE);
|
||||
|
||||
|
|
|
@ -210,7 +210,8 @@ public class ProfileAdapter extends RecyclerView.Adapter
|
|||
else if(holder.itemView instanceof ProfileTextItem) {
|
||||
ProfileTextItem item = (ProfileTextItem) holder.itemView;
|
||||
item.setOnClickListener(view -> clickListener.onSettingsClicked(data.viewType));
|
||||
item.set(data.label, data.icon);
|
||||
boolean tintIcon = data.viewType != ITEM_INTRODUCED_BY;
|
||||
item.set(data.label, data.icon, tintIcon);
|
||||
if (data.viewType == ITEM_LAST_SEEN || data.viewType == ITEM_ADDRESS) {
|
||||
int padding = (int)((float)context.getResources().getDimensionPixelSize(R.dimen.contact_list_normal_padding) * 1.2);
|
||||
item.setPadding(item.getPaddingLeft(), item.getPaddingTop(), item.getPaddingRight(), padding);
|
||||
|
@ -339,7 +340,10 @@ public class ProfileAdapter extends RecyclerView.Adapter
|
|||
} else {
|
||||
introducedBy = context.getString(R.string.verified_by, dcContext.getContact(verifierId).getDisplayName());
|
||||
}
|
||||
itemData.add(new ItemData(ITEM_INTRODUCED_BY, introducedBy, 0));
|
||||
itemData.add(new ItemData(ITEM_INTRODUCED_BY, introducedBy, dcContact.isVerified()? R.drawable.ic_verified : 0));
|
||||
} else if (dcContact.isVerified()) {
|
||||
String introducedBy = context.getString(R.string.verified_by_unknown);
|
||||
itemData.add(new ItemData(ITEM_INTRODUCED_BY, introducedBy, R.drawable.ic_verified));
|
||||
}
|
||||
|
||||
if (dcContact != null) {
|
||||
|
|
|
@ -50,12 +50,10 @@ public class ProfileAvatarItem extends LinearLayout implements RecipientModified
|
|||
this.glideRequests = glideRequests;
|
||||
|
||||
String name = "";
|
||||
boolean greenCheckmark = false;
|
||||
String subtitle = null;
|
||||
if (dcChat != null) {
|
||||
recipient = new Recipient(getContext(), dcChat);
|
||||
name = dcChat.getName();
|
||||
greenCheckmark = dcChat.isProtected();
|
||||
|
||||
if (dcChat.isMailingList()) {
|
||||
subtitle = dcChat.getMailinglistAddr();
|
||||
|
@ -67,7 +65,6 @@ public class ProfileAvatarItem extends LinearLayout implements RecipientModified
|
|||
} else if (dcContact != null) {
|
||||
recipient = new Recipient(getContext(), dcContact);
|
||||
name = dcContact.getDisplayName();
|
||||
greenCheckmark = dcContact.isVerified();
|
||||
}
|
||||
|
||||
recipient.addListener(this);
|
||||
|
@ -75,7 +72,6 @@ public class ProfileAvatarItem extends LinearLayout implements RecipientModified
|
|||
avatarView.setSeenRecently(dcContact != null && dcContact.wasSeenRecently());
|
||||
|
||||
nameView.setText(name);
|
||||
nameView.setCompoundDrawablesWithIntrinsicBounds(0,0, greenCheckmark ? R.drawable.ic_verified : 0, 0);
|
||||
|
||||
if (subtitle != null) {
|
||||
subtitleView.setVisibility(View.VISIBLE);
|
||||
|
|
|
@ -34,7 +34,7 @@ public class ProfileTextItem extends LinearLayout {
|
|||
valueView = findViewById(R.id.value);
|
||||
}
|
||||
|
||||
public void set(String label, int icon) {
|
||||
public void set(String label, int icon, boolean tint) {
|
||||
labelView.setText(label);
|
||||
|
||||
if (icon != 0) {
|
||||
|
@ -42,7 +42,9 @@ public class ProfileTextItem extends LinearLayout {
|
|||
if (orgDrawable != null) {
|
||||
Drawable drawable = orgDrawable.mutate(); // avoid global state modification and showing eg. app-icon tinted also elsewhere
|
||||
drawable = DrawableCompat.wrap(drawable);
|
||||
DrawableCompat.setTint(drawable, getResources().getColor(R.color.delta_accent));
|
||||
if (tint) {
|
||||
DrawableCompat.setTint(drawable, getResources().getColor(R.color.delta_accent));
|
||||
}
|
||||
labelView.setCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -462,7 +462,7 @@ public class DcHelper {
|
|||
public static void showProtectionEnabledDialog(Context context) {
|
||||
new AlertDialog.Builder(context)
|
||||
.setMessage(context.getString(R.string.chat_protection_enabled_explanation))
|
||||
.setNeutralButton(R.string.learn_more, (d, w) -> openHelp(context, "#e2eeguarantee"))
|
||||
.setNeutralButton(R.string.learn_more, (d, w) -> openHelp(context, "#e2ee"))
|
||||
.setPositiveButton(R.string.ok, null)
|
||||
.setCancelable(true)
|
||||
.show();
|
||||
|
|
|
@ -123,11 +123,6 @@ public class ContactSelectionListItem extends LinearLayout implements RecipientM
|
|||
else {
|
||||
this.numberContainer.setVisibility(View.GONE);
|
||||
}
|
||||
if (contact != null && contact.isVerified()) {
|
||||
nameView.setCompoundDrawablesWithIntrinsicBounds(0,0,R.drawable.ic_verified,0);
|
||||
} else {
|
||||
nameView.setCompoundDrawablesWithIntrinsicBounds(0,0, 0,0);
|
||||
}
|
||||
}
|
||||
|
||||
public int getSpecialId() {
|
||||
|
|
|
@ -111,7 +111,6 @@ public class SelectedContactsAdapter extends BaseAdapter {
|
|||
final int contactId = (int)getItem(position);
|
||||
final boolean modifiable = contactId != DC_CONTACT_ID_ADD_MEMBER && contactId != DC_CONTACT_ID_SELF;
|
||||
Recipient recipient = null;
|
||||
boolean verified = false;
|
||||
|
||||
if(contactId == DcContact.DC_CONTACT_ID_ADD_MEMBER) {
|
||||
name.setText(context.getString(isBroadcast || isUnencrypted? R.string.add_recipients : R.string.group_add_members));
|
||||
|
@ -124,12 +123,10 @@ public class SelectedContactsAdapter extends BaseAdapter {
|
|||
name.setTypeface(null, Typeface.NORMAL);
|
||||
phone.setText(dcContact.getAddr());
|
||||
phone.setVisibility(View.VISIBLE);
|
||||
verified = dcContact.isVerified();
|
||||
}
|
||||
|
||||
avatar.clear(glideRequests);
|
||||
avatar.setAvatar(glideRequests, recipient, false);
|
||||
name.setCompoundDrawablesWithIntrinsicBounds(0, 0, verified? R.drawable.ic_verified : 0, 0);
|
||||
delete.setVisibility(modifiable ? View.VISIBLE : View.GONE);
|
||||
delete.setColorFilter(DynamicTheme.isDarkTheme(context)? Color.WHITE : Color.BLACK);
|
||||
delete.setOnClickListener(view -> {
|
||||
|
|
|
@ -13,15 +13,6 @@
|
|||
android:paddingLeft="28dp"
|
||||
android:paddingRight="28dp">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/verified_icon"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
tools:src="@drawable/ic_verified"
|
||||
android:padding="7dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start|center_vertical"
|
||||
android:drawablePadding="5dp"
|
||||
android:textSize="16sp"
|
||||
android:textColor="?attr/conversation_list_item_contact_color" />
|
||||
|
||||
|
|
|
@ -1048,6 +1048,7 @@
|
|||
<!-- Shown in contact profile. The placeholder will be replaced by the name of the contact that introduced the contact. -->
|
||||
<string name="verified_by">Introduced by %1$s</string>
|
||||
<string name="verified_by_you">Introduced by me</string>
|
||||
<string name="verified_by_unknown">Introduced</string>
|
||||
<!-- deprecated, was stock string -->
|
||||
<string name="contact_setup_changed">Changed setup for %1$s.</string>
|
||||
<string name="verified_contact_required_explain">To guarantee end-to-end-encryption, you can only add contacts with a green checkmark to this group.\n\nYou may meet contacts in person and scan their QR Code to introduce them.</string>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue