mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-17 11:11:10 +02:00
@@ -2611,6 +2611,9 @@ function RomImporter:_syncModUpdateInfo(force)
|
||||
self.modUpdateInfo[m.id] = nil
|
||||
end
|
||||
end
|
||||
-- Bump so the view's sorted-list cache (keyed on this revision) rebuilds
|
||||
-- when release/download data actually changes, not every frame.
|
||||
self._modUpdateRev = (self._modUpdateRev or 0) + 1
|
||||
end
|
||||
|
||||
function RomImporter:_modUpdateInfo(id)
|
||||
@@ -2986,12 +2989,22 @@ end
|
||||
-- The rows the filters leave, and the installed-mod context the compatibility
|
||||
-- warnings are judged against.
|
||||
function RomImporter:_findRows()
|
||||
local ModIndex = require("src.mods.ModIndex")
|
||||
local all = (self.findIndex and self.findIndex.mods) or {}
|
||||
return ModIndex.filter(all, {
|
||||
-- The view asks every frame (immediate mode); only re-filter when the
|
||||
-- index, query, or category actually changed.
|
||||
local c = self._findRowsCache
|
||||
if c and c.src == all and c.query == self.findQuery
|
||||
and c.category == self.findCategory then
|
||||
return c.rows
|
||||
end
|
||||
local ModIndex = require("src.mods.ModIndex")
|
||||
local rows = ModIndex.filter(all, {
|
||||
query = self.findQuery,
|
||||
category = self.findCategory,
|
||||
})
|
||||
self._findRowsCache = { src = all, query = self.findQuery,
|
||||
category = self.findCategory, rows = rows }
|
||||
return rows
|
||||
end
|
||||
|
||||
function RomImporter:_findInstalledMap()
|
||||
|
||||
Reference in New Issue
Block a user