3
0
mirror of https://github.com/britzl/monarch.git synced 2025-09-27 18:12:22 +02:00

Fixed another back issue (and tests)

This commit is contained in:
Björn Ritzl
2023-08-10 00:21:15 +02:00
parent 91204ca30b
commit b7053d2ce4
2 changed files with 11 additions and 11 deletions

View File

@@ -988,12 +988,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