Skip to content

Commit

Permalink
Hide daily challenge display when not selecting osu!
Browse files Browse the repository at this point in the history
Also hide when no user is displayed.
  • Loading branch information
frenzibyte committed Jul 30, 2024
1 parent 8b910e5 commit 33fc6df
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,17 @@ protected override void LoadComplete()

private void updateDisplay()
{
if (User.Value == null)
if (User.Value == null || User.Value.Ruleset.OnlineID != 0)
{
dailyStreak.Text = "-";
Hide();
return;
}

var statistics = User.Value.User.DailyChallengeStatistics;
// dailyStreak.Text = UsersStrings.ShowDailyChallengeUnitDay(statistics.DailyStreakCurrent);
dailyStreak.Text = $"{statistics.DailyStreakCurrent}d";
TooltipContent = new DailyChallengeStreakTooltipData(colourProvider, statistics);
Show();
}

public ITooltip<DailyChallengeStreakTooltipData> GetCustomTooltip() => new DailyChallengeStreakTooltip();
Expand Down

0 comments on commit 33fc6df

Please sign in to comment.