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:
Rasmus Karlsson
2017-12-19 15:12:33 +01:00
parent 1e3aca1b7a
commit 324dfc9ee9
5 changed files with 170 additions and 38 deletions
+16
View File
@@ -15,6 +15,22 @@ AccountSwitchWidget::AccountSwitchWidget(QWidget *parent)
this->addItem(userName);
}
AccountManager::getInstance().Twitch.userListUpdated.connect([this]() {
this->blockSignals(true);
this->clear();
this->addItem(anonUsername);
for (const auto &userName : AccountManager::getInstance().Twitch.getUsernames()) {
this->addItem(userName);
}
this->refreshSelection();
this->blockSignals(false);
});
this->refreshSelection();
QObject::connect(this, &QListWidget::clicked, [this] {