File deduplication, Android part (#3513)

This commit is contained in:
Hocuri 2025-01-27 18:40:44 +01:00 committed by GitHub
parent bfda7ab2c3
commit c6b89055d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 32 additions and 25 deletions

View file

@ -1039,7 +1039,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
msg = new DcMsg(dcContext, DcMsg.DC_MSG_FILE);
}
String path = attachment.getRealPath(this);
msg.setFile(path, null);
msg.setFileAndDeduplicate(path, attachment.getFileName(), null);
}
}
msg.setText(body);
@ -1329,7 +1329,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
if (quote.isPresent()) {
msg.setQuote(quote.get().getQuotedMsg());
}
msg.setFile(path, null);
msg.setFileAndDeduplicate(path, null, null);
dcContext.sendMsg(chatId, msg);
}