Non-touch: fix crash when expanding ToC (#8892)

This commit is contained in:
Philip Chan
2022-03-12 22:51:22 +08:00
committed by GitHub
parent 4f849c23ab
commit 36fc981b7c

View File

@@ -815,7 +815,7 @@ function ReaderToc:onShowToc()
function toc_menu:onMenuHold(item)
if not Device:isTouchDevice() and (item.state and item.state.callback) then
-- non touch to expand toc
item.state.callback()
item.state.callback(item.index)
else
-- Match the items' width
local infomessage = InfoMessage:new{