Skip to content

Commit

Permalink
Update to 7.1.3 (2103)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrKLO committed Oct 15, 2020
1 parent d3ad131 commit 19599e6
Show file tree
Hide file tree
Showing 17 changed files with 125 additions and 55 deletions.
6 changes: 3 additions & 3 deletions TMessagesProj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ dependencies {
implementation 'com.google.android.gms:play-services-vision:16.2.0'
implementation 'com.google.android.gms:play-services-wearable:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.1.0'
implementation "com.microsoft.appcenter:appcenter-distribute:3.2.2"
implementation "com.microsoft.appcenter:appcenter-crashes:3.2.2"
implementation "com.microsoft.appcenter:appcenter-distribute:3.3.1"
implementation "com.microsoft.appcenter:appcenter-crashes:3.3.1"
implementation 'com.googlecode.mp4parser:isoparser:1.0.6'
implementation 'com.stripe:stripe-android:2.0.2'
implementation files('libs/libgsaverification-client.aar')
Expand Down Expand Up @@ -284,7 +284,7 @@ android {
}
}

defaultConfig.versionCode = 2100
defaultConfig.versionCode = 2103

applicationVariants.all { variant ->
variant.outputs.all { output ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2255,7 +2255,7 @@ public static File generatePicturePath(boolean secretChat, String ext) {
}

public static CharSequence generateSearchName(String name, String name2, String q) {
if (name == null && name2 == null) {
if (name == null && name2 == null || TextUtils.isEmpty(q)) {
return "";
}
SpannableStringBuilder builder = new SpannableStringBuilder();
Expand Down Expand Up @@ -2288,7 +2288,7 @@ public static CharSequence generateSearchName(String name, String name2, String

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

lastIndex = end;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class BuildVars {
public static boolean LOGS_ENABLED = false;
public static boolean USE_CLOUD_STRINGS = true;
public static boolean CHECK_UPDATES = true;
public static int BUILD_VERSION = 2100;
public static int BUILD_VERSION = 2103;
public static String BUILD_VERSION_STRING = "7.1.0";
public static int APP_ID = 4;
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10932,7 +10932,7 @@ public boolean processUpdateArray(ArrayList<TLRPC.Update> updates, final ArrayLi
messages.put(message.dialog_id, arr);
}
arr.add(obj);
if ((!obj.isOut() || obj.messageOwner.from_scheduled) && obj.isUnread() && !ChatObject.isNotInChat(chat) && chat.min) {
if ((!obj.isOut() || obj.messageOwner.from_scheduled) && obj.isUnread() && (chat == null || !ChatObject.isNotInChat(chat) && !chat.min)) {
if (pushMessages == null) {
pushMessages = new ArrayList<>();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,11 @@ private TLRPC.messages_Dialogs loadDialogsByIds(String ids, ArrayList<Integer> u
}
if (message.replyMessage == null) {
long messageId = message.reply_to.reply_to_msg_id;
if (message.peer_id.channel_id != 0) {
if (message.reply_to.reply_to_peer_id != null) {
if (message.reply_to.reply_to_peer_id.channel_id != 0) {
messageId |= ((long) message.reply_to.reply_to_peer_id.channel_id) << 32;
}
} else if (message.peer_id.channel_id != 0) {
messageId |= ((long) message.peer_id.channel_id) << 32;
}
if (!replyMessages.contains(messageId)) {
Expand Down Expand Up @@ -2670,7 +2674,11 @@ public void loadUnreadMessages() {
}
if (message.replyMessage == null) {
long messageId = message.reply_to.reply_to_msg_id;
if (message.peer_id.channel_id != 0) {
if (message.reply_to.reply_to_peer_id != null) {
if (message.reply_to.reply_to_peer_id.channel_id != 0) {
messageId |= ((long) message.reply_to.reply_to_peer_id.channel_id) << 32;
}
} else if (message.peer_id.channel_id != 0) {
messageId |= ((long) message.peer_id.channel_id) << 32;
}
if (!replyMessages.contains(messageId)) {
Expand Down Expand Up @@ -5857,7 +5865,11 @@ public Runnable getMessagesInternal(long dialogId, long mergeDialogId, int count
if (message.replyMessage == null) {
if (message.reply_to.reply_to_msg_id != 0) {
long messageId = message.reply_to.reply_to_msg_id;
if (message.peer_id.channel_id != 0) {
if (message.reply_to.reply_to_peer_id != null) {
if (message.reply_to.reply_to_peer_id.channel_id != 0) {
messageId |= ((long) message.reply_to.reply_to_peer_id.channel_id) << 32;
}
} else if (message.peer_id.channel_id != 0) {
messageId |= ((long) message.peer_id.channel_id) << 32;
}
if (!replyMessages.contains(messageId)) {
Expand Down Expand Up @@ -6318,7 +6330,11 @@ public Runnable getMessagesInternal(long dialogId, long mergeDialogId, int count
if (message.replyMessage == null) {
if (message.reply_to.reply_to_msg_id != 0) {
long messageId = message.reply_to.reply_to_msg_id;
if (message.peer_id.channel_id != 0) {
if (message.reply_to.reply_to_peer_id != null) {
if (message.reply_to.reply_to_peer_id.channel_id != 0) {
messageId |= ((long) message.reply_to.reply_to_peer_id.channel_id) << 32;
}
} else if (message.peer_id.channel_id != 0) {
messageId |= ((long) message.peer_id.channel_id) << 32;
}
if (!replyMessages.contains(messageId)) {
Expand Down Expand Up @@ -10046,7 +10062,11 @@ public void getDialogs(final int folderId, final int offset, final int count, fi
}
if (message.replyMessage == null) {
long messageId = message.reply_to.reply_to_msg_id;
if (message.peer_id.channel_id != 0) {
if (message.reply_to.reply_to_peer_id != null) {
if (message.reply_to.reply_to_peer_id.channel_id != 0) {
messageId |= ((long) message.reply_to.reply_to_peer_id.channel_id) << 32;
}
} else if (message.peer_id.channel_id != 0) {
messageId |= ((long) message.peer_id.channel_id) << 32;
}
if (!replyMessages.contains(messageId)) {
Expand Down
21 changes: 14 additions & 7 deletions TMessagesProj/src/main/java/org/telegram/ui/ActionBar/Theme.java
Original file line number Diff line number Diff line change
Expand Up @@ -2576,8 +2576,10 @@ public void run() {
public static final String key_chat_inAudioSelectedProgress = "chat_inAudioSelectedProgress";
public static final String key_chat_outAudioSelectedProgress = "chat_outAudioSelectedProgress";
public static final String key_chat_mediaTimeText = "chat_mediaTimeText";
public static final String key_chat_adminText = "chat_adminText";
public static final String key_chat_adminSelectedText = "chat_adminSelectedText";
public static final String key_chat_inAdminText = "chat_adminText";
public static final String key_chat_inAdminSelectedText = "chat_adminSelectedText";
public static final String key_chat_outAdminText = "chat_outAdminText";
public static final String key_chat_outAdminSelectedText = "chat_outAdminSelectedText";
public static final String key_chat_inTimeText = "chat_inTimeText";
public static final String key_chat_outTimeText = "chat_outTimeText";
public static final String key_chat_inTimeSelectedText = "chat_inTimeSelectedText";
Expand Down Expand Up @@ -3287,11 +3289,13 @@ public void run() {
defaultColors.put(key_chat_inAudioSelectedProgress, 0xffeff8fe);
defaultColors.put(key_chat_outAudioSelectedProgress, 0xffe1f8cf);
defaultColors.put(key_chat_mediaTimeText, 0xffffffff);
defaultColors.put(key_chat_inAdminText, 0xffc0c6cb);
defaultColors.put(key_chat_inAdminSelectedText, 0xff89b4c1);
defaultColors.put(key_chat_outAdminText, 0xff70b15c);
defaultColors.put(key_chat_outAdminSelectedText, 0xff70b15c);
defaultColors.put(key_chat_inTimeText, 0xffa1aab3);
defaultColors.put(key_chat_outTimeText, 0xff70b15c);
defaultColors.put(key_chat_adminText, 0xffc0c6cb);
defaultColors.put(key_chat_adminSelectedText, 0xff89b4c1);
defaultColors.put(key_chat_inTimeSelectedText, 0xff89b4c1);
defaultColors.put(key_chat_outTimeText, 0xff70b15c);
defaultColors.put(key_chat_outTimeSelectedText, 0xff70b15c);
defaultColors.put(key_chat_inAudioPerformerText, 0xff2f3438);
defaultColors.put(key_chat_inAudioPerformerSelectedText, 0xff2f3438);
Expand Down Expand Up @@ -3618,8 +3622,8 @@ public void run() {
defaultColors.put(key_statisticChartLineEmpty, 0xFFEEEEEE);
defaultColors.put(key_actionBarTipBackground, 0xFF446F94);

fallbackKeys.put(key_chat_adminText, key_chat_inTimeText);
fallbackKeys.put(key_chat_adminSelectedText, key_chat_inTimeSelectedText);
fallbackKeys.put(key_chat_inAdminText, key_chat_inTimeText);
fallbackKeys.put(key_chat_inAdminSelectedText, key_chat_inTimeSelectedText);
fallbackKeys.put(key_player_progressCachedBackground, key_player_progressBackground);
fallbackKeys.put(key_chat_inAudioCacheSeekbar, key_chat_inAudioSeekbar);
fallbackKeys.put(key_chat_outAudioCacheSeekbar, key_chat_outAudioSeekbar);
Expand Down Expand Up @@ -3747,6 +3751,9 @@ public void run() {
fallbackKeys.put(key_chat_inPsaNameText, key_avatar_nameInMessageGreen);
fallbackKeys.put(key_chat_outPsaNameText, key_avatar_nameInMessageGreen);

fallbackKeys.put(key_chat_outAdminText, key_chat_outTimeText);
fallbackKeys.put(key_chat_outAdminSelectedText, key_chat_outTimeSelectedText);

themeAccentExclusionKeys.addAll(Arrays.asList(keys_avatar_background));
themeAccentExclusionKeys.addAll(Arrays.asList(keys_avatar_nameInMessage));
themeAccentExclusionKeys.add(key_chat_attachFileBackground);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ public void setDisableSections(boolean value) {
disableSections = value;
}

public void setSortType(int value) {
public void setSortType(int value, boolean force) {
sortType = value;
if (sortType == 2) {
if (onlineContacts == null) {
if (onlineContacts == null || force) {
onlineContacts = new ArrayList<>(ContactsController.getInstance(currentAccount).contacts);
int selfId = UserConfig.getInstance(currentAccount).clientUserId;
for (int a = 0, N = onlineContacts.size(); a < N; a++) {
Expand Down Expand Up @@ -191,7 +191,7 @@ public Object getItem(int section, int position) {
}
}
}
if (needPhonebook) {
if (needPhonebook && position >= 0 && position < ContactsController.getInstance(currentAccount).phoneBookContacts.size()) {
return ContactsController.getInstance(currentAccount).phoneBookContacts.get(position);
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10067,7 +10067,12 @@ public void drawNamesLayout(Canvas canvas, float alpha) {
nameLayout.draw(canvas);
canvas.restore();
if (adminLayout != null) {
int color = Theme.getColor(isDrawSelectionBackground() ? Theme.key_chat_adminSelectedText : Theme.key_chat_adminText);
int color;
if (currentMessageObject.isOutOwner()) {
color = Theme.getColor(isDrawSelectionBackground() ? Theme.key_chat_outAdminSelectedText : Theme.key_chat_outAdminText);
} else {
color = Theme.getColor(isDrawSelectionBackground() ? Theme.key_chat_inAdminSelectedText : Theme.key_chat_inAdminText);
}
Theme.chat_adminPaint.setColor(color);
canvas.save();
float ax;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class SharingLiveLocationCell extends FrameLayout {
private LocationActivity.LiveLocation liveLocation;
private Location location = new Location("network");

private int currentAccount;
private int currentAccount = UserConfig.selectedAccount;

private Runnable invalidateRunnable = new Runnable() {
@Override
Expand Down
Loading

0 comments on commit 19599e6

Please sign in to comment.