Fixed forwarding messages with same ID

pull/194/merge
M66B 3 years ago
parent 8ae6ceac90
commit cf219a67bf

@ -95,7 +95,7 @@ public class FragmentDialogForwardRaw extends FragmentDialogBase {
try {
db.beginTransaction();
List<String> msgids = new ArrayList<>();
List<String> hashes = new ArrayList<>();
for (long id : ids) {
EntityMessage message = db.message().getMessage(id);
@ -128,9 +128,10 @@ public class FragmentDialogForwardRaw extends FragmentDialogBase {
continue;
for (EntityMessage thread : messages) {
if (msgids.contains(thread.msgid))
String hash = (message.hash == null ? message.msgid : message.hash);
if (hashes.contains(hash))
continue;
msgids.add(thread.msgid);
hashes.add(hash);
result.add(thread.id);

Loading…
Cancel
Save