diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Adapters/ContactsAdapter.java b/TMessagesProj/src/main/java/org/telegram/ui/Adapters/ContactsAdapter.java
index b74ed07620..651985dab9 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Adapters/ContactsAdapter.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Adapters/ContactsAdapter.java
@@ -353,7 +353,7 @@ public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType
View view;
switch (viewType) {
case 0:
- view = new UserCell(mContext, 58, 1, false);
+ view = new UserCell(mContext, 58, 1, false, false, true);
break;
case 1:
view = new TextCell(mContext);
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java
index 230b87ca92..e47fc4d8c4 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java
@@ -14601,6 +14601,10 @@ public void setAnimationRunning(boolean animationRunning, boolean willRemoved) {
}
}
+ public boolean isSeekbarCell() {
+ return currentMessageObject.isVoice() || currentMessageObject.isRoundVideo() || currentMessageObject.isMusic();
+ }
+
@Override
public boolean onHoverEvent(MotionEvent event) {
int x = (int) event.getX();
diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/UserCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/UserCell.java
index 74f43465d3..8a1972a472 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/UserCell.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/UserCell.java
@@ -26,6 +26,7 @@
import org.telegram.messenger.ImageLocation;
import org.telegram.messenger.LocaleController;
import org.telegram.messenger.MessagesController;
+import org.telegram.messenger.NotificationCenter;
import org.telegram.messenger.UserObject;
import org.telegram.messenger.R;
import org.telegram.tgnet.ConnectionsManager;
@@ -34,6 +35,7 @@
import org.telegram.ui.ActionBar.Theme;
import org.telegram.ui.Components.AvatarDrawable;
import org.telegram.ui.Components.BackupImageView;
+import org.telegram.ui.Components.Bulletin;
import org.telegram.ui.Components.CheckBox;
import org.telegram.ui.Components.CheckBoxSquare;
import org.telegram.ui.Components.LayoutHelper;
@@ -50,6 +52,7 @@ public class UserCell extends FrameLayout {
private CheckBoxSquare checkBoxBig;
private TextView adminTextView;
private TextView addButton;
+ private ImageView mutualView;
private AvatarDrawable avatarDrawable;
private Object currentObject;
@@ -78,6 +81,10 @@ public UserCell(Context context, int padding, int checkbox, boolean admin) {
}
public UserCell(Context context, int padding, int checkbox, boolean admin, boolean needAddButton) {
+ this(context, padding, checkbox, admin, needAddButton, false);
+ }
+
+ public UserCell(Context context, int padding, int checkbox, boolean admin, boolean needAddButton, boolean needMutualIcon) {
super(context);
int additionalPadding;
@@ -140,6 +147,18 @@ public UserCell(Context context, int padding, int checkbox, boolean admin, boole
addView(adminTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.TOP, LocaleController.isRTL ? 23 : 0, 10, LocaleController.isRTL ? 0 : 23, 0));
}
+ if (needMutualIcon) {
+ mutualView = new ImageView(context);
+ mutualView.setImageResource(R.drawable.ic_round_swap_horiz_24);
+ mutualView.setBackground(Theme.createSelectorDrawable(Theme.getColor(Theme.key_player_actionBarSelector)));
+ mutualView.setScaleType(ImageView.ScaleType.CENTER);
+ mutualView.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_windowBackgroundWhiteGrayIcon), PorterDuff.Mode.MULTIPLY));
+ mutualView.setVisibility(GONE);
+ mutualView.setContentDescription(LocaleController.getString("MutualContact", R.string.MutualContact));
+ mutualView.setOnClickListener(v -> NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.showBulletin, Bulletin.TYPE_ERROR, LocaleController.getString("MutualContactDescription", R.string.MutualContactDescription)));
+ addView(mutualView, LayoutHelper.createFrame(40, 40, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.CENTER_VERTICAL, LocaleController.isRTL ? 8 : 0, 0, LocaleController.isRTL ? 0 : 8, 0));
+ }
+
setFocusable(true);
}
@@ -490,6 +509,10 @@ public void update(int mask) {
if (adminTextView != null) {
adminTextView.setTextColor(Theme.getColor(Theme.key_profile_creatorIcon));
}
+
+ if (mutualView != null) {
+ mutualView.setVisibility(currentUser != null && currentUser.mutual_contact ? VISIBLE : GONE);
+ }
}
public void setSelfAsSavedMessages(boolean value) {
diff --git a/TMessagesProj/src/main/res/drawable/ic_round_swap_horiz_24.xml b/TMessagesProj/src/main/res/drawable/ic_round_swap_horiz_24.xml
new file mode 100644
index 0000000000..1ba2dbf2cf
--- /dev/null
+++ b/TMessagesProj/src/main/res/drawable/ic_round_swap_horiz_24.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/TMessagesProj/src/main/res/values/strings_neko.xml b/TMessagesProj/src/main/res/values/strings_neko.xml
index 6fa8a3e0ae..d8ba7dfb2c 100644
--- a/TMessagesProj/src/main/res/values/strings_neko.xml
+++ b/TMessagesProj/src/main/res/values/strings_neko.xml
@@ -145,4 +145,6 @@
Force enable Chat Blur
Chat Blur Alpha
Choose an icon
+ Mutual contact
+ This contact is a mutual contact.