Skip to content

Commit 19599e6

Browse files
committedOct 15, 2020
Update to 7.1.3 (2103)
1 parent d3ad131 commit 19599e6

17 files changed

+125
-55
lines changed
 

‎TMessagesProj/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ dependencies {
3333
implementation 'com.google.android.gms:play-services-vision:16.2.0'
3434
implementation 'com.google.android.gms:play-services-wearable:17.0.0'
3535
implementation 'com.google.android.gms:play-services-location:17.1.0'
36-
implementation "com.microsoft.appcenter:appcenter-distribute:3.2.2"
37-
implementation "com.microsoft.appcenter:appcenter-crashes:3.2.2"
36+
implementation "com.microsoft.appcenter:appcenter-distribute:3.3.1"
37+
implementation "com.microsoft.appcenter:appcenter-crashes:3.3.1"
3838
implementation 'com.googlecode.mp4parser:isoparser:1.0.6'
3939
implementation 'com.stripe:stripe-android:2.0.2'
4040
implementation files('libs/libgsaverification-client.aar')
@@ -284,7 +284,7 @@ android {
284284
}
285285
}
286286

287-
defaultConfig.versionCode = 2100
287+
defaultConfig.versionCode = 2103
288288

289289
applicationVariants.all { variant ->
290290
variant.outputs.all { output ->

‎TMessagesProj/src/main/java/org/telegram/messenger/AndroidUtilities.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -2255,7 +2255,7 @@ public static File generatePicturePath(boolean secretChat, String ext) {
22552255
}
22562256

22572257
public static CharSequence generateSearchName(String name, String name2, String q) {
2258-
if (name == null && name2 == null) {
2258+
if (name == null && name2 == null || TextUtils.isEmpty(q)) {
22592259
return "";
22602260
}
22612261
SpannableStringBuilder builder = new SpannableStringBuilder();
@@ -2288,7 +2288,7 @@ public static CharSequence generateSearchName(String name, String name2, String
22882288

22892289
int start = builder.length();
22902290
builder.append(query);
2291-
builder.setSpan(new ForegroundColorSpan(Theme.getColor(Theme.key_windowBackgroundWhiteBlueText4)), start, start + query.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
2291+
builder.setSpan(new ForegroundColorSpanThemable(Theme.key_windowBackgroundWhiteBlueText4), start, start + query.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
22922292

22932293
lastIndex = end;
22942294
}

‎TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class BuildVars {
1818
public static boolean LOGS_ENABLED = false;
1919
public static boolean USE_CLOUD_STRINGS = true;
2020
public static boolean CHECK_UPDATES = true;
21-
public static int BUILD_VERSION = 2100;
21+
public static int BUILD_VERSION = 2103;
2222
public static String BUILD_VERSION_STRING = "7.1.0";
2323
public static int APP_ID = 4;
2424
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";

‎TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -10932,7 +10932,7 @@ public boolean processUpdateArray(ArrayList<TLRPC.Update> updates, final ArrayLi
1093210932
messages.put(message.dialog_id, arr);
1093310933
}
1093410934
arr.add(obj);
10935-
if ((!obj.isOut() || obj.messageOwner.from_scheduled) && obj.isUnread() && !ChatObject.isNotInChat(chat) && chat.min) {
10935+
if ((!obj.isOut() || obj.messageOwner.from_scheduled) && obj.isUnread() && (chat == null || !ChatObject.isNotInChat(chat) && !chat.min)) {
1093610936
if (pushMessages == null) {
1093710937
pushMessages = new ArrayList<>();
1093810938
}

‎TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java

+25-5
Original file line numberDiff line numberDiff line change
@@ -1533,7 +1533,11 @@ private TLRPC.messages_Dialogs loadDialogsByIds(String ids, ArrayList<Integer> u
15331533
}
15341534
if (message.replyMessage == null) {
15351535
long messageId = message.reply_to.reply_to_msg_id;
1536-
if (message.peer_id.channel_id != 0) {
1536+
if (message.reply_to.reply_to_peer_id != null) {
1537+
if (message.reply_to.reply_to_peer_id.channel_id != 0) {
1538+
messageId |= ((long) message.reply_to.reply_to_peer_id.channel_id) << 32;
1539+
}
1540+
} else if (message.peer_id.channel_id != 0) {
15371541
messageId |= ((long) message.peer_id.channel_id) << 32;
15381542
}
15391543
if (!replyMessages.contains(messageId)) {
@@ -2670,7 +2674,11 @@ public void loadUnreadMessages() {
26702674
}
26712675
if (message.replyMessage == null) {
26722676
long messageId = message.reply_to.reply_to_msg_id;
2673-
if (message.peer_id.channel_id != 0) {
2677+
if (message.reply_to.reply_to_peer_id != null) {
2678+
if (message.reply_to.reply_to_peer_id.channel_id != 0) {
2679+
messageId |= ((long) message.reply_to.reply_to_peer_id.channel_id) << 32;
2680+
}
2681+
} else if (message.peer_id.channel_id != 0) {
26742682
messageId |= ((long) message.peer_id.channel_id) << 32;
26752683
}
26762684
if (!replyMessages.contains(messageId)) {
@@ -5857,7 +5865,11 @@ public Runnable getMessagesInternal(long dialogId, long mergeDialogId, int count
58575865
if (message.replyMessage == null) {
58585866
if (message.reply_to.reply_to_msg_id != 0) {
58595867
long messageId = message.reply_to.reply_to_msg_id;
5860-
if (message.peer_id.channel_id != 0) {
5868+
if (message.reply_to.reply_to_peer_id != null) {
5869+
if (message.reply_to.reply_to_peer_id.channel_id != 0) {
5870+
messageId |= ((long) message.reply_to.reply_to_peer_id.channel_id) << 32;
5871+
}
5872+
} else if (message.peer_id.channel_id != 0) {
58615873
messageId |= ((long) message.peer_id.channel_id) << 32;
58625874
}
58635875
if (!replyMessages.contains(messageId)) {
@@ -6318,7 +6330,11 @@ public Runnable getMessagesInternal(long dialogId, long mergeDialogId, int count
63186330
if (message.replyMessage == null) {
63196331
if (message.reply_to.reply_to_msg_id != 0) {
63206332
long messageId = message.reply_to.reply_to_msg_id;
6321-
if (message.peer_id.channel_id != 0) {
6333+
if (message.reply_to.reply_to_peer_id != null) {
6334+
if (message.reply_to.reply_to_peer_id.channel_id != 0) {
6335+
messageId |= ((long) message.reply_to.reply_to_peer_id.channel_id) << 32;
6336+
}
6337+
} else if (message.peer_id.channel_id != 0) {
63226338
messageId |= ((long) message.peer_id.channel_id) << 32;
63236339
}
63246340
if (!replyMessages.contains(messageId)) {
@@ -10046,7 +10062,11 @@ public void getDialogs(final int folderId, final int offset, final int count, fi
1004610062
}
1004710063
if (message.replyMessage == null) {
1004810064
long messageId = message.reply_to.reply_to_msg_id;
10049-
if (message.peer_id.channel_id != 0) {
10065+
if (message.reply_to.reply_to_peer_id != null) {
10066+
if (message.reply_to.reply_to_peer_id.channel_id != 0) {
10067+
messageId |= ((long) message.reply_to.reply_to_peer_id.channel_id) << 32;
10068+
}
10069+
} else if (message.peer_id.channel_id != 0) {
1005010070
messageId |= ((long) message.peer_id.channel_id) << 32;
1005110071
}
1005210072
if (!replyMessages.contains(messageId)) {

‎TMessagesProj/src/main/java/org/telegram/ui/ActionBar/Theme.java

+14-7
Original file line numberDiff line numberDiff line change
@@ -2576,8 +2576,10 @@ public void run() {
25762576
public static final String key_chat_inAudioSelectedProgress = "chat_inAudioSelectedProgress";
25772577
public static final String key_chat_outAudioSelectedProgress = "chat_outAudioSelectedProgress";
25782578
public static final String key_chat_mediaTimeText = "chat_mediaTimeText";
2579-
public static final String key_chat_adminText = "chat_adminText";
2580-
public static final String key_chat_adminSelectedText = "chat_adminSelectedText";
2579+
public static final String key_chat_inAdminText = "chat_adminText";
2580+
public static final String key_chat_inAdminSelectedText = "chat_adminSelectedText";
2581+
public static final String key_chat_outAdminText = "chat_outAdminText";
2582+
public static final String key_chat_outAdminSelectedText = "chat_outAdminSelectedText";
25812583
public static final String key_chat_inTimeText = "chat_inTimeText";
25822584
public static final String key_chat_outTimeText = "chat_outTimeText";
25832585
public static final String key_chat_inTimeSelectedText = "chat_inTimeSelectedText";
@@ -3287,11 +3289,13 @@ public void run() {
32873289
defaultColors.put(key_chat_inAudioSelectedProgress, 0xffeff8fe);
32883290
defaultColors.put(key_chat_outAudioSelectedProgress, 0xffe1f8cf);
32893291
defaultColors.put(key_chat_mediaTimeText, 0xffffffff);
3292+
defaultColors.put(key_chat_inAdminText, 0xffc0c6cb);
3293+
defaultColors.put(key_chat_inAdminSelectedText, 0xff89b4c1);
3294+
defaultColors.put(key_chat_outAdminText, 0xff70b15c);
3295+
defaultColors.put(key_chat_outAdminSelectedText, 0xff70b15c);
32903296
defaultColors.put(key_chat_inTimeText, 0xffa1aab3);
3291-
defaultColors.put(key_chat_outTimeText, 0xff70b15c);
3292-
defaultColors.put(key_chat_adminText, 0xffc0c6cb);
3293-
defaultColors.put(key_chat_adminSelectedText, 0xff89b4c1);
32943297
defaultColors.put(key_chat_inTimeSelectedText, 0xff89b4c1);
3298+
defaultColors.put(key_chat_outTimeText, 0xff70b15c);
32953299
defaultColors.put(key_chat_outTimeSelectedText, 0xff70b15c);
32963300
defaultColors.put(key_chat_inAudioPerformerText, 0xff2f3438);
32973301
defaultColors.put(key_chat_inAudioPerformerSelectedText, 0xff2f3438);
@@ -3618,8 +3622,8 @@ public void run() {
36183622
defaultColors.put(key_statisticChartLineEmpty, 0xFFEEEEEE);
36193623
defaultColors.put(key_actionBarTipBackground, 0xFF446F94);
36203624

3621-
fallbackKeys.put(key_chat_adminText, key_chat_inTimeText);
3622-
fallbackKeys.put(key_chat_adminSelectedText, key_chat_inTimeSelectedText);
3625+
fallbackKeys.put(key_chat_inAdminText, key_chat_inTimeText);
3626+
fallbackKeys.put(key_chat_inAdminSelectedText, key_chat_inTimeSelectedText);
36233627
fallbackKeys.put(key_player_progressCachedBackground, key_player_progressBackground);
36243628
fallbackKeys.put(key_chat_inAudioCacheSeekbar, key_chat_inAudioSeekbar);
36253629
fallbackKeys.put(key_chat_outAudioCacheSeekbar, key_chat_outAudioSeekbar);
@@ -3747,6 +3751,9 @@ public void run() {
37473751
fallbackKeys.put(key_chat_inPsaNameText, key_avatar_nameInMessageGreen);
37483752
fallbackKeys.put(key_chat_outPsaNameText, key_avatar_nameInMessageGreen);
37493753

3754+
fallbackKeys.put(key_chat_outAdminText, key_chat_outTimeText);
3755+
fallbackKeys.put(key_chat_outAdminSelectedText, key_chat_outTimeSelectedText);
3756+
37503757
themeAccentExclusionKeys.addAll(Arrays.asList(keys_avatar_background));
37513758
themeAccentExclusionKeys.addAll(Arrays.asList(keys_avatar_nameInMessage));
37523759
themeAccentExclusionKeys.add(key_chat_attachFileBackground);

‎TMessagesProj/src/main/java/org/telegram/ui/Adapters/ContactsAdapter.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ public void setDisableSections(boolean value) {
7777
disableSections = value;
7878
}
7979

80-
public void setSortType(int value) {
80+
public void setSortType(int value, boolean force) {
8181
sortType = value;
8282
if (sortType == 2) {
83-
if (onlineContacts == null) {
83+
if (onlineContacts == null || force) {
8484
onlineContacts = new ArrayList<>(ContactsController.getInstance(currentAccount).contacts);
8585
int selfId = UserConfig.getInstance(currentAccount).clientUserId;
8686
for (int a = 0, N = onlineContacts.size(); a < N; a++) {
@@ -191,7 +191,7 @@ public Object getItem(int section, int position) {
191191
}
192192
}
193193
}
194-
if (needPhonebook) {
194+
if (needPhonebook && position >= 0 && position < ContactsController.getInstance(currentAccount).phoneBookContacts.size()) {
195195
return ContactsController.getInstance(currentAccount).phoneBookContacts.get(position);
196196
}
197197
return null;

‎TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -10067,7 +10067,12 @@ public void drawNamesLayout(Canvas canvas, float alpha) {
1006710067
nameLayout.draw(canvas);
1006810068
canvas.restore();
1006910069
if (adminLayout != null) {
10070-
int color = Theme.getColor(isDrawSelectionBackground() ? Theme.key_chat_adminSelectedText : Theme.key_chat_adminText);
10070+
int color;
10071+
if (currentMessageObject.isOutOwner()) {
10072+
color = Theme.getColor(isDrawSelectionBackground() ? Theme.key_chat_outAdminSelectedText : Theme.key_chat_outAdminText);
10073+
} else {
10074+
color = Theme.getColor(isDrawSelectionBackground() ? Theme.key_chat_inAdminSelectedText : Theme.key_chat_inAdminText);
10075+
}
1007110076
Theme.chat_adminPaint.setColor(color);
1007210077
canvas.save();
1007310078
float ax;

‎TMessagesProj/src/main/java/org/telegram/ui/Cells/SharingLiveLocationCell.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class SharingLiveLocationCell extends FrameLayout {
5454
private LocationActivity.LiveLocation liveLocation;
5555
private Location location = new Location("network");
5656

57-
private int currentAccount;
57+
private int currentAccount = UserConfig.selectedAccount;
5858

5959
private Runnable invalidateRunnable = new Runnable() {
6060
@Override

0 commit comments

Comments
 (0)
Please sign in to comment.