Merge remote-tracking branch 'telegram/master'

This commit is contained in:
NekoInverter 2020-05-01 18:31:27 +08:00
commit a8643fdc30
No known key found for this signature in database
GPG Key ID: 280D6CCCF95715F9
4 changed files with 22 additions and 18 deletions

View File

@ -296,7 +296,7 @@ android {
}
}
defaultConfig.versionCode = 10 * 1946
defaultConfig.versionCode = 10 * 1947
def tgVoipDexFileName = "libtgvoip.dex"
def tgVoipDexClasses = ["AudioRecordJNI", "AudioTrackJNI", "NativeTgVoipDelegate", "NativeTgVoipInstance", "TgVoipNativeLoader", "Resampler", "VLog"]

View File

@ -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 = 336779;
public static String APP_HASH = "b91eefacc86747c068c8d8a16b41500d";

View File

@ -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<TLRPC.MessageEntity> 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<TLRPC.MessageEntity> 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()) {

View File

@ -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<TLRPC.MessageEntity> 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<TLRPC.MessageEntity> 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) -> {