diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index c4880876c..232a6d943 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -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).*")) { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java index 3ca30043a..c3fa0eca8 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java @@ -9024,14 +9024,15 @@ public class MessagesStorage extends BaseController { long did = messagesByDialogs.keyAt(a); ArrayList 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()) {