From 9a9f8e6ddd6df7f415b8a45eb4fe7f1f01fb86cb Mon Sep 17 00:00:00 2001 From: Rikard Blixt Date: Tue, 17 Dec 2024 09:53:35 +0100 Subject: [PATCH] fix(match2): status icon on upcoming games --- components/match2/commons/match_summary_base_ffa.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/components/match2/commons/match_summary_base_ffa.lua b/components/match2/commons/match_summary_base_ffa.lua index 69f89fc661..67165f5815 100644 --- a/components/match2/commons/match_summary_base_ffa.lua +++ b/components/match2/commons/match_summary_base_ffa.lua @@ -56,11 +56,11 @@ local MATCH_OVERVIEW_COLUMNS = { return 'bg-' .. (opponent.advanceBg or '') end, value = function (opponent, idx) - if not STATUS_ICONS[opponent.advanceBg] then + if not STATUS_ICONS[opponent.placementStatus] then return end return IconWidget{ - iconName = STATUS_ICONS[opponent.advanceBg], + iconName = STATUS_ICONS[opponent.placementStatus], } end, }, @@ -569,6 +569,11 @@ function MatchSummaryFfa.updateMatchOpponents(match) -- Sort match level based on final placement & score Array.sortInPlaceBy(match.opponents, FnUtil.identity, MatchSummaryFfa.placementSortFunction) + + -- Set the status of the current placement + Array.forEach(match.opponents, function(opponent, idx) + opponent.placementStatus = ((match.extradata.placementinfo or {})[idx] or {}).status + end) end ---@param game table