Skip to content

Commit 5dd6491

Browse files
committed
update to 10.6.4 (4365)
1 parent 928146c commit 5dd6491

File tree

182 files changed

+7032
-1786
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+7032
-1786
lines changed

TMessagesProj/jni/tgnet/ConnectionsManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2390,7 +2390,7 @@ void ConnectionsManager::processRequestQueue(uint32_t connectionTypes, uint32_t
23902390
}
23912391
}
23922392
if (request->retryCount >= retryMax) {
2393-
if (LOGS_ENABLED) DEBUG_E("timed out %s", typeInfo.name());
2393+
if (LOGS_ENABLED) DEBUG_E("timed out %s, message_id = 0x%" PRIx64, typeInfo.name(), request->messageId);
23942394
auto error = new TL_error();
23952395
error->code = -123;
23962396
error->text = "RETRY_LIMIT";

TMessagesProj/src/main/assets/bluebubbles.attheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ chat_inReplyNameText=-14643754
4949
chats_onlineCircle=-13192972
5050
chat_outAudioSelectedProgress=-7484939
5151
chat_inInstant=-14707230
52-
avatar_backgroundSaved=-10438409
52+
avatar_backgroundSaved=-9847303
5353
chats_sentReadCheck=-15754010
5454
chats_nameMessageArchived=-7237231
5555
chat_outSentCheckSelected=-14968350

TMessagesProj/src/main/assets/darkblue.attheme

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ windowBackgroundWhiteBlueIcon=-528890628
99
chat_goDownButtonCounterBackground=-11425042
1010
actionBarActionModeDefault=-14273984
1111
actionBarActionModeDefaultTop=-14536643
12+
actionBarActionModeReaction=318767103
13+
actionBarActionModeReactionText=-1
14+
actionBarActionModeReactionDot=-13287865
1215
statisticChartHintLine=452984831
1316
chats_menuPhone=-1816080163
1417
chat_outViews=-7357217
@@ -425,7 +428,7 @@ chats_attachMessage=-8548712
425428
chat_topPanelBackground=-14602949
426429
chat_outSentClock=-8213557
427430
dialogBackgroundGray=-14932431
428-
chat_searchPanelText=-8796932
431+
chat_searchPanelText=-1
429432
chat_inContactIcon=-1
430433
code_comment=-2130706433
431434
chat_outCodeBackground=857487708

TMessagesProj/src/main/assets/night.attheme

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ chat_inSentClockSelected=-7490861
88
chat_goDownButtonCounterBackground=-11425042
99
actionBarActionModeDefault=-14211289
1010
actionBarActionModeDefaultTop=-14277082
11+
actionBarActionModeReaction=318767103
12+
actionBarActionModeReactionText=-1
13+
actionBarActionModeReactionDot=-13287865
1114
statisticChartHintLine=452984831
1215
chats_menuPhone=-1815557944
1316
chat_outViews=-7357217
@@ -450,7 +453,7 @@ chats_attachMessage=-8224126
450453
chat_topPanelBackground=-15066597
451454
chat_outSentClock=-6698513
452455
dialogBackgroundGray=-14013910
453-
chat_searchPanelText=-10767620
456+
chat_searchPanelText=-1
454457
chat_inContactIcon=-1
455458
code_comment=-2130706433
456459
chat_outCodeBackground=859062986

TMessagesProj/src/main/java/androidx/recyclerview/widget/ChatListItemAnimator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ public boolean animateChange(RecyclerView.ViewHolder oldHolder, RecyclerView.Vie
990990
return true;
991991
}
992992

993-
void animateChangeImpl(final ChangeInfo changeInfo) {
993+
public void animateChangeImpl(final ChangeInfo changeInfo) {
994994
final RecyclerView.ViewHolder holder = changeInfo.oldHolder;
995995
final View view = holder == null ? null : holder.itemView;
996996
final RecyclerView.ViewHolder newHolder = changeInfo.newHolder;

TMessagesProj/src/main/java/androidx/recyclerview/widget/DefaultItemAnimator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ public boolean animateChange(RecyclerView.ViewHolder oldHolder, RecyclerView.Vie
468468
return true;
469469
}
470470

471-
void animateChangeImpl(final ChangeInfo changeInfo) {
471+
public void animateChangeImpl(final ChangeInfo changeInfo) {
472472
final RecyclerView.ViewHolder holder = changeInfo.oldHolder;
473473
final View view = holder == null ? null : holder.itemView;
474474
final RecyclerView.ViewHolder newHolder = changeInfo.newHolder;

TMessagesProj/src/main/java/org/telegram/SQLite/SQLitePreparedStatement.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ public class SQLitePreparedStatement {
2525

2626
private long startTime;
2727
private String query;
28-
//private static HashMap<SQLitePreparedStatement, String> hashMap;
2928

3029
public long getStatementHandle() {
3130
return sqliteStatementHandle;
@@ -112,9 +111,6 @@ public void finalizeQuery() {
112111
}
113112
}
114113
try {
115-
/*if (BuildVars.DEBUG_PRIVATE_VERSION) {
116-
hashMap.remove(this);
117-
}*/
118114
isFinalized = true;
119115
finalize(sqliteStatementHandle);
120116
} catch (SQLiteException e) {

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
import android.text.style.URLSpan;
7474
import android.text.util.Linkify;
7575
import android.util.DisplayMetrics;
76+
import android.util.Log;
7677
import android.util.Pair;
7778
import android.util.StateSet;
7879
import android.util.TypedValue;
@@ -155,6 +156,7 @@
155156
import org.telegram.ui.Components.PickerBottomLayout;
156157
import org.telegram.ui.Components.PipRoundVideoView;
157158
import org.telegram.ui.Components.PipVideoOverlay;
159+
import org.telegram.ui.Components.RLottieImageView;
158160
import org.telegram.ui.Components.RecyclerListView;
159161
import org.telegram.ui.Components.ShareAlert;
160162
import org.telegram.ui.Components.TypefaceSpan;
@@ -314,6 +316,7 @@ public class AndroidUtilities {
314316
};
315317

316318
public static final String STICKERS_PLACEHOLDER_PACK_NAME = "tg_placeholders_android";
319+
public static final String STICKERS_PLACEHOLDER_PACK_NAME_2 = "tg_superplaceholders_android_2";
317320

318321
private static boolean containsUnsupportedCharacters(String text) {
319322
if (text.contains("\u202C")) {
@@ -4441,6 +4444,7 @@ public static float distanceInfluenceForSnapDuration(float f) {
44414444
}
44424445

44434446
public static void makeAccessibilityAnnouncement(CharSequence what) {
4447+
if (TextUtils.isEmpty(what)) return;
44444448
AccessibilityManager am = (AccessibilityManager) ApplicationLoader.applicationContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
44454449
if (am.isEnabled()) {
44464450
AccessibilityEvent ev = AccessibilityEvent.obtain();

TMessagesProj/src/main/java/org/telegram/messenger/ApplicationLoader.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -429,11 +429,6 @@ public static boolean isConnectedToWiFi() {
429429
return false;
430430
}
431431

432-
public static boolean useLessData() {
433-
ensureCurrentNetworkGet();
434-
return BuildVars.DEBUG_PRIVATE_VERSION && (SharedConfig.forceLessData || isConnectionSlow());
435-
}
436-
437432
public static boolean isConnectionSlow() {
438433
try {
439434
ensureCurrentNetworkGet(false);

TMessagesProj/src/main/java/org/telegram/messenger/ChatMessagesMetadataController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public ChatMessagesMetadataController(ChatActivity chatActivity) {
2323
}
2424

2525
public void checkMessages(ChatActivity.ChatActivityAdapter chatAdapter, int maxAdapterPosition, int minAdapterPosition, long currentTime) {
26-
ArrayList<MessageObject> messages = chatActivity.messages;
26+
ArrayList<MessageObject> messages = chatAdapter.getMessages();
2727
if (!chatActivity.isInScheduleMode() && maxAdapterPosition >= 0 && minAdapterPosition >= 0) {
2828
int from = minAdapterPosition - chatAdapter.messagesStartRow - 10;
2929
int to = maxAdapterPosition - chatAdapter.messagesStartRow + 10;

TMessagesProj/src/main/java/org/telegram/messenger/DatabaseMigrationHelper.java

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,10 +1409,22 @@ public static int migrate(MessagesStorage messagesStorage, int version) throws E
14091409
version = 138;
14101410
}
14111411

1412-
if (version == 138) {
1413-
database.executeFast("CREATE TABLE IF NOT EXISTS saved_reaction_tags (data BLOB);").stepThis().dispose();
1414-
database.executeFast("PRAGMA user_version = 139").stepThis().dispose();
1415-
version = 139;
1412+
if (version == 138 || version == 139 || version == 140 || version == 141) {
1413+
database.executeFast("DROP TABLE IF EXISTS tag_message_id;").stepThis().dispose();
1414+
database.executeFast("CREATE TABLE tag_message_id(mid INTEGER, topic_id INTEGER, tag INTEGER, text TEXT);").stepThis().dispose();
1415+
database.executeFast("CREATE INDEX IF NOT EXISTS tag_idx_tag_message_id ON tag_message_id(tag);").stepThis().dispose();
1416+
database.executeFast("CREATE INDEX IF NOT EXISTS tag_text_idx_tag_message_id ON tag_message_id(tag, text);").stepThis().dispose();
1417+
database.executeFast("CREATE INDEX IF NOT EXISTS tag_topic_idx_tag_message_id ON tag_message_id(topic_id, tag);").stepThis().dispose();
1418+
database.executeFast("CREATE INDEX IF NOT EXISTS tag_topic_text_idx_tag_message_id ON tag_message_id(topic_id, tag, text);").stepThis().dispose();
1419+
database.executeFast("PRAGMA user_version = 142").stepThis().dispose();
1420+
version = 142;
1421+
}
1422+
1423+
if (version == 142) {
1424+
database.executeFast("DROP TABLE IF EXISTS saved_reaction_tags;").stepThis().dispose();
1425+
database.executeFast("CREATE TABLE saved_reaction_tags (topic_id INTEGER PRIMARY KEY, data BLOB);").stepThis().dispose();
1426+
database.executeFast("PRAGMA user_version = 143").stepThis().dispose();
1427+
version = 143;
14161428
}
14171429

14181430
return version;

TMessagesProj/src/main/java/org/telegram/messenger/DocumentObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static SvgHelper.SvgDrawable getSvgThumb(ArrayList<TLRPC.PhotoSize> sizes
5353
TLRPC.PhotoSize photoSize = sizes.get(a);
5454
if (photoSize instanceof TLRPC.TL_photoPathSize) {
5555
photoPathSize = (TLRPC.TL_photoPathSize) photoSize;
56-
} else {
56+
} else if (photoSize instanceof TLRPC.TL_photoSize) {
5757
w = photoSize.w;
5858
h = photoSize.h;
5959
}

TMessagesProj/src/main/java/org/telegram/messenger/FileLoadOperation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2441,7 +2441,7 @@ protected void startDownloadRequest(int useConnectionType) {
24412441
}
24422442
}, null, null, flags, datacenterId, connectionType, isLast);
24432443
if (BuildVars.LOGS_ENABLED) {
2444-
FileLog.d("debug_loading: " + cacheFileFinal.getName() + " dc=" + datacenterId + " send reqId " + requestInfo.requestToken + " offset=" + requestInfo.offset + " conType=" + connectionType + " priority=");
2444+
FileLog.d("debug_loading: " + cacheFileFinal.getName() + " dc=" + datacenterId + " send reqId " + requestInfo.requestToken + " offset=" + requestInfo.offset + " conType=" + connectionType + " priority=" + priority);
24452445
}
24462446
requestsCount++;
24472447
}

TMessagesProj/src/main/java/org/telegram/messenger/FileLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ public boolean isLocallyCreatedFile(String path) {
984984
loaderQueue.checkLoadingOperations(operation.isStory && priority >= PRIORITY_HIGH);
985985

986986
if (BuildVars.LOGS_ENABLED) {
987-
FileLog.d("create load operation fileName=" + finalFileName + " documentName=" + getDocumentFileName(document) + " size=" + AndroidUtilities.formatFileSize(operation.totalBytesCount) + " position in queue " + operation.getPositionInQueue() + " account=" + currentAccount);
987+
FileLog.d("create load operation fileName=" + finalFileName + " documentName=" + getDocumentFileName(document) + " size=" + AndroidUtilities.formatFileSize(operation.totalBytesCount) + " position in queue " + operation.getPositionInQueue() + " account=" + currentAccount + " cacheType=" + cacheType);
988988
}
989989
return operation;
990990
}

TMessagesProj/src/main/java/org/telegram/messenger/FileLog.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public FileLog() {
7575
private static Gson gson;
7676
private static HashSet<String> excludeRequests;
7777

78-
public static void dumpResponseAndRequest(TLObject request, TLObject response, TLRPC.TL_error error, long requestMsgId, long startRequestTimeInMillis, int requestToken) {
78+
public static void dumpResponseAndRequest(int account, TLObject request, TLObject response, TLRPC.TL_error error, long requestMsgId, long startRequestTimeInMillis, int requestToken) {
7979
if (!BuildVars.DEBUG_PRIVATE_VERSION || !BuildVars.LOGS_ENABLED || request == null) {
8080
return;
8181
}
@@ -97,7 +97,7 @@ public static void dumpResponseAndRequest(TLObject request, TLObject response, T
9797
long time = System.currentTimeMillis();
9898
FileLog.getInstance().logQueue.postRunnable(() -> {
9999
try {
100-
String metadata = "requestMsgId=" + requestMsgId + " requestingTime=" + (System.currentTimeMillis() - startRequestTimeInMillis) + " request_token=" + requestToken;
100+
String metadata = "requestMsgId=" + requestMsgId + " requestingTime=" + (System.currentTimeMillis() - startRequestTimeInMillis) + " request_token=" + requestToken + " account=" + account;
101101
FileLog.getInstance().tlStreamWriter.write(getInstance().dateFormat.format(time) + " " + metadata);
102102
FileLog.getInstance().tlStreamWriter.write("\n");
103103
FileLog.getInstance().tlStreamWriter.write(req);

TMessagesProj/src/main/java/org/telegram/messenger/FileRefController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.telegram.messenger;
22

33
import android.os.SystemClock;
4+
import android.util.Log;
45

56
import org.telegram.tgnet.RequestDelegate;
67
import org.telegram.tgnet.TLObject;

TMessagesProj/src/main/java/org/telegram/messenger/LocaleController.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,6 +1722,31 @@ public static String formatSeenDate(long date) {
17221722
return "LOC_ERR";
17231723
}
17241724

1725+
public static String formatPmSeenDate(long date) {
1726+
try {
1727+
date *= 1000;
1728+
Calendar rightNow = Calendar.getInstance();
1729+
int day = rightNow.get(Calendar.DAY_OF_YEAR);
1730+
int year = rightNow.get(Calendar.YEAR);
1731+
rightNow.setTimeInMillis(date);
1732+
int dateDay = rightNow.get(Calendar.DAY_OF_YEAR);
1733+
int dateYear = rightNow.get(Calendar.YEAR);
1734+
1735+
if (dateDay == day && year == dateYear) {
1736+
return LocaleController.formatString(R.string.PmReadTodayAt, getInstance().formatterDay.format(new Date(date)));
1737+
} else if (dateDay + 1 == day && year == dateYear) {
1738+
return LocaleController.formatString(R.string.PmReadYesterdayAt, getInstance().formatterDay.format(new Date(date)));
1739+
} else if (Math.abs(System.currentTimeMillis() - date) < 31536000000L) {
1740+
return LocaleController.formatString(R.string.PmReadDateTimeAt, getInstance().formatterDayMonth.format(new Date(date)), getInstance().formatterDay.format(new Date(date)));
1741+
} else {
1742+
return LocaleController.formatString(R.string.PmReadDateTimeAt, getInstance().formatterYear.format(new Date(date)), getInstance().formatterDay.format(new Date(date)));
1743+
}
1744+
} catch (Exception e) {
1745+
FileLog.e(e);
1746+
}
1747+
return "LOC_ERR";
1748+
}
1749+
17251750
public static String formatShortDate(long date) {
17261751
try {
17271752
date *= 1000;

TMessagesProj/src/main/java/org/telegram/messenger/MediaController.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
import android.telephony.PhoneStateListener;
5555
import android.telephony.TelephonyManager;
5656
import android.text.TextUtils;
57-
import android.util.Log;
5857
import android.util.Pair;
5958
import android.util.SparseArray;
6059
import android.view.HapticFeedbackConstants;
@@ -84,6 +83,7 @@
8483
import org.telegram.ui.Components.EmbedBottomSheet;
8584
import org.telegram.ui.Components.PhotoFilterView;
8685
import org.telegram.ui.Components.PipRoundVideoView;
86+
import org.telegram.ui.Components.Reactions.ReactionsLayoutInBubble;
8787
import org.telegram.ui.Components.VideoPlayer;
8888
import org.telegram.ui.LaunchActivity;
8989
import org.telegram.ui.PhotoViewer;
@@ -2397,10 +2397,10 @@ public void loadMoreMusic() {
23972397
//TODO topics
23982398
if (!playlistEndReached[0]) {
23992399
loadingPlaylist = true;
2400-
AccountInstance.getInstance(playingMessageObject.currentAccount).getMediaDataController().loadMedia(playingMessageObject.getDialogId(), 50, playlistMaxId[0], 0, MediaDataController.MEDIA_MUSIC, 0, 1, playlistClassGuid, 0);
2400+
AccountInstance.getInstance(playingMessageObject.currentAccount).getMediaDataController().loadMedia(playingMessageObject.getDialogId(), 50, playlistMaxId[0], 0, MediaDataController.MEDIA_MUSIC, 0, 1, playlistClassGuid, 0, null, null);
24012401
} else if (playlistMergeDialogId != 0 && !playlistEndReached[1]) {
24022402
loadingPlaylist = true;
2403-
AccountInstance.getInstance(playingMessageObject.currentAccount).getMediaDataController().loadMedia(playlistMergeDialogId, 50, playlistMaxId[0], 0, MediaDataController.MEDIA_MUSIC, 0, 1, playlistClassGuid, 0);
2403+
AccountInstance.getInstance(playingMessageObject.currentAccount).getMediaDataController().loadMedia(playlistMergeDialogId, 50, playlistMaxId[0], 0, MediaDataController.MEDIA_MUSIC, 0, 1, playlistClassGuid, 0, null, null);
24042404
}
24052405
}
24062406

@@ -5572,13 +5572,16 @@ public static class PlaylistGlobalSearchParams {
55725572
final String query;
55735573
final FiltersView.MediaFilterData filter;
55745574
final long dialogId;
5575+
public long topicId;
55755576
final long minDate;
55765577
final long maxDate;
55775578
public int totalCount;
55785579
public boolean endReached;
55795580
public int nextSearchRate;
55805581
public int folderId;
55815582

5583+
public ReactionsLayoutInBubble.VisibleReaction reaction;
5584+
55825585
public PlaylistGlobalSearchParams(String query, long dialogId, long minDate, long maxDate, FiltersView.MediaFilterData filter) {
55835586
this.filter = filter;
55845587
this.query = query;

0 commit comments

Comments
 (0)