Fix account adding and account removing.
This needs to be fully tested before I'm comfortable closing #9 The "advanced" tab also needs testing We might also want to move the login website to chatterino.com and make it look nicer
This commit is contained in:
@@ -120,10 +120,6 @@ QVBoxLayout *SettingsDialog::createAccountsTab()
|
||||
loginWidget->show();
|
||||
});
|
||||
|
||||
connect(removeButton, &QPushButton::clicked, []() {
|
||||
qDebug() << "TODO: Implement"; //
|
||||
});
|
||||
|
||||
buttonBox->addButton(addButton, QDialogButtonBox::YesRole);
|
||||
buttonBox->addButton(removeButton, QDialogButtonBox::NoRole);
|
||||
|
||||
@@ -131,6 +127,16 @@ QVBoxLayout *SettingsDialog::createAccountsTab()
|
||||
|
||||
this->ui.accountSwitchWidget = new AccountSwitchWidget(this);
|
||||
|
||||
connect(removeButton, &QPushButton::clicked, [this]() {
|
||||
qDebug() << "TODO: Implement"; //
|
||||
auto selectedUser = this->ui.accountSwitchWidget->currentItem()->text();
|
||||
if (selectedUser == " - anonymous - ") {
|
||||
// Do nothing
|
||||
return;
|
||||
}
|
||||
AccountManager::getInstance().Twitch.removeUser(selectedUser);
|
||||
});
|
||||
|
||||
layout->addWidget(this->ui.accountSwitchWidget);
|
||||
|
||||
return layout;
|
||||
|
||||
Reference in New Issue
Block a user