Fix tabs without onTouch
This commit is contained in:
parent
e799266475
commit
3bfe943328
|
@ -89,10 +89,6 @@ local function estimatedHeight()
|
||||||
return listframes.estimatedHeight()
|
return listframes.estimatedHeight()
|
||||||
end
|
end
|
||||||
|
|
||||||
local function onTouch(self, touch_x, touch_y)
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
name="orders",
|
name="orders",
|
||||||
|
@ -100,5 +96,4 @@ return {
|
||||||
fetch=fetch,
|
fetch=fetch,
|
||||||
displayTab=displayTab,
|
displayTab=displayTab,
|
||||||
estimatedHeight=estimatedHeight,
|
estimatedHeight=estimatedHeight,
|
||||||
onTouch=onTouch,
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,7 @@ end
|
||||||
|
|
||||||
local function onTouch(touchX, touchY)
|
local function onTouch(touchX, touchY)
|
||||||
if currentTab ~= nil and
|
if currentTab ~= nil and
|
||||||
|
currentTab.onTouch ~= nil and
|
||||||
winhlp.contains(currentTab.window, touchX, touchY) and
|
winhlp.contains(currentTab.window, touchX, touchY) and
|
||||||
currentTab.onTouch(currentTab, winhlp.translate(currentTab.window, touchX, touchY)) then
|
currentTab.onTouch(currentTab, winhlp.translate(currentTab.window, touchX, touchY)) then
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in a new issue