From 4c4978d948dff0c6336c2407602b27026428c400 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 28 Mar 2016 21:54:57 +0300 Subject: [PATCH] Remove debug messages. --- src/uxbox/data/pages.cljs | 9 +-------- src/uxbox/state/project.cljs | 3 +-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/uxbox/data/pages.cljs b/src/uxbox/data/pages.cljs index 6adec5059..dd368e393 100644 --- a/src/uxbox/data/pages.cljs +++ b/src/uxbox/data/pages.cljs @@ -122,7 +122,6 @@ (defn watch-page-changes [id] (letfn [(on-page-change [buffer] - #_(println "on-page-change" buffer) (let [page (second buffer)] (rs/emit! (update-page page))))] (let [lens (l/getter #(stpr/pack-page % id))] @@ -154,10 +153,8 @@ rs/WatchEvent (-apply-watch [this state s] (letfn [(on-success [{page :payload}] - (println "on-success") #(assoc-in % [:pages-by-id id :version] (:version page))) (on-failure [e] - (println "on-failure" e) (uum/error (tr "errors.page-update")) (rx/empty))] (->> (rp/do :update/page-metadata (into {} this)) @@ -175,7 +172,7 @@ rs/WatchEvent (-apply-watch [_ state s] (letfn [(on-success [_] - (rs/swap #(stpr/dissoc-page % id))) + (rs/swap #(stpr/purge-page % id))) (on-failure [e] (uum/error (tr "errors.delete-page")) (rx/empty))] @@ -199,7 +196,6 @@ (defrecord FetchPinnedPageHistory [id] rs/WatchEvent (-apply-watch [_ state s] - (println "FetchPinnedPageHistory" id) (letfn [(on-success [{history :payload}] (->PinnedPageHistoryFetched history)) (on-failure [e] @@ -219,7 +215,6 @@ (defrecord PageHistoryFetched [history append?] rs/UpdateEvent (-apply-update [_ state] - (println "PageHistoryFetched" "append=" append?) (let [items (into [] history) minv (apply min (map :version history)) state (assoc-in state [:workspace :history :min-version] minv)] @@ -232,7 +227,6 @@ (defrecord FetchPageHistory [id since max] rs/WatchEvent (-apply-watch [_ state s] - (println "FetchPageHistory" id) (letfn [(on-success [{history :payload}] (->PageHistoryFetched history (not (nil? since)))) (on-failure [e] @@ -254,7 +248,6 @@ (defrecord CleanPageHistory [] rs/UpdateEvent (-apply-update [_ state] - (println "CleanPageHistory") (-> state (assoc-in [:workspace :history :items] nil) (assoc-in [:workspace :history :selected] nil)))) diff --git a/src/uxbox/state/project.cljs b/src/uxbox/state/project.cljs index a5da4c371..42ee54e32 100644 --- a/src/uxbox/state/project.cljs +++ b/src/uxbox/state/project.cljs @@ -35,7 +35,6 @@ "Return a packed version of page object ready for send to remore storage service." [state id] - (time (let [page (get-in state [:pages-by-id id]) xf (filter #(= (:page (second %)) id)) shapes (into {} xf (:shapes-by-id state))] @@ -43,7 +42,7 @@ (assoc-in [:data :shapes] (into [] (:shapes page))) (assoc-in [:data :shapes-by-id] shapes) (update-in [:data] dissoc :items) - (dissoc :shapes))))) + (dissoc :shapes)))) (defn unpack-page "Unpacks packed page object and assocs it to the