Skip to content
Snippets Groups Projects
Commit c2220f93 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

account: emit state change signal on main thread

Change-Id: Idcf09e8b9773e422de3894ac85114e0140aa7004
parent a81e2cf5
No related branches found
No related tags found
No related merge requests found
...@@ -158,15 +158,21 @@ Account::setRegistrationState(RegistrationState state, unsigned detail_code, con ...@@ -158,15 +158,21 @@ Account::setRegistrationState(RegistrationState state, unsigned detail_code, con
if (state != registrationState_) { if (state != registrationState_) {
registrationState_ = state; registrationState_ = state;
// Notify the client // Notify the client
runOnMainThread([
accountId = accountID_,
state = mapStateNumberToString(registrationState_),
detail_code,
detail_str,
details = getVolatileAccountDetails()
]{
emitSignal<DRing::ConfigurationSignal::RegistrationStateChanged>( emitSignal<DRing::ConfigurationSignal::RegistrationStateChanged>(
accountID_, accountId,
mapStateNumberToString(registrationState_), state,
detail_code, detail_code,
detail_str); detail_str);
emitSignal<DRing::ConfigurationSignal::VolatileDetailsChanged>( emitSignal<DRing::ConfigurationSignal::VolatileDetailsChanged>(accountId, details);
accountID_, });
getVolatileAccountDetails());
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment