From 3bfe943328d703c07edda2cdc74c0ea63a514980 Mon Sep 17 00:00:00 2001 From: Benedikt Ziemons Date: Sun, 2 Jun 2024 21:26:33 +0200 Subject: [PATCH] Fix tabs without onTouch --- orders.lua | 5 ----- tabview.lua | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/orders.lua b/orders.lua index 3823954..a530743 100644 --- a/orders.lua +++ b/orders.lua @@ -89,10 +89,6 @@ local function estimatedHeight() return listframes.estimatedHeight() end -local function onTouch(self, touch_x, touch_y) - return false -end - return { name="orders", @@ -100,5 +96,4 @@ return { fetch=fetch, displayTab=displayTab, estimatedHeight=estimatedHeight, - onTouch=onTouch, } diff --git a/tabview.lua b/tabview.lua index c7a95dd..d4277e8 100644 --- a/tabview.lua +++ b/tabview.lua @@ -84,6 +84,7 @@ end local function onTouch(touchX, touchY) if currentTab ~= nil and + currentTab.onTouch ~= nil and winhlp.contains(currentTab.window, touchX, touchY) and currentTab.onTouch(currentTab, winhlp.translate(currentTab.window, touchX, touchY)) then return true