feat(accounts): add disabled account state
This commit is contained in:
parent
be910374dc
commit
9c71f364d2
6 changed files with 28 additions and 0 deletions
|
@ -43,6 +43,8 @@ QString AccountTask::getStateMessage() const
|
|||
return tr("Authentication task succeeded.");
|
||||
case AccountTaskState::STATE_OFFLINE:
|
||||
return tr("Failed to contact the authentication server.");
|
||||
case AccountTaskState::STATE_DISABLED:
|
||||
return tr("Client ID has changed. New session needs to be created.");
|
||||
case AccountTaskState::STATE_FAILED_SOFT:
|
||||
return tr("Encountered an error during authentication.");
|
||||
case AccountTaskState::STATE_FAILED_HARD:
|
||||
|
@ -78,6 +80,12 @@ bool AccountTask::changeState(AccountTaskState newState, QString reason)
|
|||
emitFailed(reason);
|
||||
return false;
|
||||
}
|
||||
case AccountTaskState::STATE_DISABLED: {
|
||||
m_data->errorString = reason;
|
||||
m_data->accountState = AccountState::Disabled;
|
||||
emitFailed(reason);
|
||||
return false;
|
||||
}
|
||||
case AccountTaskState::STATE_FAILED_SOFT: {
|
||||
m_data->errorString = reason;
|
||||
m_data->accountState = AccountState::Errored;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue