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
...@@ -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
emitSignal<DRing::ConfigurationSignal::RegistrationStateChanged>( runOnMainThread([
accountID_, accountId = accountID_,
mapStateNumberToString(registrationState_), state = mapStateNumberToString(registrationState_),
detail_code, detail_code,
detail_str); detail_str,
details = getVolatileAccountDetails()
emitSignal<DRing::ConfigurationSignal::VolatileDetailsChanged>( ]{
accountID_, emitSignal<DRing::ConfigurationSignal::RegistrationStateChanged>(
getVolatileAccountDetails()); accountId,
state,
detail_code,
detail_str);
emitSignal<DRing::ConfigurationSignal::VolatileDetailsChanged>(accountId, details);
});
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment