deltachat / deltachat-android

Email-based instant messaging for Android.
GNU General Public License v3.0
1.07k stars 145 forks source link

make “Notifications on/off” a per-profile setting #3126

Closed r10s closed 3 days ago

r10s commented 1 month ago

similar to desktop, it makes sense also on android to disable notifications for some accounts. we got real-world user request for that several times; and in the team this was also considered useful :)

UI-wise, no new options are needed. as a minimum, make “Settings / Notifications / On/Off” a per-profile switch.

optionally on first iteration, the state can be shown in the “profile switcher” as well (similar to desktop). however, if we do so, we should also offer a way to change the setting directly there, eg. on long tap (for a permanent button cluttering UI, the option is usually not changed frequently enough)

as this is only a minor change, this should align well with the "maintenance" approach. the issue has low priority, however.

sidenotes:

adbenitez commented 1 month ago

UI-wise, no new options are needed. as a minimum, make “Settings / Notifications / On/Off” a per-profile switch.

it is not that easy, we have the notifications permission that user may not grant and we would still need to display the state of the global app notifications EDIT: maybe show disabled for all even if enabled, when permission is not granted and and on enabling request permission or go to system settings to change the permission, I guess

not sure this aligns with "maintenance" but well :)

r10s commented 1 month ago

afaik, the "Settings / Notifications / On/Off" switch was never meant to reflect the system setting, let alone that it can change it.

if the user has disabled notification permission in the system, the whole settings dialog is not reachable but a warning is shown instead. this is fine and can stay as is. "Settings / Notifications / On/Off" anyways cannot be altered or viewed.

so, my idea is really only to only replace Prefs.isNotificationsEnabled() by eg. dcContext.getConfig("notifications_enabled") and let the setting-switch change that setting.

adbenitez commented 1 month ago

then first we need a core issue for this