From e5214edb22bcfe330a9db4e639b8d2bc4161a156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ritzl?= Date: Tue, 8 Aug 2023 23:51:29 +0200 Subject: [PATCH] Fix back() callback --- monarch/monarch.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monarch/monarch.lua b/monarch/monarch.lua index 097189b..66c03be 100644 --- a/monarch/monarch.lua +++ b/monarch/monarch.lua @@ -991,12 +991,12 @@ function M.back(options, data, cb) local screen = table.remove(stack) if screen then log("back()", screen.id) + local back_cb = callbacks.track() local top = stack[#stack] -- if we go back to the same screen we need to first hide it -- and wait until it is hidden before we show it again local same_screen = top and top.id == screen.id if same_screen or (options and options.sequential) then - local back_cb = callbacks.track() back_out(screen, top, WAIT_FOR_TRANSITION, function() if data then top.data = data