diff --git a/frontend/src/app/main/data/workspace/versions.cljs b/frontend/src/app/main/data/workspace/versions.cljs index 50f8cf9f6b..072f8c634a 100644 --- a/frontend/src/app/main/data/workspace/versions.cljs +++ b/frontend/src/app/main/data/workspace/versions.cljs @@ -11,7 +11,6 @@ [app.common.logging :as log] [app.common.schema :as sm] [app.common.time :as ct] - [app.common.uuid :as uuid] [app.main.data.event :as ev] [app.main.data.helpers :as dsh] [app.main.data.notifications :as ntf] @@ -194,9 +193,9 @@ (defn enter-restore [id] (assert (uuid? id) "expected valid uuid for `id`") - (ptk/reify ::restore-version + (ptk/reify ::enter-restore ptk/WatchEvent - (watch [_ state _] + (watch [_ _ _] (let [output-s (rx/subject)] (rx/merge output-s @@ -241,8 +240,7 @@ ptk/WatchEvent (watch [_ state _] - (let [team-id (:current-team-id state) - file-id (:current-file-id state) + (let [file-id (:current-file-id state) page-id (:current-page-id state)] (rx/of (dwpg/initialize-page file-id page-id)))))) @@ -366,19 +364,18 @@ (ptk/reify ::restore-version-from-plugins ptk/WatchEvent - (watch [_ state _] - (let [team-id (:current-team-id state)] - (rx/concat - (rx/of (ev/event {::ev/name "restore-version" - ::ev/origin "plugins"}) - ::dwp/force-persist) + (watch [_ _ _] + (rx/concat + (rx/of (ev/event {::ev/name "restore-version" + ::ev/origin "plugins"}) + ::dwp/force-persist) - (->> (wait-for-persistence file-id id) - (rx/map #(initialize-version))) + (->> (wait-for-persistence file-id id) + (rx/map #(initialize-version))) - (->> (rx/of 1) - (rx/tap resolve) - (rx/ignore))))))) + (->> (rx/of 1) + (rx/tap resolve) + (rx/ignore)))))) diff --git a/frontend/src/app/main/ui/workspace.cljs b/frontend/src/app/main/ui/workspace.cljs index 07aa0540c8..c0e600b835 100644 --- a/frontend/src/app/main/ui/workspace.cljs +++ b/frontend/src/app/main/ui/workspace.cljs @@ -7,15 +7,12 @@ (ns app.main.ui.workspace (:require-macros [app.main.style :as stl]) (:require - [app.common.data :as d] [app.common.data.macros :as dm] [app.main.data.common :as dcm] [app.main.data.helpers :as dsh] - [app.main.data.notifications :as ntf] [app.main.data.persistence :as dps] [app.main.data.plugins :as dpl] [app.main.data.workspace :as dw] - [app.main.data.workspace.versions :as dwv] [app.main.features :as features] [app.main.refs :as refs] [app.main.router :as-alias rt]