mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-05-23 04:25:06 +00:00
Merge branch '4.1.3' into merge/4.1.3
This commit is contained in:
commit
61ba751597
3 changed files with 18 additions and 18 deletions
|
|
@ -456,7 +456,7 @@ public class MessagesController extends BaseController implements NotificationCe
|
|||
AndroidUtilities.runOnUIThread(() -> loadDialogsWithFileProtection(folderId, fromCache), 100);
|
||||
return;
|
||||
}
|
||||
PartisanLog.d("fileProtectedEncryptedChats: account = " + currentAccount + (fromCache ? " load from cache" : " load from servers"));
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + (fromCache ? " load from cache" : " load from servers"));
|
||||
loadDialogs(folderId, fromCache ? -1 : 0, 100, fromCache);
|
||||
}
|
||||
|
||||
|
|
@ -9067,8 +9067,8 @@ public class MessagesController extends BaseController implements NotificationCe
|
|||
return new ArrayList<>();
|
||||
}
|
||||
if (folderId == 0) {
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: getDialogs count " + dialogs.size());
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: allDialogs count " + allDialogs.size());
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " getDialogs count " + dialogs.size());
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " allDialogs count " + allDialogs.size());
|
||||
}
|
||||
return dialogs;
|
||||
}
|
||||
|
|
@ -11573,7 +11573,7 @@ public class MessagesController extends BaseController implements NotificationCe
|
|||
|
||||
public void loadDialogs(final int folderId, int offset, int count, boolean fromCache, Runnable onEmptyCallback) {
|
||||
if (loadingDialogs.get(folderId) || resetingDialogs) {
|
||||
PartisanLog.d("fileProtectedEncryptedChats: loadDialogs return account = " + currentAccount + ", folder = " + folderId + ". ");
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " loadDialogs return folder = " + folderId + ". ");
|
||||
return;
|
||||
}
|
||||
loadingDialogs.put(folderId, true);
|
||||
|
|
@ -12577,7 +12577,7 @@ public class MessagesController extends BaseController implements NotificationCe
|
|||
|
||||
long[] dialogsLoadOffset = getUserConfig().getDialogLoadOffsets(folderId);
|
||||
if (loadType == DIALOGS_LOAD_TYPE_CACHE && dialogsRes.dialogs.size() == 0) {
|
||||
PartisanLog.d("fileProtectedEncryptedChats: account = " + currentAccount + " cache dialogs were empty, encChats = " + (encChats != null ? encChats.size() : -1) + ", encGroups = " + (encGroups != null ? encGroups.size() : -1));
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " cache dialogs were empty, encChats = " + (encChats != null ? encChats.size() : -1) + ", encGroups = " + (encGroups != null ? encGroups.size() : -1));
|
||||
AndroidUtilities.runOnUIThread(() -> {
|
||||
putUsers(dialogsRes.users, true);
|
||||
if (fullUsers != null) {
|
||||
|
|
@ -13039,7 +13039,7 @@ public class MessagesController extends BaseController implements NotificationCe
|
|||
}
|
||||
allDialogs.add(dialog);
|
||||
}
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: (processLoadedDialogs) allDialogs updated, dialogs_dict count = " + dialogs_dict.size() + ", allDialogs count = " + allDialogs.size());
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " (processLoadedDialogs) allDialogs updated, dialogs_dict count = " + dialogs_dict.size() + ", allDialogs count = " + allDialogs.size());
|
||||
sortDialogs(migrate ? chatsDict : null);
|
||||
|
||||
putAllNeededDraftDialogs();
|
||||
|
|
@ -13065,7 +13065,7 @@ public class MessagesController extends BaseController implements NotificationCe
|
|||
loadDialogs(folderId, 0, 100, false);
|
||||
}
|
||||
if (getMessagesStorage().fileProtectionShouldBeEnabled()) {
|
||||
PartisanLog.d("fileProtectedEncryptedChats: account = " + currentAccount + ", folder = " + folderId + ", loaded count = " + dialogsRes.dialogs.size() + ". " +
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + ", folder = " + folderId + ", loaded count = " + dialogsRes.dialogs.size() + ". " +
|
||||
"From cache = " + fromCache + ", new enc chats = " + (encChats != null ? encChats.size() : -1) + ", new enc groups = " + (encGroups != null ? encGroups.size() : -1) + ". " +
|
||||
"Previous dialog count = " + allDialogs.size() + ", enc chats count = " + encryptedChats.size() + ", enc groups count = " + encryptedGroups.size());
|
||||
if (!dialogsEndReached.get(folderId)) {
|
||||
|
|
@ -13073,7 +13073,7 @@ public class MessagesController extends BaseController implements NotificationCe
|
|||
} else if (fromCache) {
|
||||
AndroidUtilities.runOnUIThread(() -> loadDialogsWithFileProtection(folderId, false));
|
||||
} else {
|
||||
PartisanLog.d("fileProtectedEncryptedChats: account = " + currentAccount + " not cache loaded count = " + dialogsRes.dialogs.size());
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " not cache loaded count = " + dialogsRes.dialogs.size());
|
||||
}
|
||||
}
|
||||
getNotificationCenter().postNotificationName(NotificationCenter.dialogsNeedReload);
|
||||
|
|
@ -13652,7 +13652,7 @@ public class MessagesController extends BaseController implements NotificationCe
|
|||
}
|
||||
allDialogs.add(dialog);
|
||||
}
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: (processDialogsUpdate) allDialogs updated, dialogs_dict count = " + dialogs_dict.size() + ", allDialogs count = " + allDialogs.size());
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " (processDialogsUpdate) allDialogs updated, dialogs_dict count = " + dialogs_dict.size() + ", allDialogs count = " + allDialogs.size());
|
||||
if (dialogsRes.messages.stream().noneMatch(m -> FakePasscodeUtils.isHideMessage(currentAccount, m.dialog_id, m.id))) {
|
||||
sortDialogs(null);
|
||||
getNotificationCenter().postNotificationName(NotificationCenter.dialogsNeedReload);
|
||||
|
|
@ -16546,7 +16546,7 @@ public class MessagesController extends BaseController implements NotificationCe
|
|||
allDialogs.add(dialog);
|
||||
}
|
||||
}
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: (loadPinnedDialogs) allDialogs updated, dialogs_dict count = " + dialogs_dict.size() + ", allDialogs count = " + allDialogs.size());
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " (loadPinnedDialogs) allDialogs updated, dialogs_dict count = " + dialogs_dict.size() + ", allDialogs count = " + allDialogs.size());
|
||||
sortDialogs(null);
|
||||
getNotificationCenter().postNotificationName(NotificationCenter.dialogsNeedReload);
|
||||
}
|
||||
|
|
@ -20538,7 +20538,7 @@ public class MessagesController extends BaseController implements NotificationCe
|
|||
}
|
||||
dialogs_dict.put(dialogId, dialog);
|
||||
allDialogs.add(dialog);
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: (updateInterfaceWithMessages) added a dialog to allDialogs, dialogs_dict count = " + dialogs_dict.size() + ", allDialogs count = " + allDialogs.size());
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " (updateInterfaceWithMessages) added a dialog to allDialogs, dialogs_dict count = " + dialogs_dict.size() + ", allDialogs count = " + allDialogs.size());
|
||||
ArrayList<MessageObject> arrayList = new ArrayList<MessageObject>();
|
||||
for (int i = 0; i < messages.size(); ++i) {
|
||||
MessageObject msg = messages.get(i);
|
||||
|
|
|
|||
|
|
@ -15975,7 +15975,7 @@ public class MessagesStorage extends BaseController {
|
|||
}
|
||||
|
||||
public void getDialogs(int folderId, int offset, int count, boolean loadDraftsPeersAndFolders) {
|
||||
PartisanLog.d("fileProtectedEncryptedChats: account = " + currentAccount + " getDialogs from cache, offset = " + offset + ", count = " + count);
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " getDialogs from cache, offset = " + offset + ", count = " + count);
|
||||
long[] draftsDialogIds;
|
||||
if (loadDraftsPeersAndFolders) {
|
||||
LongSparseArray<LongSparseArray<TLRPC.DraftMessage>> drafts = getMediaDataController().getDrafts();
|
||||
|
|
@ -16025,10 +16025,10 @@ public class MessagesStorage extends BaseController {
|
|||
}
|
||||
|
||||
ArrayList<Pair<Long, Long>> dialogsToLoadGroupMessages = new ArrayList<>();
|
||||
PartisanLog.d("fileProtectedEncryptedChats: account = " + currentAccount + " load dialogs! Folder = " + fid + ", offset = " + off + ", count = " + cnt);
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " load dialogs! Folder = " + fid + ", offset = " + off + ", count = " + cnt);
|
||||
cursor = database.queryFinalized(String.format(Locale.US, "SELECT d.did, d.last_mid, d.unread_count, d.date, m.data, m.read_state, m.mid, m.send_state, s.flags, m.date, d.pts, d.inbox_max, d.outbox_max, m.replydata, d.pinned, d.unread_count_i, d.flags, d.folder_id, d.data, d.unread_reactions, d.last_mid_group, d.ttl_period FROM dialogs as d LEFT JOIN messages_v2 as m ON d.last_mid = m.mid AND d.did = m.uid AND d.last_mid_group IS NULL LEFT JOIN dialog_settings as s ON d.did = s.did WHERE d.folder_id = %d ORDER BY d.pinned DESC, d.date DESC LIMIT %d,%d", fid, off, cnt));
|
||||
while (cursor.next()) {
|
||||
PartisanLog.d("fileProtectedEncryptedChats: account = " + currentAccount + " a dialog found!");
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " a dialog found!");
|
||||
long dialogId = cursor.longValue(0);
|
||||
TLRPC.Dialog dialog;
|
||||
if (DialogObject.isFolderDialogId(dialogId)) {
|
||||
|
|
@ -16157,7 +16157,7 @@ public class MessagesStorage extends BaseController {
|
|||
}
|
||||
}
|
||||
}
|
||||
PartisanLog.d("fileProtectedEncryptedChats: account = " + currentAccount + " dialogs loading finished!");
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " dialogs loading finished!");
|
||||
cursor.dispose();
|
||||
cursor = null;
|
||||
|
||||
|
|
@ -16285,7 +16285,7 @@ public class MessagesStorage extends BaseController {
|
|||
});
|
||||
}
|
||||
|
||||
PartisanLog.d("fileProtectedEncryptedChats: account = " + currentAccount + " encryptedToLoad size = " + encryptedToLoad.size());
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " encryptedToLoad size = " + encryptedToLoad.size());
|
||||
if (!encryptedToLoad.isEmpty()) {
|
||||
getEncryptedChatsInternal(TextUtils.join(",", encryptedToLoad), encryptedChats, usersToLoad);
|
||||
getEncryptedGroupsInternal(TextUtils.join(",", encryptedToLoad), encryptedGroups);
|
||||
|
|
|
|||
|
|
@ -8122,7 +8122,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
boolean loadArchivedFromCacheFinal = loadArchivedFromCache;
|
||||
AndroidUtilities.runOnUIThread(() -> {
|
||||
if (loadFinal) {
|
||||
PartisanLog.d("fileProtectedEncryptedChats: account = " + currentAccount + " load from dialog activity, fromCache = " + loadFromCacheFinal);
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " load from dialog activity, fromCache = " + loadFromCacheFinal);
|
||||
getMessagesController().loadDialogs(folderId, -1, 100, loadFromCacheFinal);
|
||||
}
|
||||
if (loadArchivedFinal) {
|
||||
|
|
@ -11281,7 +11281,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
if (dialogsType == DIALOGS_TYPE_DEFAULT) {
|
||||
ArrayList<TLRPC.Dialog> dialogs = (ArrayList<TLRPC.Dialog>) Utils.filterDialogs(messagesController.getDialogs(folderId), Optional.of(currentAccount));
|
||||
if (folderId == 0) {
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: DIALOGS_TYPE_DEFAULT count " + dialogs.size());
|
||||
PartisanLog.d("fileProtectedDialogsLoaded: account = " + currentAccount + " DIALOGS_TYPE_DEFAULT count " + dialogs.size());
|
||||
}
|
||||
if (!dialogs.isEmpty() && dialogs.get(0) instanceof TLRPC.TL_dialogFolder) {
|
||||
TLRPC.TL_dialogFolder folder = (TLRPC.TL_dialogFolder)dialogs.get(0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue