the speedup is done by the following changes:
- if the query-string is updated while actually performing a search,
the new search is not directly scheduled as before;
instead the flag needsAnotherBgSearch is set;
in the search-thread, the flag is checked
and another search will be performed
this way, searches as skipped, but the most recent is always executed
- if there are already chat- or contact-results and
the query-search has changed meanwhile, search is aborted
and the partial result is used (next search will be exexuted immediately)
this way, esp. the expensive searchMsgs() search is executed less often
on fast typing
- for a one-letter-search, search for messages is always skipped
this is roughly what we are doing on ios since
https://github.com/deltachat/deltachat-ios/pull/1140
moreover, this pr cleans up some things,
putting logic to the same java class.
* Adapt to alias support: Always show sender avatar and name on messages if OverrideSenderName is set
See https://github.com/deltachat/deltachat-core-rust/pull/2297
* Rename groupThread to showSender as this variable is not only true in groups anymore
Since #1834, images were not opened in the media preview again but
opened with an external app.
This was because since #1834, only slides that return true on
`hasImage()` are shown in the media preview, i.e. gifs, images and
videos.
Now, the problem was that images were shown as DocumentSlides under
some circumstances, which return `false` for `hasImage()` (naturally).
fix#1836
AvatarSelector is mostly copied from AttachmentTypeSelector. I first started to make it a subclass, but there were so many functions that had to be changed that I decided against it (esp. also the constructor, so I would have had to create another constructor to allow AvatarSelector to bypass the "normal" constructor). Could still be done though, of course.
I think (hope joy) that the commits are clear enough that this can be reviewed commit-by-commit. In the first commit, commenting out code means "Moved somewhere else"
I found it easier to look at the first commit using gitk than GitHub as GitHub doesn't show it as copied from AttachmentTypeSelector but as a new file. (of course you can also just review normally, going throug it file-by-file :)
* Don't show remove button if there is no image yet
* Remove unnecessary animation that just made things look worse
* Delete now-unused ClearProfileAvatarActivity
* For groups, also use the attachment-chooser-dialog
* Remove confirmation dialog for removing avatar (The user has to confirm anyway, and this was not correctly translated)
fix#1816
The problem was:
- as @link2xt already wrote, the onclick listener only checks if the mime type is `image/` or `video/`.
- then `PagingMediaLoader` loads all images and videos of the current chat with `context.getChatMedia(msg.getChatId(), DcMsg.DC_MSG_IMAGE, DcMsg.DC_MSG_GIF, DcMsg.DC_MSG_VIDEO)`. We need _all_ images so that the user can swipe back and forth.
- The correct image to be shown can't be found, the MediaPreview is opened anyway. As the correct image can't be shown, the first image in the chat is shown.