1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-17 07:46:03 +00:00

ringer: Check if incoming call is silenced

Avoid ringing in this case.
This commit is contained in:
Evangelos Ribeiro Tzaras 2021-10-19 01:52:18 +02:00
parent 1587e4c78c
commit 410cf8945a

View file

@ -255,7 +255,8 @@ has_incoming_call (CallsRinger *self)
for (GList *node = self->calls; node != NULL; node = node->next) {
CallsCall *call = node->data;
if (is_ring_state (calls_call_get_state (call)))
if (is_ring_state (calls_call_get_state (call)) &&
!calls_call_get_silenced (call))
return TRUE;
}
return FALSE;
@ -292,6 +293,10 @@ call_added_cb (CallsRinger *self,
"state-changed",
G_CALLBACK (update_ring),
self);
g_signal_connect_swapped (call,
"notify::silenced",
G_CALLBACK (update_ring),
self);
update_ring (self);
}