From 0746385555e6b6b7d13e7c34ba9d4427e3057fea Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sun, 27 Mar 2016 18:31:45 +0300 Subject: [PATCH] Do not fetch history on each history navigation action. --- src/uxbox/ui/workspace/sidebar/history.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uxbox/ui/workspace/sidebar/history.cljs b/src/uxbox/ui/workspace/sidebar/history.cljs index 372081a19..c32586106 100644 --- a/src/uxbox/ui/workspace/sidebar/history.cljs +++ b/src/uxbox/ui/workspace/sidebar/history.cljs @@ -41,7 +41,8 @@ (let [page @wb/page-l] (rs/emit! (dpg/fetch-page-history (:id page))) (add-watch wb/page-l ::key (fn [_ _ ov nv] - (when (> (:version nv) (:version ov)) + (when (and (> (:version nv) (:version ov)) + (not (:history nv))) (rs/emit! (dpg/fetch-page-history (:id nv)))))) own))