Updated chatterino badges api

This commit is contained in:
fourtf
2019-08-23 16:52:04 +02:00
parent 0c6760d0ca
commit 0577692c99
6 changed files with 23 additions and 18 deletions
@@ -20,7 +20,7 @@ AccountController::AccountController()
auto it = std::find(accs.begin(), accs.end(), args.item);
assert(it != accs.end());
this->accounts_.removeItem(it - accs.begin());
this->accounts_.removeItem(it - accs.begin(), this);
}
});
@@ -29,11 +29,13 @@ AccountController::AccountController()
{
case ProviderId::Twitch:
{
auto &accs = this->twitch.accounts;
auto it = std::find(accs.begin(), accs.end(), args.item);
assert(it != accs.end());
this->twitch.accounts.removeItem(it - accs.begin(), this);
if (args.caller != this)
{
auto accs = this->twitch.accounts.cloneVector();
auto it = std::find(accs.begin(), accs.end(), args.item);
assert(it != accs.end());
this->twitch.accounts.removeItem(it - accs.begin(), this);
}
}
break;
}