forked from blue/squawk
clearing presences and statuses on disconnect of an account
This commit is contained in:
parent
49aa99d4db
commit
833913cac2
6 changed files with 38 additions and 0 deletions
|
@ -30,6 +30,9 @@ void Models::Account::setState(Shared::ConnectionState p_state)
|
|||
if (state != p_state) {
|
||||
state = p_state;
|
||||
changed(2);
|
||||
if (state == Shared::disconnected) {
|
||||
toOfflineState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,3 +201,8 @@ void Models::Account::setError(const QString& p_resource)
|
|||
}
|
||||
}
|
||||
|
||||
void Models::Account::toOfflineState()
|
||||
{
|
||||
setAvailability(Shared::offline);
|
||||
Item::toOfflineState();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue