mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[ReaderFooter] keep menu open after arranging items in status bar (#13168)
Some checks are pending
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (10.15, 13, x86-64, 15.2) (push) Waiting to run
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (11.0, 14, ARM64, 15.4) (push) Waiting to run
Some checks are pending
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (10.15, 13, x86-64, 15.2) (push) Waiting to run
macos / macOS ${{ matrix.image }} ${{ matrix.platform }} 🔨${{ matrix.xcode_version }} 🎯${{ matrix.deployment_target }} (11.0, 14, ARM64, 15.4) (push) Waiting to run
This commit is contained in:
@@ -1381,6 +1381,20 @@ function ReaderFooter:addToMainMenu(menu_items)
|
||||
{
|
||||
text = _("Arrange items in status bar"),
|
||||
separator = true,
|
||||
keep_menu_open = true,
|
||||
enabled_func = function()
|
||||
-- count enabled items
|
||||
local enabled_count = 0
|
||||
for _, m in ipairs(self.mode_index) do
|
||||
if self.settings[m] then
|
||||
enabled_count = enabled_count + 1
|
||||
if enabled_count > 1 then
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
return enabled_count > 1
|
||||
end,
|
||||
callback = function()
|
||||
local item_table = {}
|
||||
for i=1, #self.mode_index do
|
||||
|
||||
Reference in New Issue
Block a user