Commit Graph

7 Commits

Author SHA1 Message Date
adbenitez f6c1fa2f5c apply code format part 1 2026-03-11 13:40:09 +01:00
B. Petersen b19d39b794 use updated texts in tests 2025-11-28 14:27:18 +01:00
adbenitez 96068be20b update code at src/androidTest 2025-11-01 23:50:37 +01:00
adbenitez 4547f771f5 optimize imports 2025-02-25 18:43:23 +01:00
Hocuri e3809cf1f8 fix: Opening files in external apps always works now (#3585)
The problem was that we returned `null` from `getType()`.

fix #3517
2025-02-06 13:46:19 +01:00
Hocuri 8e55a3dbf3 fix: Use getFilename() instead of the actual filename on disk (#3521)
* fix: Use msg.getFilename() instead of the file's name in some cases

* fix: Use msg.getFilename() instead of the file's name in initializeDraft()

* fix: Use msg.getFilename() instead of the file's name in MediaItem

* fix: Use the correct file name in MediaView

* refactor: `msg` param of `getManuallyCalculatedSlideInfo()` was always null

* Improve comment

* Revert "refactor: `msg` param of `getManuallyCalculatedSlideInfo()` was always null"

We will unfortunately need getManuallyCalculatedSlideInfo() with `msg`
param

This reverts commit 60e8248db32dc22812d3f23da194bab644802045.

* fix: Fix drafting images

This fixes a bug introduced in 14f69f87e8b11a7d0568e58593946a1f1c01e75e:
When you drafted an image, pressed Back, and opened the chat again, then
the height of the drafted image was wrong and tapping the image opened a
preview for the wrong image.

I do think that theoretically it would be nicer to use getSlideForMsg
here, because we already have a DcMsg, but this didn't work because a)
the width and height wasn't gotten from the msg and instead 0 was passed
and b) the code tries to save a msgId instead of the message instead,
and loading the message from the database fails later since it's just a
draft.

I didn't want to try and fix these things, because they might be bigger
refactorings and I don't know the code.

* fix: Use the original message's filemime if there is one

...instead of trying to guess the mimetype from the uri
2025-01-15 16:40:23 +01:00
adbenitez fee58e6eac fix building 2024-06-12 02:17:10 +02:00