diff --git a/frontend/src/app/main/data/workspace/libraries.cljs b/frontend/src/app/main/data/workspace/libraries.cljs index 2cf8ad2924..7a1d01a5c2 100644 --- a/frontend/src/app/main/data/workspace/libraries.cljs +++ b/frontend/src/app/main/data/workspace/libraries.cljs @@ -1190,12 +1190,11 @@ (ptk/reify ::notify-sync-file ptk/WatchEvent (watch [_ state _] - (let [file (dm/get-in state [:files file-id]) + (let [file (dsh/lookup-file state file-id) + file-data (get file :data) ignore-until (get file :ignore-sync-until) - - ;; FIXME: syntax of this can be improved libraries-need-sync (filter #(seq (assets-need-sync % file-data ignore-until)) (vals (get state :files))) @@ -1211,8 +1210,7 @@ (st/emit! (ntf/hide))) do-dismiss - #(do (st/emit! ignore-sync) - (st/emit! (ntf/hide)))] + #(st/emit! ignore-sync (ntf/hide))] (when (seq libraries-need-sync) (rx/of (ntf/dialog