mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-13 12:50:37 -05:00
Display warning if token expired or no token is selected
This commit is contained in:
@@ -342,6 +342,15 @@ std::string GetWeakTwitchTokenName(std::weak_ptr<TwitchToken> token)
|
||||
return con->Name();
|
||||
}
|
||||
|
||||
bool TokenIsValid(const std::weak_ptr<TwitchToken> &token_)
|
||||
{
|
||||
auto token = token_.lock();
|
||||
if (!token) {
|
||||
return false;
|
||||
}
|
||||
return token->IsValid();
|
||||
}
|
||||
|
||||
static bool ConnectionNameAvailable(const QString &name)
|
||||
{
|
||||
return !GetTwitchTokenByName(name);
|
||||
|
||||
Reference in New Issue
Block a user