Merge remote-tracking branch 'upstream/master'

# Conflicts:
#	TMessagesProj/build.gradle
#	TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java
This commit is contained in:
世界 2020-10-30 19:26:01 +00:00
commit a0a3825b9b
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
2 changed files with 5 additions and 4 deletions

View File

@ -361,7 +361,7 @@ android {
sourceSets.all { set ->
if (set.name.startsWith("full")) {
set.dependencies {
implementation files('libs/libv2ray.aar','libs/ss-rust-release.aar','libs/ssr-libev-release.aar')
implementation files('libs/libv2ray.aar', 'libs/ss-rust-release.aar', 'libs/ssr-libev-release.aar')
}
}
if (set.name.matches("(mini|full).*")) {

View File

@ -9024,14 +9024,15 @@ public class MessagesStorage extends BaseController {
long did = messagesByDialogs.keyAt(a);
ArrayList<Integer> mids = messagesByDialogs.valueAt(a);
int lowerId = (int) did;
String idsStr = TextUtils.join(",", mids);
if (lowerId != 0) {
if (lowerId < 0) {
database.executeFast(String.format(Locale.US, "UPDATE chat_settings_v2 SET pinned = 0 WHERE uid = %d AND pinned IN (%s)", -lowerId, mids)).stepThis().dispose();
database.executeFast(String.format(Locale.US, "UPDATE chat_settings_v2 SET pinned = 0 WHERE uid = %d AND pinned IN (%s)", -lowerId, idsStr)).stepThis().dispose();
} else {
database.executeFast(String.format(Locale.US, "UPDATE user_settings SET pinned = 0 WHERE uid = %d AND pinned IN (%s)", lowerId, mids)).stepThis().dispose();
database.executeFast(String.format(Locale.US, "UPDATE user_settings SET pinned = 0 WHERE uid = %d AND pinned IN (%s)", lowerId, idsStr)).stepThis().dispose();
}
}
database.executeFast(String.format(Locale.US, "DELETE FROM chat_pinned_v2 WHERE uid = %d AND mid IN(%s)", did, TextUtils.join(",", mids))).stepThis().dispose();
database.executeFast(String.format(Locale.US, "DELETE FROM chat_pinned_v2 WHERE uid = %d AND mid IN(%s)", did, idsStr)).stepThis().dispose();
int updatedCount = 0;
cursor = database.queryFinalized("SELECT changes()");
if (cursor.next()) {