mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-10 19:47:40 +01:00
Fixed incorrect unlock information in Achievements dialog
This commit is contained in:
parent
cc3ff347b4
commit
d19aa934ae
@ -79,7 +79,7 @@ void AchievementBox::UpdateData()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
const auto& badge = AchievementManager::GetInstance().GetAchievementBadge(
|
const auto& badge = AchievementManager::GetInstance().GetAchievementBadge(
|
||||||
m_achievement->id, m_achievement->state != RC_CLIENT_ACHIEVEMENT_STATE_UNLOCKED);
|
m_achievement->id, !m_achievement->unlocked);
|
||||||
std::string_view color = AchievementManager::GRAY;
|
std::string_view color = AchievementManager::GRAY;
|
||||||
if (m_achievement->unlocked & RC_CLIENT_ACHIEVEMENT_UNLOCKED_HARDCORE)
|
if (m_achievement->unlocked & RC_CLIENT_ACHIEVEMENT_UNLOCKED_HARDCORE)
|
||||||
color = AchievementManager::GOLD;
|
color = AchievementManager::GOLD;
|
||||||
@ -92,11 +92,18 @@ void AchievementBox::UpdateData()
|
|||||||
m_badge->setStyleSheet(
|
m_badge->setStyleSheet(
|
||||||
QStringLiteral("border: 4px solid %1").arg(QtUtils::FromStdString(color)));
|
QStringLiteral("border: 4px solid %1").arg(QtUtils::FromStdString(color)));
|
||||||
|
|
||||||
if (m_achievement->state == RC_CLIENT_ACHIEVEMENT_STATE_UNLOCKED)
|
if (m_achievement->unlocked)
|
||||||
{
|
{
|
||||||
m_status->setText(
|
if (m_achievement->unlock_time != 0)
|
||||||
tr("Unlocked at %1")
|
{
|
||||||
.arg(QDateTime::fromSecsSinceEpoch(m_achievement->unlock_time).toString()));
|
m_status->setText(
|
||||||
|
tr("Unlocked at %1")
|
||||||
|
.arg(QDateTime::fromSecsSinceEpoch(m_achievement->unlock_time).toString()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_status->setText(tr("Unlocked"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user