Merge pull request #12759 from LillyJadeKatrin/retroachievements-header-fix
Hide Achievement Dialog Header When Disabled
This commit is contained in:
commit
f709071d41
|
@ -59,11 +59,12 @@ void AchievementHeaderWidget::UpdateData()
|
||||||
{
|
{
|
||||||
std::lock_guard lg{AchievementManager::GetInstance().GetLock()};
|
std::lock_guard lg{AchievementManager::GetInstance().GetLock()};
|
||||||
auto& instance = AchievementManager::GetInstance();
|
auto& instance = AchievementManager::GetInstance();
|
||||||
if (!instance.HasAPIToken())
|
if (!Config::Get(Config::RA_ENABLED) || !instance.HasAPIToken())
|
||||||
{
|
{
|
||||||
m_header_box->setVisible(false);
|
m_header_box->setVisible(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
m_header_box->setVisible(true);
|
||||||
|
|
||||||
QString user_name = QtUtils::FromStdString(instance.GetPlayerDisplayName());
|
QString user_name = QtUtils::FromStdString(instance.GetPlayerDisplayName());
|
||||||
QString game_name = QtUtils::FromStdString(instance.GetGameDisplayName());
|
QString game_name = QtUtils::FromStdString(instance.GetGameDisplayName());
|
||||||
|
|
Loading…
Reference in New Issue