Added logging

This commit is contained in:
M66B 2023-06-01 19:04:43 +02:00
parent 373741c5cc
commit 70366fb9bc
2 changed files with 3 additions and 0 deletions

View File

@ -1944,6 +1944,7 @@ class Core {
if (imessage == null)
throw new MessageRemovedException();
EntityLog.log(context, "Downloading raw id=" + message.id + " subject=" + message.subject);
File file = message.getRawFile(context);
try (OutputStream os = new BufferedOutputStream(new FileOutputStream(file))) {
imessage.writeTo(os);

View File

@ -147,6 +147,7 @@ public class FragmentDialogForwardRaw extends FragmentDialogBase {
continue;
for (EntityMessage thread : messages) {
EntityLog.log(context, "Fetching raw id=" + thread.id + " subject=" + thread.subject);
if (threads) {
String hash = (message.hash == null ? message.msgid : message.hash);
if (hashes.contains(hash))
@ -290,6 +291,7 @@ public class FragmentDialogForwardRaw extends FragmentDialogBase {
final Context context = getContext();
ArrayList<Uri> uris = new ArrayList<>();
for (long id : ids) {
EntityLog.log(context, "Sending raw id=" + id);
File file = EntityMessage.getRawFile(context, id);
Uri uri = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID, file);
uris.add(uri);