mirror of
https://github.com/penpot/penpot.git
synced 2026-04-25 11:18:36 +00:00
Fix linter warnings and errors across version-related namespaces
frontend/src/app/main/ui/workspace.cljs: - Remove unused requires: app.common.data, app.main.data.notifications, app.main.data.workspace.versions frontend/src/app/main/data/workspace/versions.cljs: - Remove unused require: app.common.uuid - Fix duplicate reify type: enter-restore used ::restore-version (same as the private restore-version fn), renamed to ::enter-restore - Remove unused bindings: state in enter-restore, team-id in exit-preview and restore-version-from-plugin
This commit is contained in:
parent
4ca8af3347
commit
809515a797
@ -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))))))
|
||||
|
||||
|
||||
|
||||
|
||||
@ -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]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user