Skip to content

Commit

Permalink
Merge pull request #375 from Micdu70/patch-1
Browse files Browse the repository at this point in the history
Fix #374
  • Loading branch information
qutrits authored Sep 20, 2024
2 parents 3242871 + 133189e commit d0ecdfd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Views/Stats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4919,7 +4919,7 @@ public StatSummary GetLevelInfo(string levelId, LevelType type, BestRecordType r
RoundInfo info = roundInfo[i];
TimeSpan finishTime = info.Finish.GetValueOrDefault(info.Start) - info.Start;
bool hasFinishTime = finishTime.TotalSeconds > 1.1;
bool hasLevelDetails = this.StatLookup.TryGetValue(info.UseShareCode ? info.ShowNameId : info.Name, out LevelStats levelDetails);
bool hasLevelDetails = this.StatLookup.ContainsKey(info.UseShareCode ? info.ShowNameId : info.Name);
bool isCurrentLevel = false;
if (useShareCode) {
isCurrentLevel = true;
Expand Down Expand Up @@ -5004,7 +5004,7 @@ public StatSummary GetLevelInfo(string levelId, LevelType type, BestRecordType r
}
}

bool isFinalRound = useShareCode ? (info.IsFinal || info.Crown) : ((levelDetails.IsFinal || info.Crown) && !endRound.PrivateLobby);
bool isFinalRound = useShareCode ? (info.IsFinal || info.Crown) : ((info.IsFinal || info.Crown) && !endRound.PrivateLobby);

if (ReferenceEquals(info, endRound) && isFinalRound) {
summary.CurrentFinalStreak++;
Expand Down Expand Up @@ -6985,7 +6985,7 @@ public void menuStats_Click(object sender, EventArgs e) {
}

this.overlay.ResetBackgroundImage();

this.loadingExisting = true;
this.LogFile_OnParsedLogLines(rounds);
this.loadingExisting = false;
Expand Down Expand Up @@ -7216,6 +7216,7 @@ private async void menuSettings_Click(object sender, EventArgs e) {
this.Invalidate();

IsDisplayOverlayPing = this.CurrentSettings.OverlayVisible && !this.CurrentSettings.HideRoundInfo && (this.CurrentSettings.SwitchBetweenPlayers || this.CurrentSettings.OnlyShowPing);
IsOverlayRoundInfoNeedRefresh = true;

if (string.IsNullOrEmpty(lastLogPath) != string.IsNullOrEmpty(this.CurrentSettings.LogPath) ||
(!string.IsNullOrEmpty(lastLogPath) && string.Equals(lastLogPath, this.CurrentSettings.LogPath, StringComparison.OrdinalIgnoreCase))) {
Expand Down

0 comments on commit d0ecdfd

Please sign in to comment.