Commit Graph

221 Commits

Author SHA1 Message Date
B. Petersen c873e9c607 allow quote-replies for stickers
once the sticker is sent together with the quote,
the quote is cleared.

if there is some draft text, however, that is kept as draft.
tickers together with text are discouraged.
2021-06-09 11:28:09 +02:00
B. Petersen d7729b6001 send images from 'Image keyboard' as stickers
see https://developer.android.com/guide/topics/text/image-keyboard
2021-06-09 11:28:09 +02:00
Hocuri 60f8c41263 In-Chat-Search: Start searching at the newest (=last) message, not the oldest 2021-05-16 11:12:22 +02:00
Hocuri 030f1f857d Also remove supportInvalidateOptionsMenu() calls 2021-05-03 12:29:06 +02:00
adbenitez 5b520e1c9a remove invalidateOptionsMenu calls 2021-05-02 19:16:49 -04:00
adbenitez c4354a5a1e use mute API directly 2021-04-09 15:30:51 -04:00
adbenitez 7b6f1bd507 add lock recording feature 2021-03-14 15:28:23 +01:00
Hocuri 720f553717 Make the upper back button return to conversation list even if the keyboard is open
As discussed in the Testing group
2021-03-08 14:21:22 +01:00
B. Petersen 113a6c8f75 remove DcEventCenter from wrapper as it belongs to *.connect 2021-03-05 11:28:33 +01:00
bjoern c814885f5c mailinglists3 (#1781)
* Adapt to mailing lists

* Change the question if this is a mailing list (untested)

* rm unused fn

* Adapt to getSenderName -> getOverrideSenderName (untested)

* Use dc_msg_get_sender_first_name() because sometimes the first name was not correctly shown in mailing lists

* Don't let the user modify mailing list groups

* Fix crash

* Make Unnamed newsletter translatable, make the subtitle of mailing lists "Mailing list"

* tweak and hide some controls for mailing lists

* Update src/com/b44t/messenger/DcChat.java

Co-authored-by: bjoern <r10s@b44t.com>

* adapt to new dc_msg_get_real_chat() api, remove dc_msg_get_sender_first_name()

* remove now dead code

* add mailing list name to contact-request-question

move question-creation to a helper class
to avoid duplicated code.

* fix DcMsg.getOverrideSenderName()

* adapt to new dc_decide_on_contact_request() api

* re-allow changing name+image for mailinglists, see recent discussions on PRs

* remove memberlist- and settings-tab from mailinglist profile until there is some use for them

* adapt to new DC_CHAT_TYPE_MAILINGLIST type

Co-authored-by: Hocuri <hocuri@gmx.de>
2021-02-07 23:39:48 +01:00
Hocuri b645dc60a0 Improve performance and make sure that there is no race condition
add a static boolean doReinitializeDraft that is set to true in onPause() if this activity was started using startActivityForResult(). in onResume(), do if(doReinitializeDraft) { initializeDraft(); }.
2021-02-05 22:32:50 +01:00
Hocuri cd5f0c212c Fix disappearing drafts
Some people reported that drafts were disappearing, and I found a way to
reproduce it (my interpretation in brackets):
- Open Saved Messages chat, could be any other chat too
- Go to another app and share to DC
- In DC select Saved Messages
  - (as sharing is done using startActivityForResult(), a second
  ConversationActivity is created without affecting the existing one)
- Leave DC. (The second ConversationActivity will correctly save its
draft to the db)
- Open DC again from the "Recent apps". (The first ConversationActivity
will be loaded. It will not know that there is a newer draft and still
show the old draft, or nothing if there was none. When it's closed, it
will overwrite the draft)

I came to this conclusion by logging all writes to the draft in the db.
Also, when I set `REQUEST_RELAY` to -1 (`startActivityForResult(intent,
-1) will behave the same as `startActivity(intent)`) (but that's not a
solution, sometimes we need startActivityForResult(), see e.g.
https://github.com/deltachat/deltachat-android/pull/1412)

What's still a little weird: I tried replacing all calls to
`startActivityForResult(-intent for ConversationActivity-)` with
startActivity(), and the issue didn't go away. Apparently it's only
enough if all calls are replaced, which is the same as setting
`REQUEST_RELAY` to -1. Maybe it's enough if one activity in the call
chain is called using startActivityForResult().

The call to `initializeDraft()` makes the activity start & resume 2-3ms
slower, which is probably acceptable.

While going back and forth with activities & sharing, I also encountered
some more bugs (without trying to reproduce them), but they are not too
annoying (as opposed to losing your draft) and I'm hesitant to changing
the activity-switching logic too much as it is so easy to just break
things again.
2021-02-05 22:32:50 +01:00
Hocuri 09e890f443 Keyboard correctly closes when it is open and a quote to another chat is clicked
Reported by Treefit
2020-11-08 11:43:23 +01:00
B. Petersen 5cbfd8cdb8 disallow muting saved-messages, there are no notifications for saved-messages 2020-10-26 13:38:30 +01:00
B. Petersen 7773f2ac79 disable 'disappearing messages' when a chat is not sendable; this is currently the device-chat, but may be others in the future 2020-10-25 01:09:56 +02:00
Hocuri 15373f9cc1 move directly to first-unread message fix #1654 2020-10-16 18:51:59 +02:00
Hocuri c720df5d5c Add swipe-to-reply quotes 2020-10-11 22:09:51 +03:00
B. Petersen 33fccc6d52 avoid unnecessary chat updates by filtering event-chat-id correctly 2020-09-20 16:28:54 +02:00
B. Petersen 41603e6688 pass DcEvent object to handlers to avoid error-prone casts 2020-09-20 15:50:40 +02:00
B. Petersen 097891e72a remove outdated reminder
the warning about outdated apps
was pretty unreliable in the past -
because of too short timings
and also because of the "installation date"
and the fact that an "installer" was used, is not always reliable.

also, the "installer date" could be wrong -
if the installation was done when the clock was altered badly.

as we cannot rely on the things the system provides here,
we move the whole thing to the core at
https://github.com/deltachat/deltachat-core-rust/pull/1901
which has also the advantage that this is done for all uis then.
2020-09-16 16:06:43 +02:00
B. Petersen e5112616bd remove some more unused function parameters 2020-09-10 00:41:16 +02:00
B. Petersen f27b530118 remove some unused minor functions and parameters 2020-09-10 00:22:26 +02:00
B. Petersen 4350fe120c remove dead code (by Android Studio / Analyze / Run Inspection by Name / Unused declarations 2020-09-09 22:55:18 +02:00
B. Petersen 33cd22552f make 'disappearing messages' a standard-feature 2020-09-04 14:28:52 +02:00
B. Petersen 4a2f6a32da request mic/cam permission more directly, a toast is not needed as all important information are already shown and it would appear on 'cancel' only 2020-08-22 00:52:24 +02:00
bjoern 9e0c4535d3 Merge pull request #1590 from deltachat/faster-camera-permission
Fix #1585 User asked for camera permission twice
2020-08-21 16:48:39 +02:00
Hocuri 81effe2350 Fix #1585 User asked for camera permission twice
The R.string.perm_explain_need_for_camera_access string is also used elsewhere, so we can't delete it.
2020-08-20 09:20:41 +02:00
link2xt 37e99b659f Linkify commands (#1567)
This makes bot commands similar to /echo clickable.

Patch from @adbenitez
2020-08-20 09:04:19 +02:00
cyberta 72411429cc update archive menu option, rely on core for chat visibility 2020-08-18 12:56:46 +02:00
cyberta 4d7f3c6914 fix lint warning about unchecked assignment 2020-08-12 13:02:57 +02:00
cyberta da436dcb6f check actual result of file attachment initialization 2020-08-12 12:59:44 +02:00
cyberta 449dce216e improve method naming 2020-08-12 12:52:28 +02:00
cyberta 4aa7a0ea39 remove unused method 2020-08-12 12:48:36 +02:00
cyberta 01203c15ee initialize ListenableFuture.Listener only if there is a valid file attachment 2020-08-12 12:40:45 +02:00
cyberta 41ef4a495a simplify share and sendto link handling code 2020-08-12 12:15:02 +02:00
Hocuri 46a14b954c Fix sharing both an image and a text to DC 2020-08-09 15:38:22 +02:00
B. Petersen 99698f29ad handle invitation 2020-07-29 14:00:01 +02:00
B. Petersen 4fa91c6624 make makeSearchMenuVisible() more logical, invalidate menu when leaving search 2020-07-29 14:00:01 +02:00
B. Petersen 95da8c4b9a add videochat icon to menu 2020-07-29 14:00:01 +02:00
cyberta 1a6c816d5e fix messageType for drafted gifs #1425 2020-07-28 13:11:53 +02:00
Angelo Fuchs 254e8ea414 Merge pull request #1483 from deltachat/466_background_image_good_with_keyboard_2
background image scaling good without jumping (2)
2020-07-24 18:03:04 +02:00
B. Petersen b57ad5721c allow sending images uncompressed, remove recoding code that is in the core now 2020-07-19 00:44:33 +02:00
Angelo Fuchs 3446a56a15 #466 manually scaling and cropping of background. 2020-07-13 16:34:03 +02:00
Angelo Fuchs 79b1db70c6 Reintroduce "fixes #466. Setting the background image provides for a image that is sufficiently large to fit portrait and landscape orientations. When displayed the shorter side is scaled to fit, the larger is then centered and cropped."
This reverts commit e8853a4329.
2020-07-13 16:32:42 +02:00
B. Petersen d315362d2d add ephemeral icon to title bar 2020-07-11 16:14:46 +02:00
cyberta 85502c9d05 cleanup 2020-07-06 13:12:51 +02:00
cyberta af2798dd7c keep activity stack intact, of forwarding message was successful, close the current ConversationActivity and go back to the initial chat the message was forwarded from 2020-07-06 12:52:43 +02:00
cyberta 69b587cbfb allow to share images as drafts w/o sending them as before, instead disallow to go back and forth between chat and chat list while sharing 2020-07-06 12:51:11 +02:00
cyberta 7dde6c4d98 fix mailto link handling 2020-07-02 16:53:03 +02:00
cyBerta a2dc69e27e Merge pull request #1341 from deltachat/fix-sharing-multiple
Relay to multiple contacts, rework message relaying
2020-06-30 23:03:37 +02:00