sip: origin: Always notify state changes when relevant to the UI

by adding functions to the public API which determine if state changes
should be shown to the user and use them (instead of duplicating similar
logic).
This commit is contained in:
Evangelos Ribeiro Tzaras
2022-05-19 20:10:46 +02:00
parent 41479eea09
commit 46ff807f6b
3 changed files with 72 additions and 50 deletions

View File

@@ -145,7 +145,9 @@ change_state (CallsSipOrigin *self,
g_assert (CALLS_SIP_ORIGIN (self));
if (self->state == new_state)
if (self->state == new_state &&
new_state != CALLS_ACCOUNT_STATE_ERROR &&
!calls_account_state_reason_is_for_ui (reason))
return;
old_state = self->state;