From a161ec1105983d9ebc40a4f2ccc3472e54d988a4 Mon Sep 17 00:00:00 2001 From: tc-wleite Date: Wed, 30 Oct 2024 22:09:47 -0300 Subject: [PATCH] '#2337: Sort messages properly, after merging process. --- .../src/main/java/iped/parsers/whatsapp/WhatsAppParser.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/WhatsAppParser.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/WhatsAppParser.java index 247510dbe5..f61f3454d0 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/WhatsAppParser.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/WhatsAppParser.java @@ -735,6 +735,11 @@ 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);