From f120800a7f6ba6b6d83bed42e1c8d662170b58cc Mon Sep 17 00:00:00 2001 From: DrKLO Date: Fri, 1 May 2020 13:16:27 +0300 Subject: [PATCH] Update to 6.1.1 (1947) --- TMessagesProj/build.gradle | 2 +- .../java/org/telegram/messenger/BuildVars.java | 2 +- .../Components/ChatAttachAlertPollLayout.java | 18 ++++++++++-------- .../org/telegram/ui/PollCreateActivity.java | 18 ++++++++++-------- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index 7b5b9bcdc..9a355bdda 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -286,7 +286,7 @@ android { } } - defaultConfig.versionCode = 1946 + defaultConfig.versionCode = 1947 def tgVoipDexFileName = "libtgvoip.dex" def tgVoipDexClasses = ["AudioRecordJNI", "AudioTrackJNI", "NativeTgVoipDelegate", "NativeTgVoipInstance", "TgVoipNativeLoader", "Resampler", "VLog"] diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java b/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java index bc7eca7ca..e103b2800 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 = 1946; + public static int BUILD_VERSION = 1947; public static String BUILD_VERSION_STRING = "6.1.0"; public static int APP_ID = 4; public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103"; diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlertPollLayout.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlertPollLayout.java index b54987f62..63b7cffb2 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlertPollLayout.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatAttachAlertPollLayout.java @@ -418,14 +418,16 @@ public class ChatAttachAlertPollLayout extends ChatAttachAlert.AttachAlertLayout params.put("answers", Utilities.bytesToHex(serializedData.toByteArray())); poll.results = new TLRPC.TL_pollResults(); CharSequence solution = getFixedString(solutionString); - poll.results.solution = solution.toString(); - CharSequence[] message = new CharSequence[]{solution}; - ArrayList entities = MediaDataController.getInstance(parentAlert.currentAccount).getEntities(message, true); - if (entities != null && !entities.isEmpty()) { - poll.results.solution_entities = entities; - } - if (!TextUtils.isEmpty(poll.results.solution)) { - poll.results.flags |= 16; + if (solution != null) { + poll.results.solution = solution.toString(); + CharSequence[] message = new CharSequence[]{solution}; + ArrayList entities = MediaDataController.getInstance(parentAlert.currentAccount).getEntities(message, true); + if (entities != null && !entities.isEmpty()) { + poll.results.solution_entities = entities; + } + if (!TextUtils.isEmpty(poll.results.solution)) { + poll.results.flags |= 16; + } } ChatActivity chatActivity = (ChatActivity) parentAlert.baseFragment; if (chatActivity.isInScheduleMode()) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/PollCreateActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/PollCreateActivity.java index 5fe3a4fe3..adfc4b35c 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/PollCreateActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/PollCreateActivity.java @@ -229,14 +229,16 @@ public class PollCreateActivity extends BaseFragment { params.put("answers", Utilities.bytesToHex(serializedData.toByteArray())); poll.results = new TLRPC.TL_pollResults(); CharSequence solution = ChatAttachAlertPollLayout.getFixedString(solutionString); - poll.results.solution = solution.toString(); - CharSequence[] message = new CharSequence[]{solution}; - ArrayList entities = getMediaDataController().getEntities(message, true); - if (entities != null && !entities.isEmpty()) { - poll.results.solution_entities = entities; - } - if (!TextUtils.isEmpty(poll.results.solution)) { - poll.results.flags |= 16; + if (solution != null) { + poll.results.solution = solution.toString(); + CharSequence[] message = new CharSequence[]{solution}; + ArrayList entities = getMediaDataController().getEntities(message, true); + if (entities != null && !entities.isEmpty()) { + poll.results.solution_entities = entities; + } + if (!TextUtils.isEmpty(poll.results.solution)) { + poll.results.flags |= 16; + } } if (parentFragment.isInScheduleMode()) { AlertsCreator.createScheduleDatePickerDialog(getParentActivity(), parentFragment.getDialogId(), (notify, scheduleDate) -> {