Commit 130a7a46 authored by Yang Wang's avatar Yang Wang Committed by Andreas Traczyk

Revoking Device: the UI sync problem during both device revoke and add is solved


Change-Id: Ie1fbc16cb0cd8ba47ac35cf850839c35a6a69b16
Gitlab: #487
parent 79264456
...@@ -533,7 +533,6 @@ void SettingsWidget::removeDeviceSlot(int index) ...@@ -533,7 +533,6 @@ void SettingsWidget::removeDeviceSlot(int index)
if (ok) { if (ok) {
delete_: delete_:
LRCInstance::getCurrentAccountInfo().deviceModel->revokeDevice(it->id, password.toStdString()); LRCInstance::getCurrentAccountInfo().deviceModel->revokeDevice(it->id, password.toStdString());
updateAndShowDevicesSlot();
} }
} }
...@@ -736,6 +735,12 @@ void SettingsWidget::setConnections() ...@@ -736,6 +735,12 @@ void SettingsWidget::setConnections()
QObject::connect(LRCInstance::getCurrentAccountInfo().deviceModel.get(), &lrc::api::NewDeviceModel::deviceUpdated, QObject::connect(LRCInstance::getCurrentAccountInfo().deviceModel.get(), &lrc::api::NewDeviceModel::deviceUpdated,
this, &SettingsWidget::updateAndShowDevicesSlot); this, &SettingsWidget::updateAndShowDevicesSlot);
QObject::connect(LRCInstance::getCurrentAccountInfo().deviceModel.get(), &lrc::api::NewDeviceModel::deviceRevoked,
this, &SettingsWidget::updateAndShowDevicesSlot);
QObject::connect(LRCInstance::getCurrentAccountInfo().deviceModel.get(), &lrc::api::NewDeviceModel::deviceAdded,
this, &SettingsWidget::updateAndShowDevicesSlot);
// account settings setters { // account settings setters {
connect(ui->accountEnableCheckBox, &QCheckBox::clicked, this, &SettingsWidget::setAccEnableSlot); connect(ui->accountEnableCheckBox, &QCheckBox::clicked, this, &SettingsWidget::setAccEnableSlot);
......
Markdown is supported
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