Commit Graph

1296 Commits

Author SHA1 Message Date
B. Petersen 267b3c8a75 delete unused dc_msg notification channels 2020-05-25 13:38:53 +02:00
B. Petersen 6c7a17ac41 steamline notification channel names 2020-05-25 13:38:53 +02:00
B. Petersen 6865d812d0 group notifications 2020-05-25 13:38:53 +02:00
B. Petersen b46fea9529 rename MsgNotificationManager to NotificationCenter 2020-05-25 13:38:53 +02:00
B. Petersen 1e60eb9c1a just use defaults for led-pattern, it is no longer supported since andoid8; in-chat sounds are independent from global-notification-switch 2020-05-25 13:38:52 +02:00
B. Petersen fd4404c1e3 allow chat-specific sounds+vibrate by creating channels as needed 2020-05-25 13:38:52 +02:00
B. Petersen 0c6edfb44f just delete all unused channels 2020-05-25 13:38:52 +02:00
B. Petersen 9563000da7 set sound/vibrate/led for systems <androidO 2020-05-25 13:38:52 +02:00
B. Petersen 14289db25d make basic notifications work 2020-05-25 13:38:52 +02:00
B. Petersen 48f1693420 move in-chat sounds to InChatSounds class 2020-05-25 13:38:52 +02:00
B. Petersen 84c35c7483 replace global calls to MessageNotifierCompat with MsgNotificationManager 2020-05-25 13:38:51 +02:00
B. Petersen 1e34375a64 fix marking incoming message as being seen
before, messages were only maked as seen after the chat was entered
or after some scrolling takes place.

if a user was inside a chat, reading the last incoming message,
that did not sent out markseen (unless, some scrolling was done,
which, honestly, is often the case)

this commit starts the markseen-bouncer also when the chatlist is reloaded
(true eg. on incoming messages) - but this is not done when the
list is paused (eg. screen is off or some other fragment/dialog above)
2020-05-23 15:34:04 +02:00
B. Petersen 1f3ac36edb fix showing selected chats
this bug was introduced some days ago at adce890bef
by declaring chatId as "int" instead of "long", which is formally correct,
however, int many parts of the code, the chatId is "long" -
as for the set of selected chats:
checking that set for an "int" always returns false ...

i first wanted to change all the sets to use int instead of long,
however, this would require lots of lines to be change -
keeping in mind that this seems to be very sensitive,
and use "long" for the chatId in ConversationListItem.

doing a larger refactoring of Long to Int has the potential to introduce more bugs,
things are not that intuitive in this area -
i would also not have exected that i cannot query a set of longs using an integer,
when using primitives (i know, they are converted implicitly to objects :)
2020-05-22 16:53:37 +02:00
Hocuri dc32481764 Migrate muting to core functions 2020-05-21 10:24:29 +02:00
B. Petersen 8791e8017b remove duplicated mute-icon; it is set by the caller, together with verified-icon, in ConversationListItem::bind() 2020-05-21 01:10:55 +02:00
B. Petersen 8b19b81c5b save one db-roundtrip on every chatlist-item 2020-05-21 00:26:45 +02:00
Hocuri adce890bef Continue using the core functions for muting 2020-05-20 23:51:25 +02:00
Hocuri 40e24c3a39 Start transitioning to the mute functions of the core 2020-05-20 23:51:25 +02:00
B. Petersen 6f2a40ecb3 do not delete the group-avatar on editing group-name 2020-05-14 01:59:52 +02:00
bjoern 290b7954f7 Revert "Fix #999 swiping a notification away should not mark things as "noticed"" 2020-05-13 23:40:36 +02:00
bjoern 792a49db2c Merge pull request #1350 from deltachat/fix-sharing-draft-filename
Fix #1347 Draft file name "Unknown".
2020-05-12 13:45:04 +02:00
Hocuri f26bb5b99c Catch exception instead of checking for null 2020-05-12 11:14:44 +02:00
Hocuri a559ca9228 Prevent NPE 2020-05-11 14:07:36 +02:00
Hocuri da536f1ed9 Fix #1347 Draft file name "Unknown".
getManuallyCalculatedSlideInfo() in AttatchmentManager sometimes failed to get a file name. Now, in this case, it is just extracted from the uri.
2020-05-11 11:37:52 +02:00
B. Petersen c0d74a0acf show changed situation to 1.6 users 2020-05-11 01:11:22 +02:00
B. Petersen d1690399cc move permantent-notification switch more prominent, let it depend on notifications-enabled 2020-05-11 01:11:22 +02:00
B. Petersen b0641a49c3 change default for 'reliable background service' to false
reason is that ppl are pretty annoyed by the
permanant notification, that might have been expected and that would be okay.
but, more worse, for whatever reasons, this drains more battery on some systems
than having just "allow consuming battery" enabled,
maybe some system do not go to doze mode because of the permantent-notification.

anyway, to avoid initial annoyances, we switch back to
- asking the user to "allow consuming battery"
- having a 15 mintues or so polling interval (as on iOS)

but, in contrast to 1.3, we now still have the _option_ to
enable a permantent-notification that user can enabled if everything else
described at https://dontkillmyapp.com does not work.

the "smart" permantent notification from 1.3,
that are only shown under some circumstances, however, are gone.
they are not realiable, eg. we did not use them when "consume battery"
was enabled - which is not sufficient on various "modern" systems.
but the main reason is that _if_ the user enables a permantent notification,
this can also be regarded as a hint that things are up and running.
2020-05-11 01:11:22 +02:00
cyberta 7941fb8172 remove comment 2020-05-06 14:04:14 +02:00
Hocuri 51a443a184 Fix #1305 An object (image), "shared" to Delta Chat once, appears again forever in Chat editors until app is closed
The problem was that the intent still had the share flag and data.

A draft is now initialized (and stays) so that the user can return to sending later.
2020-05-06 13:58:16 +02:00
cyBerta 4b200fab63 Merge pull request #1339 from deltachat/media-quality
use media-quality-option from core
2020-05-06 12:50:34 +02:00
cyBerta 4f7236268d Merge pull request #1277 from deltachat/notifyswipednotread
Fix #999 swiping a notification away should not mark things as "noticed"
2020-05-05 18:46:43 +02:00
B. Petersen ea0653e89a use string-constant 2020-05-04 18:08:14 +02:00
B. Petersen eee1f35b99 migrate pref_compression to media_quality 2020-05-04 17:24:19 +02:00
B. Petersen 8659a23a11 use new media_quality core-config-value 2020-05-04 17:24:19 +02:00
B. Petersen 5752e436e0 adapt to new api 2020-05-04 14:28:31 +02:00
B. Petersen f4cc86055c make sure, dc_add_address_book() does not get names or mail addresses with lineends 2020-05-03 14:43:51 +02:00
B. Petersen a011dccfe3 reorder device messages 2020-05-02 15:52:48 +02:00
B. Petersen c60cff2259 simplify casting, add comment 2020-05-02 15:08:24 +02:00
Hocuri 27a87775d3 Code style: Handle DC_EVENT_INCOMING_MSG directly in handleEvent().
sendToObservers() made sure not to execute it on a background thread but updateNotification() does this, too, so everything is fine.
2020-05-02 14:00:57 +02:00
Hocuri 16dfd9f98c Fix #1328 Missing notifications: initializeIncomingMessageNotifier() in ApplicationDcContext, not ApplicationContext 2020-05-02 13:45:54 +02:00
B. Petersen 1203df4daf do not recreate/restart ForegroundDetector, NetworkStateReceiver, KeepAliveService on switching account 2020-05-02 11:14:26 +02:00
B. Petersen dc81fa60d4 typo (make sure, the message is only shown once) 2020-05-02 11:06:02 +02:00
B. Petersen 938dc404f7 update translations 2020-05-02 11:04:57 +02:00
B. Petersen 6f0d8c730d reword device message text 2020-04-30 10:54:31 +02:00
B. Petersen 687693bdf8 add device message wrt permantent notification 2020-04-29 21:49:41 +02:00
cyBerta 0c3ff54b79 Merge pull request #1323 from deltachat/reliable-notifications
show permanent notification unconditionally and add a switch to override this
2020-04-28 18:23:13 +02:00
B. Petersen 2fa348a8ea show a warning when database deletion fails 2020-04-28 18:13:14 +02:00
B. Petersen efe6c9e4df also delete files in the blobdir 2020-04-28 17:59:34 +02:00
B. Petersen 37d05f394a rename handleSwitDeleteAccount() to showDeleteAccountMenu() 2020-04-28 17:47:32 +02:00
B. Petersen 328b368f70 rename handleSwitchAccount() to showSwitchAccountMenu() 2020-04-28 17:45:40 +02:00