From e06337fdee7e894104f6f5935317cd455106b61a Mon Sep 17 00:00:00 2001 From: Insality Date: Fri, 17 Apr 2020 23:26:39 +0300 Subject: [PATCH] Changed back on back and backspace. Update backhandler --- druid/base/back_handler.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/druid/base/back_handler.lua b/druid/base/back_handler.lua index 00414c8..b00779a 100644 --- a/druid/base/back_handler.lua +++ b/druid/base/back_handler.lua @@ -32,7 +32,11 @@ end -- @tparam string action_id on_input action id -- @tparam table action on_input action function M.on_input(self, action_id, action) - if action_id == const.ACTION_BACK and action[const.RELEASED] then + if not action[const.RELEASED] then + return false + end + + if action_id == const.ACTION_BACK or action_id == const.ACTION_BACKSPACE then self.on_back:trigger(self:get_context(), self.params) return true end @@ -41,4 +45,4 @@ function M.on_input(self, action_id, action) end -return M \ No newline at end of file +return M