milo save status tab + update record for new pastebin link

This commit is contained in:
kepler155c@gmail.com
2019-03-21 20:28:51 -04:00
parent 3d815c6332
commit 8ca0071786
3 changed files with 19 additions and 2 deletions

View File

@@ -436,6 +436,15 @@ Unlocked Slots : %d of %d (%d%%)
UI.Tab.disable(self)
end
function page:eventHandler(event)
if event.type == 'tab_activate' then
local state = Milo:getState('statusState') or { }
state[node.name] = event.activated.tabTitle
Milo:setState('statusState', state)
end
return UI.Page.eventHandler(self, event)
end
table.insert(context.loggers, function(...)
local oterm = term.redirect(activityTab.term.win)
activityTab.term.win.scrollBottom()
@@ -449,6 +458,13 @@ Unlocked Slots : %d of %d (%d%%)
Event.onTimeout(0, function()
UI:setPage(page)
end)
-- restore active tab
local tabState = Milo:getState('statusState') or { }
if tabState[node.name] then
page.tabs:selectTab(Util.find(page.tabs, 'tabTitle', tabState[node.name]))
end
return page
end