Skip to content

Commit

Permalink
upstream: bump version to v10.6.4
Browse files Browse the repository at this point in the history
Signed-off-by: qwq233 <qwq233@qwq2333.top>
  • Loading branch information
qwq233 committed Feb 13, 2024
2 parents c64a4d6 + 5dd6491 commit 8fb83ab
Show file tree
Hide file tree
Showing 181 changed files with 6,988 additions and 1,786 deletions.
2 changes: 1 addition & 1 deletion TMessagesProj/jni/tgnet/ConnectionsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2399,7 +2399,7 @@ void ConnectionsManager::processRequestQueue(uint32_t connectionTypes, uint32_t
}
}
if (request->retryCount >= retryMax) {
if (LOGS_ENABLED) DEBUG_E("timed out %s", typeInfo.name());
if (LOGS_ENABLED) DEBUG_E("timed out %s, message_id = 0x%" PRIx64, typeInfo.name(), request->messageId);
auto error = new TL_error();
error->code = -123;
error->text = "RETRY_LIMIT";
Expand Down
2 changes: 1 addition & 1 deletion TMessagesProj/src/main/assets/bluebubbles.attheme
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ chat_inReplyNameText=-14643754
chats_onlineCircle=-13192972
chat_outAudioSelectedProgress=-7484939
chat_inInstant=-14707230
avatar_backgroundSaved=-10438409
avatar_backgroundSaved=-9847303
chats_sentReadCheck=-15754010
chats_nameMessageArchived=-7237231
chat_outSentCheckSelected=-14968350
Expand Down
5 changes: 4 additions & 1 deletion TMessagesProj/src/main/assets/darkblue.attheme
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ windowBackgroundWhiteBlueIcon=-528890628
chat_goDownButtonCounterBackground=-11425042
actionBarActionModeDefault=-14273984
actionBarActionModeDefaultTop=-14536643
actionBarActionModeReaction=318767103
actionBarActionModeReactionText=-1
actionBarActionModeReactionDot=-13287865
statisticChartHintLine=452984831
chats_menuPhone=-1816080163
chat_outViews=-7357217
Expand Down Expand Up @@ -425,7 +428,7 @@ chats_attachMessage=-8548712
chat_topPanelBackground=-14602949
chat_outSentClock=-8213557
dialogBackgroundGray=-14932431
chat_searchPanelText=-8796932
chat_searchPanelText=-1
chat_inContactIcon=-1
code_comment=-2130706433
chat_outCodeBackground=857487708
Expand Down
5 changes: 4 additions & 1 deletion TMessagesProj/src/main/assets/night.attheme
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ chat_inSentClockSelected=-7490861
chat_goDownButtonCounterBackground=-11425042
actionBarActionModeDefault=-14211289
actionBarActionModeDefaultTop=-14277082
actionBarActionModeReaction=318767103
actionBarActionModeReactionText=-1
actionBarActionModeReactionDot=-13287865
statisticChartHintLine=452984831
chats_menuPhone=-1815557944
chat_outViews=-7357217
Expand Down Expand Up @@ -450,7 +453,7 @@ chats_attachMessage=-8224126
chat_topPanelBackground=-15066597
chat_outSentClock=-6698513
dialogBackgroundGray=-14013910
chat_searchPanelText=-10767620
chat_searchPanelText=-1
chat_inContactIcon=-1
code_comment=-2130706433
chat_outCodeBackground=859062986
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ public boolean animateChange(RecyclerView.ViewHolder oldHolder, RecyclerView.Vie
return true;
}

void animateChangeImpl(final ChangeInfo changeInfo) {
public void animateChangeImpl(final ChangeInfo changeInfo) {
final RecyclerView.ViewHolder holder = changeInfo.oldHolder;
final View view = holder == null ? null : holder.itemView;
final RecyclerView.ViewHolder newHolder = changeInfo.newHolder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ public boolean animateChange(RecyclerView.ViewHolder oldHolder, RecyclerView.Vie
return true;
}

void animateChangeImpl(final ChangeInfo changeInfo) {
public void animateChangeImpl(final ChangeInfo changeInfo) {
final RecyclerView.ViewHolder holder = changeInfo.oldHolder;
final View view = holder == null ? null : holder.itemView;
final RecyclerView.ViewHolder newHolder = changeInfo.newHolder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public class SQLitePreparedStatement {

private long startTime;
private String query;
//private static HashMap<SQLitePreparedStatement, String> hashMap;

public long getStatementHandle() {
return sqliteStatementHandle;
Expand Down Expand Up @@ -112,9 +111,6 @@ public void finalizeQuery() {
}
}
try {
/*if (BuildVars.DEBUG_PRIVATE_VERSION) {
hashMap.remove(this);
}*/
isFinalized = true;
finalize(sqliteStatementHandle);
} catch (SQLiteException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
import android.text.style.URLSpan;
import android.text.util.Linkify;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.Pair;
import android.util.StateSet;
import android.util.TypedValue;
Expand Down Expand Up @@ -151,6 +152,7 @@
import org.telegram.ui.Components.PickerBottomLayout;
import org.telegram.ui.Components.PipRoundVideoView;
import org.telegram.ui.Components.PipVideoOverlay;
import org.telegram.ui.Components.RLottieImageView;
import org.telegram.ui.Components.RecyclerListView;
import org.telegram.ui.Components.ShareAlert;
import org.telegram.ui.Components.TypefaceSpan;
Expand Down Expand Up @@ -314,6 +316,7 @@ public class AndroidUtilities {
};

public static final String STICKERS_PLACEHOLDER_PACK_NAME = "tg_placeholders_android";
public static final String STICKERS_PLACEHOLDER_PACK_NAME_2 = "tg_superplaceholders_android_2";

private static boolean containsUnsupportedCharacters(String text) {
if (text.contains("\u202C")) {
Expand Down Expand Up @@ -4419,6 +4422,7 @@ public static float distanceInfluenceForSnapDuration(float f) {
}

public static void makeAccessibilityAnnouncement(CharSequence what) {
if (TextUtils.isEmpty(what)) return;
AccessibilityManager am = (AccessibilityManager) ApplicationLoader.applicationContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
if (am.isEnabled()) {
AccessibilityEvent ev = AccessibilityEvent.obtain();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,6 @@ public static boolean isConnectedToWiFi() {
return false;
}

public static boolean useLessData() {
ensureCurrentNetworkGet();
return BuildVars.DEBUG_PRIVATE_VERSION && (SharedConfig.forceLessData || isConnectionSlow());
}

public static boolean isConnectionSlow() {
try {
ensureCurrentNetworkGet(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public class BuildVars {
public static boolean LOGS_ENABLED = true;
public static boolean USE_CLOUD_STRINGS = true;
public static boolean NO_SCOPED_STORAGE = Build.VERSION.SDK_INT <= 29;
public static final int BUILD_VERSION = 4275;
public static final String BUILD_VERSION_STRING = "10.6.1";
public static final int BUILD_VERSION = 4365;
public static final String BUILD_VERSION_STRING = "10.6.4";
public static final int APP_ID = 19797609;
public static final String APP_HASH = "e8f1567dbbf38944a1391c4d23c34b60";
public static final String APPCENTER_HASH = "e07b49da-11a5-46db-a780-f5cd7b9a1a5a";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public ChatMessagesMetadataController(ChatActivity chatActivity) {
}

public void checkMessages(ChatActivity.ChatActivityAdapter chatAdapter, int maxAdapterPosition, int minAdapterPosition, long currentTime) {
ArrayList<MessageObject> messages = chatActivity.messages;
ArrayList<MessageObject> messages = chatAdapter.getMessages();
if (!chatActivity.isInScheduleMode() && maxAdapterPosition >= 0 && minAdapterPosition >= 0) {
int from = minAdapterPosition - chatAdapter.messagesStartRow - 10;
int to = maxAdapterPosition - chatAdapter.messagesStartRow + 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1409,10 +1409,22 @@ public static int migrate(MessagesStorage messagesStorage, int version) throws E
version = 138;
}

if (version == 138) {
database.executeFast("CREATE TABLE IF NOT EXISTS saved_reaction_tags (data BLOB);").stepThis().dispose();
database.executeFast("PRAGMA user_version = 139").stepThis().dispose();
version = 139;
if (version == 138 || version == 139 || version == 140 || version == 141) {
database.executeFast("DROP TABLE IF EXISTS tag_message_id;").stepThis().dispose();
database.executeFast("CREATE TABLE tag_message_id(mid INTEGER, topic_id INTEGER, tag INTEGER, text TEXT);").stepThis().dispose();
database.executeFast("CREATE INDEX IF NOT EXISTS tag_idx_tag_message_id ON tag_message_id(tag);").stepThis().dispose();
database.executeFast("CREATE INDEX IF NOT EXISTS tag_text_idx_tag_message_id ON tag_message_id(tag, text);").stepThis().dispose();
database.executeFast("CREATE INDEX IF NOT EXISTS tag_topic_idx_tag_message_id ON tag_message_id(topic_id, tag);").stepThis().dispose();
database.executeFast("CREATE INDEX IF NOT EXISTS tag_topic_text_idx_tag_message_id ON tag_message_id(topic_id, tag, text);").stepThis().dispose();
database.executeFast("PRAGMA user_version = 142").stepThis().dispose();
version = 142;
}

if (version == 142) {
database.executeFast("DROP TABLE IF EXISTS saved_reaction_tags;").stepThis().dispose();
database.executeFast("CREATE TABLE saved_reaction_tags (topic_id INTEGER PRIMARY KEY, data BLOB);").stepThis().dispose();
database.executeFast("PRAGMA user_version = 143").stepThis().dispose();
version = 143;
}

return version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public static SvgHelper.SvgDrawable getSvgThumb(ArrayList<TLRPC.PhotoSize> sizes
TLRPC.PhotoSize photoSize = sizes.get(a);
if (photoSize instanceof TLRPC.TL_photoPathSize) {
photoPathSize = (TLRPC.TL_photoPathSize) photoSize;
} else {
} else if (photoSize instanceof TLRPC.TL_photoSize) {
w = photoSize.w;
h = photoSize.h;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ public boolean isLocallyCreatedFile(String path) {
loaderQueue.checkLoadingOperations(operation.isStory && priority >= PRIORITY_HIGH);

if (BuildVars.LOGS_ENABLED) {
FileLog.d("create load operation fileName=" + finalFileName + " documentName=" + getDocumentFileName(document) + " size=" + AndroidUtilities.formatFileSize(operation.totalBytesCount) + " position in queue " + operation.getPositionInQueue() + " account=" + currentAccount);
FileLog.d("create load operation fileName=" + finalFileName + " documentName=" + getDocumentFileName(document) + " size=" + AndroidUtilities.formatFileSize(operation.totalBytesCount) + " position in queue " + operation.getPositionInQueue() + " account=" + currentAccount + " cacheType=" + cacheType);
}
return operation;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.telegram.messenger;

import android.os.SystemClock;
import android.util.Log;

import org.telegram.tgnet.RequestDelegate;
import org.telegram.tgnet.TLObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1799,6 +1799,31 @@ public static String formatSeenDate(long date) {
return "LOC_ERR";
}

public static String formatPmSeenDate(long date) {
try {
date *= 1000;
Calendar rightNow = Calendar.getInstance();
int day = rightNow.get(Calendar.DAY_OF_YEAR);
int year = rightNow.get(Calendar.YEAR);
rightNow.setTimeInMillis(date);
int dateDay = rightNow.get(Calendar.DAY_OF_YEAR);
int dateYear = rightNow.get(Calendar.YEAR);

if (dateDay == day && year == dateYear) {
return LocaleController.formatString(R.string.PmReadTodayAt, getInstance().formatterDay.format(new Date(date)));
} else if (dateDay + 1 == day && year == dateYear) {
return LocaleController.formatString(R.string.PmReadYesterdayAt, getInstance().formatterDay.format(new Date(date)));
} else if (Math.abs(System.currentTimeMillis() - date) < 31536000000L) {
return LocaleController.formatString(R.string.PmReadDateTimeAt, getInstance().formatterDayMonth.format(new Date(date)), getInstance().formatterDay.format(new Date(date)));
} else {
return LocaleController.formatString(R.string.PmReadDateTimeAt, getInstance().formatterYear.format(new Date(date)), getInstance().formatterDay.format(new Date(date)));
}
} catch (Exception e) {
FileLog.e(e);
}
return "LOC_ERR";
}

public static String formatShortDate(long date) {
try {
date *= 1000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
import org.telegram.ui.Components.EmbedBottomSheet;
import org.telegram.ui.Components.PhotoFilterView;
import org.telegram.ui.Components.PipRoundVideoView;
import org.telegram.ui.Components.Reactions.ReactionsLayoutInBubble;
import org.telegram.ui.Components.VideoPlayer;
import org.telegram.ui.LaunchActivity;
import org.telegram.ui.PhotoViewer;
Expand Down Expand Up @@ -2451,12 +2452,10 @@ public void loadMoreMusic() {
//TODO topics
if (!playlistEndReached[0]) {
loadingPlaylist = true;
AccountInstance.getInstance(playingMessageObject.currentAccount).getMediaDataController()
.loadMedia(playingMessageObject.getDialogId(), 50, playlistMaxId[0], 0, MediaDataController.MEDIA_MUSIC, 0, 1, playlistClassGuid, 0);
AccountInstance.getInstance(playingMessageObject.currentAccount).getMediaDataController().loadMedia(playingMessageObject.getDialogId(), 50, playlistMaxId[0], 0, MediaDataController.MEDIA_MUSIC, 0, 1, playlistClassGuid, 0, null, null);
} else if (playlistMergeDialogId != 0 && !playlistEndReached[1]) {
loadingPlaylist = true;
AccountInstance.getInstance(playingMessageObject.currentAccount).getMediaDataController()
.loadMedia(playlistMergeDialogId, 50, playlistMaxId[0], 0, MediaDataController.MEDIA_MUSIC, 0, 1, playlistClassGuid, 0);
AccountInstance.getInstance(playingMessageObject.currentAccount).getMediaDataController().loadMedia(playlistMergeDialogId, 50, playlistMaxId[0], 0, MediaDataController.MEDIA_MUSIC, 0, 1, playlistClassGuid, 0, null, null);
}
}

Expand Down Expand Up @@ -5638,13 +5637,16 @@ public static class PlaylistGlobalSearchParams {
final String query;
final FiltersView.MediaFilterData filter;
final long dialogId;
public long topicId;
final long minDate;
final long maxDate;
public int totalCount;
public boolean endReached;
public int nextSearchRate;
public int folderId;

public ReactionsLayoutInBubble.VisibleReaction reaction;

public PlaylistGlobalSearchParams(String query, long dialogId, long minDate, long maxDate, FiltersView.MediaFilterData filter) {
this.filter = filter;
this.query = query;
Expand Down
Loading

0 comments on commit 8fb83ab

Please sign in to comment.