CoverBrowser: minor fix and remove unused (#12895)

Remove unused UIManager:clearRenderStack().
Previously it was used by CoverBrowser plugin when extending the FileManager popup file dialog with aditional buttons.
Now the buttons are inserted through the api added in https://github.com/koreader/koreader/pull/12845.
This commit is contained in:
hius07
2024-12-15 09:14:01 +02:00
committed by GitHub
parent 378519ccf3
commit 72086b7a26
3 changed files with 4 additions and 25 deletions

View File

@@ -681,21 +681,6 @@ dbg:guard(UIManager, 'setDirty',
end)
--]]
--[[--
Clear the full repaint & refresh queues.
NOTE: Beware! This doesn't take any prisonners!
You shouldn't have to resort to this unless in very specific circumstances!
plugins/coverbrowser.koplugin/covermenu.lua building a franken-menu out of buttondialog
and wanting to avoid inheriting their original paint/refresh cycle being a prime example.
--]]
function UIManager:clearRenderStack()
logger.dbg("clearRenderStack: Clearing the full render stack!")
self._dirty = {}
self._refresh_func_stack = {}
self._refresh_stack = {}
end
function UIManager:insertZMQ(zeromq)
table.insert(self._zeromqs, zeromq)
return zeromq

View File

@@ -136,12 +136,6 @@ function IconButton:onTapIconButton()
--
self.callback()
-- NOTE: plugins/coverbrowser.koplugin/covermenu (ab)uses UIManager:clearRenderStack,
-- so we need to enqueue the actual refresh request for the unhighlight post-callback,
-- otherwise, it's lost.
-- This changes nothing in practice, since we follow by explicitly requesting to drain the refresh queue ;).
UIManager:setDirty(nil, "fast", self.dimen)
UIManager:forceRePaint()
end
return true

View File

@@ -672,7 +672,7 @@ function CoverBrowser:setupFileManagerDisplayMode(display_mode)
end
end
local function _FileManagerHistory_updateItemTable(self)
local function _FileManagerHistory_updateItemTable(self, ...)
-- 'self' here is the single FileManagerHistory instance
-- FileManagerHistory has just created a new instance of Menu as 'hist_menu'
-- at each display of History. Soon after instantiation, this method
@@ -714,7 +714,7 @@ local function _FileManagerHistory_updateItemTable(self)
end
-- And do now what the original does
_FileManagerHistory_updateItemTable_orig(self)
_FileManagerHistory_updateItemTable_orig(self, ...)
end
function CoverBrowser:setupHistoryDisplayMode(display_mode)
@@ -750,7 +750,7 @@ function CoverBrowser:setupHistoryDisplayMode(display_mode)
end
end
local function _FileManagerCollections_updateItemTable(self)
local function _FileManagerCollections_updateItemTable(self, ...)
-- 'self' here is the single FileManagerCollections instance
-- FileManagerCollections has just created a new instance of Menu as 'coll_menu'
-- at each display of Collection/Favorites. Soon after instantiation, this method
@@ -792,7 +792,7 @@ local function _FileManagerCollections_updateItemTable(self)
end
-- And do now what the original does
_FileManagerCollection_updateItemTable_orig(self)
_FileManagerCollection_updateItemTable_orig(self, ...)
end
function CoverBrowser:setupCollectionDisplayMode(display_mode)