Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Micdu70 committed Sep 20, 2024
1 parent 3242871 commit d1060cb
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 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,9 +5004,9 @@ 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) {
if (isInWinsFilter && ReferenceEquals(info, endRound) && isFinalRound) {
summary.CurrentFinalStreak++;
if (summary.BestFinalStreak < summary.CurrentFinalStreak) {
summary.BestFinalStreak = summary.CurrentFinalStreak;
Expand All @@ -5024,12 +5024,11 @@ public StatSummary GetLevelInfo(string levelId, LevelType type, BestRecordType r
if (isInWinsFilter) {
summary.TotalWins++;
summary.TotalFinals++;
}

if (isShareCodeUsedOrIsNotPrivateLobby && !info.IsCasualShow) {
summary.CurrentStreak++;
if (summary.CurrentStreak > summary.BestStreak) {
summary.BestStreak = summary.CurrentStreak;
if (isShareCodeUsedOrIsNotPrivateLobby && !info.IsCasualShow) {
summary.CurrentStreak++;
if (summary.CurrentStreak > summary.BestStreak) {
summary.BestStreak = summary.CurrentStreak;
}
}
}
}
Expand Down Expand Up @@ -6985,7 +6984,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 +7215,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 d1060cb

Please sign in to comment.