diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
index 4658c7b02..6d112eae7 100644
--- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
+++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
@@ -391,6 +391,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
private ImageView searchUserButton;
private ImageView searchUpButton;
private ImageView searchDownButton;
+ private ImageView searchGoToBeginningButton;
private SearchCounterView searchCountText;
private ChatActionCell floatingDateView;
private ChatActionCell infoTopView;
@@ -7207,6 +7208,18 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
});
searchCalendarButton.setContentDescription(LocaleController.getString("JumpToDate", R.string.JumpToDate));
+ searchGoToBeginningButton = new ImageView(context);
+ searchGoToBeginningButton.setScaleType(ImageView.ScaleType.CENTER);
+ searchGoToBeginningButton.setImageResource(R.drawable.baseline_arrow_upward_24);
+ searchGoToBeginningButton.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_chat_searchPanelIcons), PorterDuff.Mode.SRC_IN));
+ searchGoToBeginningButton.setBackgroundDrawable(Theme.createSelectorDrawable(Theme.getColor(Theme.key_actionBarActionModeDefaultSelector), 1));
+ boolean showSearchUserButton = currentChat != null && (!ChatObject.isChannel(currentChat) || currentChat.megagroup);
+ searchContainer.addView(searchGoToBeginningButton, LayoutHelper.createFrame(48, 48, Gravity.LEFT | Gravity.TOP, showSearchUserButton ? 48 * 2 : 48, 0, 0, 0));
+ searchGoToBeginningButton.setOnClickListener(view -> {
+ scrollToMessageId(1, 0, false, 0, true, 0);
+ });
+ searchGoToBeginningButton.setContentDescription(LocaleController.getString("GoToBeginning", R.string.GoToBeginning));
+
searchCountText = new SearchCounterView(context);
// searchCountText.setTextColor(Theme.getColor(Theme.key_chat_searchPanelText));
// searchCountText.setTextSize(15);
diff --git a/TMessagesProj/src/main/res/values/strings.xml b/TMessagesProj/src/main/res/values/strings.xml
index e6a5bad1c..ab5a8662b 100644
--- a/TMessagesProj/src/main/res/values/strings.xml
+++ b/TMessagesProj/src/main/res/values/strings.xml
@@ -4409,4 +4409,5 @@
Name updated.
Channel title updated.
Channel description updated.
+ Go to Beginning