Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Sort before generating WA chat report (another fix related to #2337) #2389

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
'#2337: Sort before generating WA chat report.
  • Loading branch information
wladimirleite committed Dec 24, 2024
commit e452e0211ea0d21e381890bc4ace25a4b0eb324e
Original file line number Diff line number Diff line change
@@ -285,6 +285,9 @@ private void createReport(List<Chat> chatList, IItemSearcher searcher, WAContact
int chatVirtualId = 0;
HashMap<String, String> cache = new HashMap<>();
for (Chat c : chatList) {
// sort messages before generating the report
Message.sort(c.getMessages());

getAvatar(searcher, c.getRemote());
searchMediaFilesForMessagesInBatches(c.getMessages(), searcher, handler, extractor, dbPath, context, null);
int frag = 0;
@@ -735,11 +738,6 @@ public int compare(WhatsAppContext o1, WhatsAppContext o2) {
logger.info("Creating separate report for {}", DB.getPath()); //$NON-NLS-1$
}

// sort messages
for (Chat chat : dbChatList) {
Message.sort(chat.getMessages());
}

// create report for main dbs and backups which main db was not found
createReport(dbChatList, searcher, contacts, handler, extractor, account, tmpDB, context);

Loading