* add download-ffi methods
* add 'Download' button for incomplete messages
* show 'downloading' animation
* make download_limit configurable
* set button to 'disabled' and text to 'Downloading...' on downloading; color does not really reflect that yet, but that can probably be tweaked by xml
* make 'download message body' translatable
These annotations don't actually have an effect, but they lead to an
error (not a warning) being shown in Android Studio. It still compiles
fine, though.
The line `case ScribbleActivity.SCRIBBLE_REQUEST_CODE:` in
ConversationActivity was therefore shown as an error all the time, which
was really annoying.
The alternative would be to suppress the error in ConversationActivity.
it is currently just not needed for a dialog-style html-page,
but raises the question what can be searched here.
if it turns out a search function becomes useful,
we can easily re-add it.
Fix#2032
The problem was that after returning from the image editor, `doReinitializeDraft` was true and therefore we the draft was reinitialized to the originally shared, unedited image.
This was introduced in
https://github.com/deltachat/deltachat-android/pull/1770. I im pretty
sure that what I changed is fine, but we had so many regressions in the
past in this area that we should thoroughly test this change before
merging.
I extended
https://github.com/deltachat/interface/edit/master/user-testing/mailto-links.md
a bit; before merging this PR we should test that everything there still
works.
See #2019, #2020 and #2021 for failed attempts at using a benchmark framework. So, for now I'll just go with timing the results manually.
For trying this out:
- Backup your current account first, maybe there are some bugs in switching accounts.
- You can run benchmarks on either an emulated device or a real device. For better benchmark results, you should run the benchmark on a real device and make sure that the core is compiled in release mode.
- Disable animations on your device, otherwise the test may fail. (Developer options -> Window animation scale, Transition animation scale & Animatior duration scale -> set all three of them to 0x)
- In Android Studio: File -> Sync project with gradle files
- In Android Studio: Run -> Edit configurations -> `+` -> Android Instrumented test -> Either select a specific class or select "All in Module" -> OK -> Select your configuration in the toolbar -> Click on the green "run" button in the toolbar to run the tests
When the benchmark is done, you will get a result like `MEASURED RESULTS (Benchmark) - Going thorough all 10 chats: 11635,11207,11363,11352,11279,11183,11137,11145,11032,11057`, Paste `11635,11207,11363,11352,11279,11183,11137,11145,11032,11057` into a cell in a LibreOffice spreadsheet, do `Data -> Text to columns`, choose `,` as a separator, hit `OK`, and create a diagram.
Steps to reproduce the bug:
- Search and select an archived chat
- Press back
Expected: Go back to the search activity.
Actual: Go to the Archived chats list activity. The user has to press
"back" again to get to the search.
Steps to reproduce the bug:
- Go to a contact request
- Go to the profile
- Block the contact
- Press back
Expected behavior: Only the compose panel is shown, not the request
buttons.
Actual behavior: Both the panel and the request buttons are shown
because the panel visibility is updated, but not the request button's.
I fixed this by always calling `initializeContactRequest()` after
`setComposePanelVisibility()`.
Steps to reproduce:
- Go to the profile of a contact
- Block the contact
- Press back twice
Expected behavior: The chat is not shown in the list anymore.
Actual behavior: The chat is shown in the list until the app is
restarted (or if you wait some time)