Bug 460927 - Split up persistent notification into two notification channels for no devices/connected devices
Summary: Split up persistent notification into two notification channels for no device...
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: android-application (show other bugs)
Version: unspecified
Platform: Android Android 12.x
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-24 08:34 UTC by Yannik Sembritzki
Modified: 2022-10-31 21:03 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yannik Sembritzki 2022-10-24 08:34:00 UTC
Currently, the persistent notification uses one notification channel, called `PERSISTENT`, no matter whether devices are connected or not: https://invent.kde.org/network/kdeconnect-android/-/blob/master/src/org/kde/kdeconnect/BackgroundService.java#L337

This prevents users from choosing to display the notification when devices are connected, and hiding it when no devices are connected.

To solve this, it would be nice to split this up into two notification channels.
Comment 1 Yannik Sembritzki 2022-10-24 09:54:31 UTC
PR for this: https://invent.kde.org/network/kdeconnect-android/-/merge_requests/299
Comment 2 Philip C 2022-10-31 21:03:33 UTC
Git commit 9f9b565ce6a25f642e45312ebaa61c3962c95024 by Philip Cohn-Cort, on behalf of Yannik Sembritzki.
Committed on 31/10/2022 at 21:03.
Pushed by philipc into branch 'master'.

Separate persistent notification channel based on whether devices are connected

This allows users to selectively disable the persistent notification when no devices are connected.

M  +2    -1    res/values/strings.xml
M  +7    -1    src/org/kde/kdeconnect/BackgroundService.java
M  +12   -7    src/org/kde/kdeconnect/Helpers/NotificationHelper.java

https://invent.kde.org/network/kdeconnect-android/commit/9f9b565ce6a25f642e45312ebaa61c3962c95024