mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-08 06:48:04 +03:00
fix: i'm literally not even explaining this one
it dedupes things in the session raise viewer i don't care anymore i have give up hope
This commit is contained in:
@@ -152,16 +152,37 @@ function SessionScoreStatBreakdown({
|
||||
}
|
||||
|
||||
if (scoreInfo.isNewScore || scoreInfo.deltas[metric] > 0) {
|
||||
PartialArrayRecordAssign(
|
||||
newEnums[metric],
|
||||
// @ts-expect-error yeah this is fine pls
|
||||
const enumValue = score.scoreData[metric] as string;
|
||||
// @ts-expect-error yeah this is fine pls
|
||||
const enumIndex = score.scoreData.enumIndexes[metric] as integer;
|
||||
|
||||
// @ts-expect-error yeah this is fine pls
|
||||
score.scoreData[metric] as string,
|
||||
{
|
||||
score,
|
||||
scoreInfo,
|
||||
if (newEnums[metric][enumValue]) {
|
||||
const alreadyInArray = newEnums[metric][enumValue].find(
|
||||
(e) => e.score.scoreID === score.scoreID
|
||||
);
|
||||
|
||||
if (
|
||||
alreadyInArray &&
|
||||
// @ts-expect-error not justifying this
|
||||
alreadyInArray.score.scoreData.enumIndexes[enumValue] < enumIndex
|
||||
) {
|
||||
alreadyInArray.score = score;
|
||||
alreadyInArray.scoreInfo = scoreInfo;
|
||||
} else {
|
||||
newEnums[metric][enumValue].push({
|
||||
score,
|
||||
scoreInfo,
|
||||
});
|
||||
}
|
||||
);
|
||||
} else {
|
||||
newEnums[metric][enumValue] = [
|
||||
{
|
||||
score,
|
||||
scoreInfo,
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user