Menu: Fix fallout from #12583 on hasDPad devices (#12657)

Tweak `mergeTitleBarIntoLayout` to keep the current selection (adjusted for the added rows) instead of resetting the focus.

It only actually called `moveFocusTo` on `hasDPad` devices, which explains why this was missed during testing.

Fix https://github.com/koreader/koreader/pull/12583#issuecomment-2423554770
This commit is contained in:
NiLuJe
2024-10-21 13:35:44 +02:00
committed by GitHub
parent 238f0c0896
commit fdd342de40
2 changed files with 7 additions and 12 deletions

View File

@@ -139,6 +139,7 @@ function CoverMenu:updateItems(select_number, no_recalculate_dimen)
-- As done in Menu:updateItems()
self:updatePageInfo(select_number)
Menu.mergeTitleBarIntoLayout(self)
self.show_parent.dithered = self._has_cover_images
UIManager:setDirty(self.show_parent, function()
@@ -316,7 +317,6 @@ function CoverMenu:updateItems(select_number, no_recalculate_dimen)
self.showFileDialog_ours = self.showFileDialog
end)
end
Menu.mergeTitleBarIntoLayout(self)
end
-- Similar to showFileDialog setup just above, but for History,