feat: launch arg to start logged in as a supplied user (#5626)

This commit is contained in:
Liam Rooney
2024-10-06 01:29:44 -07:00
committed by GitHub
parent c1e04eeeff
commit 0085fb64ac
4 changed files with 23 additions and 0 deletions
@@ -1,5 +1,7 @@
#include "providers/twitch/TwitchAccountManager.hpp"
#include "Application.hpp"
#include "common/Args.hpp"
#include "common/Common.hpp"
#include "common/QLogging.hpp"
#include "providers/twitch/api/Helix.hpp"
@@ -144,6 +146,11 @@ void TwitchAccountManager::reloadUsers()
void TwitchAccountManager::load()
{
if (getApp()->getArgs().initialLogin.has_value())
{
this->currentUsername = getApp()->getArgs().initialLogin.value();
}
this->reloadUsers();
this->currentUsername.connect([this](const QString &newUsername) {