Skip to content

Comments

notifications: Add support for watch timed mute options (1 hour, Today)#85

Open
asyba wants to merge 5 commits intocoredevices:masterfrom
asyba:notification_mute_day
Open

notifications: Add support for watch timed mute options (1 hour, Today)#85
asyba wants to merge 5 commits intocoredevices:masterfrom
asyba:notification_mute_day

Conversation

@asyba
Copy link
Contributor

@asyba asyba commented Jan 3, 2026

Implement the temporary mute functionality for notifications.
This allows to support the new mute options (1 hour, Today) that pebble has.

For the moment is just for sync the status between databases.

PebbleOS PR: coredevices/PebbleOS#651

@asyba
Copy link
Contributor Author

asyba commented Jan 9, 2026

There is a minor problem related to the database, not sure yet how to handle.
The app may fail and required a reinstall because the migration database for the new columns fails for somereason.

@gmarull gmarull requested a review from sjp4 February 12, 2026 11:22
@gmarull
Copy link
Member

gmarull commented Feb 12, 2026

ping @sjp4

@@ -1,8 +1,8 @@
{
"formatVersion": 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

27.json shouldn't be changed in this PR - that's why you were seeing migration problems (you probably did a build which changed the schema before changing the database version to 28). You'll need to rebase on the latest main (db version is now 33), and revert these changes to the schema json, then update the version to 34, compile, and checking those json changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see now how I have to deal with database changes, thanks for explain to me.

}
val anyContactMuted = notification.people.any { it.muteState == MuteState.Always }
val anyContactStarred = notification.people.any { it.muteState == MuteState.Exempt }
// Check if mute has expired
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code path is never hit, right? (because there's no way to configure the temperary mute on android)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we can't set the temporary mute on the app for the moment.

Only from the watch, but for Android the filter to decide if the notification should be sent or not it's done in the android app, so that is why I added this in this class.
but I don't have an android to test this specifically, maybe it's not used and needs to be removed??

Compare to ios that the filter decide can be done only in the watch since notification are sent directly to there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - we never sync that database with the watch on android, so these could never be set (unless there was a UI built to do that)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done removed.

@asyba asyba force-pushed the notification_mute_day branch from 17e6f85 to 186e880 Compare February 15, 2026 21:48
@asyba asyba requested a review from sjp4 February 15, 2026 22:38
@asyba asyba force-pushed the notification_mute_day branch from 186e880 to 1cc3972 Compare February 16, 2026 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants