Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions lua/wikis/commons/Match/Util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,6 @@ function MatchUtil.shouldShowStreams(match)
return isWithinDisplayThreshold(match.timestamp)
end

---@param match MatchGroupUtilMatch
---@return boolean
function MatchUtil.shouldShowMatchDetails(match)
if match.phase == 'finished' or match.phase == 'ongoing' then
return true
elseif not match.timestamp then
return false
end

return isWithinDisplayThreshold(match.timestamp)
end

---@param match MatchGroupUtilMatch
---@return boolean
function MatchUtil.isMatchCloseToStart(match)
Expand Down
5 changes: 1 addition & 4 deletions lua/wikis/commons/Widget/Match/PageButton.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ local Lua = require('Module:Lua')
local I18n = Lua.import('Module:I18n')
local Info = Lua.import('Module:Info', {loadData = true})
local Logic = Lua.import('Module:Logic')
local MatchUtil = Lua.import('Module:Match/Util')

local Component = Lua.import('Module:Widget/Component')
local Button = Lua.import('Module:Widget/Basic/Button')
Expand Down Expand Up @@ -38,8 +37,6 @@ local function MatchPageButton(props)
return nil
end

local showMatchDetails = MatchUtil.shouldShowMatchDetails(match)

-- Original Match Id must be used to link match page if it exists.
-- It can be different from the matchId when shortened brackets are used.
local matchId = match.extradata.originalmatchid or match.matchId
Expand All @@ -48,7 +45,7 @@ local function MatchPageButton(props)

if Logic.isNotEmpty(match.bracketData.matchPage) then
return Button{
classes = { 'match-page-button', (not showMatchDetails) and 'show-when-logged-in' or nil},
classes = {'match-page-button'},
title = 'View match details',
variant = props.buttonType,
size = 'sm',
Expand Down
Loading