Commit e8286661 authored by Ricardo J. Mendez's avatar Ricardo J. Mendez

When re-activating, setting the activation time to the original one

I had forgotten to set the activation time when coming back from a
suspend. I should also have set the suspend-info to nil.
parent 4e0003d2
......@@ -110,8 +110,11 @@
;; De-activate every inactive tab
(doseq [tab now-inactive]
(dispatch [:handle-deactivation tab true (:time suspend-info)]))
(doseq [tab still-active]
(dispatch [:handle-activation tab (:start-time tab)]))
(console/log "From suspend:" suspend-info)
(console/log "Still active:" active-old-tabs)
(dispatch [:data-set :suspend-info] nil)
......@@ -130,7 +133,7 @@
(fn [app-state [_ tab]]
(fn [app-state [_ tab start-time]]
(console/log "Handling activation" tab)
(if tab
(assoc-in app-state
......@@ -138,7 +141,7 @@
(-> tab
(assoc :active true
:start-time (now))))
:start-time (or start-time (now)))))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment