ringer: Check if incoming call is silenced
Avoid ringing in this case.
This commit is contained in:
@@ -255,7 +255,8 @@ has_incoming_call (CallsRinger *self)
|
|||||||
for (GList *node = self->calls; node != NULL; node = node->next) {
|
for (GList *node = self->calls; node != NULL; node = node->next) {
|
||||||
CallsCall *call = node->data;
|
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 TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -292,6 +293,10 @@ call_added_cb (CallsRinger *self,
|
|||||||
"state-changed",
|
"state-changed",
|
||||||
G_CALLBACK (update_ring),
|
G_CALLBACK (update_ring),
|
||||||
self);
|
self);
|
||||||
|
g_signal_connect_swapped (call,
|
||||||
|
"notify::silenced",
|
||||||
|
G_CALLBACK (update_ring),
|
||||||
|
self);
|
||||||
update_ring (self);
|
update_ring (self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user