Content deleted Content added
split out notice bar icon code into its own method, and add notice bar icons from self.cfg.noticeBarIcons |
cache the result of ArticleHistory:getAllObjects |
||
Line 767:
obj.isSmall = yesno(obj.args.small) or false
-- Define
obj.errors = {}
obj._allObjectsCache = {}
-- Format the config
Line 997 ⟶ 998:
function ArticleHistory:getAllObjects(addSelf)
local cacheKey = addSelf and 'addSelf' or 'default'
local ret = {}▼
local
if
local statusObj = self:getStatusObj()
end▼
self:getNoticeObjects(),▼
self:getActionObjects(),▼
self:getCollapsibleNoticeObjects()▼
for i, t in ipairs(objTables) do▼
for j, obj in ipairs(t) do▼
▲ ret[#ret + 1] = obj
end
end▼
▲ self:getNoticeObjects(),
▲ if addSelf then
▲ self:getActionObjects(),
ret[#ret + 1] = self▼
▲ self:getCollapsibleNoticeObjects()
}
▲ for j, obj in ipairs(t) do
ret[#ret + 1] = obj
end
if addSelf then
▲ ret[#ret + 1] = self
self._allObjectsCache[cacheKey] = ret
end
return ret
|