* 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)
postpone selection after the last migration
as migrateAccount() currently selects the migrated account.
before, the selectAccount() call was useless
if another migrateAccount() call follows.
* stop observing DC_EVENT_CONTACTS_CHANGED events before blocking chat so the input bar is not made visible in handleEvent()
* add comment about removing DC_EVENT_CONTACTS_CHANGED observer on blocking
Co-authored-by: B. Petersen <r10s@b44t.com>
* revert unneeded changed introduced at #1975 - the timer is to update relative timestamps, data reloading is not needed and driven by events
* load chatlist async
* debounce chatlist loading
* add comment to the code
* hide question from request panel for now, if needed we can do something more specific in the future
* remove 'Done' toast to avoid problems with lost activity
for whatever reason,
i just got a crash related to the toast that could not find its activity,
probably we should have used the app context and not the activity.
however, the toast was annoying me already,
there is no point in adding it, the change is visible instantly to the user
on the screen.
* add 'Archived Chats' menu entry
the menu entry is at the place where the 'Contact Requests' were before -
that way, ppl may find existing contact requests easier.
moreover, it is now possible to access 'Archived Chats'
without endless scrolling ;)
* for archived requests, show both tags
* show a hint when 'Archived Chats' is empty
* contact requests do not display unread count; do not retrieve it and do not show text in bold
the functions were part of ApplicationDcContext for no special reason,
however, now standing in the way of avoiding subclassing DcContext
(to use the DcContext objects returned from DcAccounts directly).
See deltachat/deltachat-core-rust#2514
Fixes#1963Fixes#1890
Before deleting a chat the user is asked for confirmation. Before blocking not, because blocking is not "destructive" (i.e. can be completely reverted by unblocking the contact). I'm wondering whether we should show a snackbar with an Undo button though, but we can probably wait for user feedback on this.
* Start removing deaddrop chat
* Generally works
* Fix the buttons
(it's not easy to not show one of the buttons in
ConstraintLayout; if problems turn up, we should probably
just not use ConstraintLayout)
* fix more things
* restartLoader() instead of notifyDataSetChanged() because the latter didn't do anything
* Archived badge
* Rename "Contact request" to "Request"
* oops
* Remove setStockTranslation(8, context.getString(R.string.chat_contact_request));
* Remove commented-out code, we probably won't need it
* Don't show "Delete" button for 1:1 chats
* Get rid of short flickering when declining a request
* Set the app's night mode to match the preference
This added 6ms to startup time, but I think that's OK, as
we will also be able to use more `-night` views in the future
* Make "Accept" text a bit brighter and easier to read in dark mode
* Check if the chattype is Group instead of members.length == 1
I couldn't measure whether the app actually loads faster, as it varies a
lot (3.5s-4.5s on my device), but I could see that `getInstance()`
doesn't need 100ms-300ms on the main thread anymore.
- 'Getting new messages…' is not always fitting,
the messages may be old or they are not visible as messags at all
(read receipts, setup-contact, sync).
'Updating…' is better fitting here.
- 'Getting new messages…' is a bit too long and results in
linebreaks on smaller devices.
- Imediately hide the compose panel when you left the group and
EVENT_CHAT_CHANGED was sent
- Hide the "Leave" button if you are not a member of a group. I solved
this by checking `canSend()`; I could also have checked
`dc_is_contact_in_chat(CONTACT_ID_SELF)`, but this would be more
complexity for now.
When we add the possibility to leave mailing lists, the core will have
to explicitly tell the UI whether it's possible to leave a chat, but
that's not for now.
the code-part of this pr is pretty simple, most work was already done in core at deltachat/deltachat-core-rust#2512
* add DC_QR_{WITHDRAW|REVIVE}_VERIFY{CONTACT|GROUP} constants
* ask to withdraw/revive qr codes
* reword redraw hints, fix typos
* reword revive statement
* Update res/values/strings.xml: Add "by others"
* Apply suggestions from comradekingu's code review
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Hocuri <hocuri@gmx.de>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>