Skip to content

Play a quiet message sound when active and not on silent profile

Jolla Messages play a quiet "ding" sound when a new message arrives when you are on the conversation page, instead of pushing a full notification. Replicate the behavior for Whisperfish.

Using simply a QML Notification with nothing else set than the sound results in the correct behavior. Using the method below resulted in media playback getting stopped whenever the sound was played, this is fixed, too.

Since the current ringtone volume isn't available via Configuration (dconf) value (I didn't find it at least), the only option to respect the ringtone volume is to ask for the volume every time the sound is played. This is sub-optimal, but this was the simplest solution I came up with.

The callback "trickery" is required, because the DBusInterface call() is asynchronous, and calls its callback functions separately when the result arrives. The delay is un-noticably low, however.

Edited by Matti Viljanen

Merge request reports

Loading