From c623952aa2a7b769ea5ff1ab355d83f20637393e Mon Sep 17 00:00:00 2001 From: DrKLO Date: Thu, 23 Jan 2020 17:57:54 +0300 Subject: [PATCH] Update to 5.14.0 (1849) --- TMessagesProj/build.gradle | 2 +- .../java/org/telegram/messenger/BuildVars.java | 2 +- .../main/java/org/telegram/ui/ChatActivity.java | 16 +++++++++++++--- .../main/java/org/telegram/ui/ThemeActivity.java | 2 +- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index ae11a3a86..197aefc67 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -283,7 +283,7 @@ android { } } - defaultConfig.versionCode = 1848 + defaultConfig.versionCode = 1849 applicationVariants.all { variant -> variant.outputs.all { output -> diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java b/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java index d7ae0f19b..5e6698cbc 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java @@ -19,7 +19,7 @@ public class BuildVars { public static boolean USE_CLOUD_STRINGS = true; public static boolean CHECK_UPDATES = true; public static boolean TON_WALLET_STANDALONE = false; - public static int BUILD_VERSION = 1848; + public static int BUILD_VERSION = 1849; public static String BUILD_VERSION_STRING = "5.14.0"; public static int APP_ID = 4; public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103"; diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index bb5204af0..18a76f0ff 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -2960,11 +2960,11 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not holder = chatListView.findViewHolderForAdapterPosition(prevPosition); if (holder != null) { top = holder.itemView.getTop(); - if (y - AndroidUtilities.dp(48) < holder.itemView.getBottom()) { - tx = Math.min(holder.itemView.getTranslationX(), tx); - } if (holder.itemView instanceof ChatMessageCell) { cell = (ChatMessageCell) holder.itemView; + if (y - AndroidUtilities.dp(48) < holder.itemView.getBottom()) { + //tx = Math.min(cell.getTranslationX(), tx); + } if (!cell.isPinnedTop()) { break; } @@ -10305,6 +10305,16 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not dayArray.add(0, obj); + if (chatAdapter != null && placeToPaste >= 0 && placeToPaste < messages.size()) { + MessageObject prevMessage = messages.get(placeToPaste); + if (prevMessage.hasValidGroupId() && prevMessage.getGroupId() != obj.getGroupId()) { + MessageObject.GroupedMessages group = groupedMessagesMap.get(prevMessage.getGroupId()); + if (group != null && group.messages.size() > 1) { + int size = group.messages.size(); + chatAdapter.notifyItemRangeChanged(1, size - 1); + } + } + } messages.add(placeToPaste, obj); if (chatAdapter != null) { chatAdapter.notifyItemChanged(placeToPaste); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ThemeActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ThemeActivity.java index b28db8d4f..bbb4161a2 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ThemeActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ThemeActivity.java @@ -1012,7 +1012,7 @@ public class ThemeActivity extends BaseFragment implements NotificationCenter.No } int fontSize = AndroidUtilities.isTablet() ? 18 : 16; Theme.ThemeInfo currentTheme = Theme.getCurrentTheme(); - if (SharedConfig.fontSize != fontSize || SharedConfig.bubbleRadius != 6 || !currentTheme.firstAccentIsDefault || currentTheme.currentAccentId != Theme.DEFALT_THEME_ACCENT_ID) { + if (SharedConfig.fontSize != fontSize || SharedConfig.bubbleRadius != 10 || !currentTheme.firstAccentIsDefault || currentTheme.currentAccentId != Theme.DEFALT_THEME_ACCENT_ID) { menuItem.showSubItem(reset_settings); } else { menuItem.hideSubItem(reset_settings);