From 428edf90bdd27ad91ff17a565a1b92079fb039a8 Mon Sep 17 00:00:00 2001 From: hius07 <62179190+hius07@users.noreply.github.com> Date: Sun, 17 Apr 2022 09:59:41 +0300 Subject: [PATCH] textviewer: add close_callback --- frontend/ui/widget/textviewer.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/ui/widget/textviewer.lua b/frontend/ui/widget/textviewer.lua index 82b793c87..4fce28bcb 100644 --- a/frontend/ui/widget/textviewer.lua +++ b/frontend/ui/widget/textviewer.lua @@ -118,7 +118,7 @@ function TextViewer:init() { text = _("Close"), callback = function() - UIManager:close(self) + self:onClose() end, }, }, @@ -217,6 +217,9 @@ end function TextViewer:onClose() UIManager:close(self) + if self.close_callback then + self.close_callback() + end return true end