feedback-manager: End too noisy feedbacks on profile level change

When the profile gets lowered from e.g. quiet to silent we want to end
all ongoing feedbacks that belong to the quiet level.

This allows to e.g. silence an incoming phone call by switching the
feedback level via phosh's quick setting.

Closes: https://source.puri.sm/Librem5/feedbackd/-/issues/13
Closes: https://source.puri.sm/Librem5/feedbackd/-/issues/55
This commit is contained in:
Guido Günther
2024-06-21 19:57:29 +00:00
committed by Guido Günther
parent 3c02259156
commit 929d41b7db
2 changed files with 20 additions and 4 deletions
+2 -1
View File
@@ -354,7 +354,8 @@ fbd_feedback_theme_lookup_feedback (FbdFeedbackTheme *self,
FbdFeedbackBase *feedback = fbd_feedback_profile_get_feedback (profile,
fbd_event_get_event (event));
if (feedback) {
feedbacks = g_slist_prepend (feedbacks, g_object_ref(feedback));
g_object_set_data (G_OBJECT (feedback), "fbd-level", GUINT_TO_POINTER (i));
feedbacks = g_slist_prepend (feedbacks, g_object_ref (feedback));
}
}