* 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
This PR removes prepareMsg, which put messages into the OUT_PREPARING state and was used while videos were recoded. It also removes the now-unused method isIncreation().
- It was buggy because when you forwarded a message while it was InPreparation, or when the app was killed while a message is InPreparation, the message would stay InPreparation forever.
- Android is the only UI using this InPreparation (according to @r10s, I didn't check this myself), so we can simplify some things in core, which will also make it easier to deduplicate blob files.
there are not really reasons to not allow sending videochat invitations to the self chat:
- it is useful for testing
- one may forward them from there to somewhere else
- it is allowed on desktop and ios as well
in fact, i was very confused that it is not possible
when playing around with https://github.com/deltachat/deltachat-android/issues/3187 .
might be a relict where we did _only_ allow videochat in normal one-to-one chats.