From 2f11811d55f07d1fc63e3d1f147d3148ba0d591a Mon Sep 17 00:00:00 2001 From: Adrian Tiberius Date: Sat, 7 May 2016 18:04:19 +0300 Subject: [PATCH] moved handlers and subs to component folder --- .../discovery.cljs => components/discovery/handlers.cljs} | 2 +- .../discovery.cljs => components/discovery/subs.cljs} | 8 ++++---- src/syng_im/handlers.cljs | 2 +- src/syng_im/subs.cljs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename src/syng_im/{handlers/discovery.cljs => components/discovery/handlers.cljs} (96%) rename src/syng_im/{subscriptions/discovery.cljs => components/discovery/subs.cljs} (89%) diff --git a/src/syng_im/handlers/discovery.cljs b/src/syng_im/components/discovery/handlers.cljs similarity index 96% rename from src/syng_im/handlers/discovery.cljs rename to src/syng_im/components/discovery/handlers.cljs index 45e3b06a6f..44d24c99d9 100644 --- a/src/syng_im/handlers/discovery.cljs +++ b/src/syng_im/components/discovery/handlers.cljs @@ -1,4 +1,4 @@ -(ns syng-im.handlers.discovery +(ns syng-im.components.discovery.handlers (:require [re-frame.core :refer [register-handler after dispatch]] [syng-im.utils.logging :as log] [syng-im.protocol.api :as api] diff --git a/src/syng_im/subscriptions/discovery.cljs b/src/syng_im/components/discovery/subs.cljs similarity index 89% rename from src/syng_im/subscriptions/discovery.cljs rename to src/syng_im/components/discovery/subs.cljs index 49375de678..d1a8eb5399 100644 --- a/src/syng_im/subscriptions/discovery.cljs +++ b/src/syng_im/components/discovery/subs.cljs @@ -1,4 +1,4 @@ -(ns syng-im.subscriptions.discovery +(ns syng-im.components.discovery.subs (:require-macros [reagent.ratom :refer [reaction]]) (:require [re-frame.core :refer [register-sub]] [syng-im.db :as db] @@ -15,7 +15,7 @@ (register-sub :get-discoveries (fn [db _] (let [discoveries-updated (-> (discoveries-updated? @db) - (reaction))] + (reaction))] (reaction (let [_ @discoveries-updated] (discovery-list)))))) @@ -23,7 +23,7 @@ (register-sub :get-discoveries-by-tag (fn [db [_ tag limit]] (let [discoveries-updated (-> (discoveries-updated? @db) - (reaction))] + (reaction))] (log/debug "Getting discoveries for: " tag) (reaction (let [_ @discoveries-updated] @@ -32,7 +32,7 @@ (register-sub :get-popular-tags (fn [db [_ limit]] (let [discoveries-updated (-> (discoveries-updated? @db) - (reaction))] + (reaction))] (log/debug "Getting tags limited: " limit) (reaction (let [_ @discoveries-updated] diff --git a/src/syng_im/handlers.cljs b/src/syng_im/handlers.cljs index 309e89e7ef..fdef1faa8d 100644 --- a/src/syng_im/handlers.cljs +++ b/src/syng_im/handlers.cljs @@ -28,7 +28,7 @@ apply-staged-commands check-suggestion]] [syng-im.handlers.sign-up :as sign-up-service] - [syng-im.handlers.discovery :as discovery] + [syng-im.components.discovery.handlers :as discovery] [syng-im.models.chats :refer [chat-exists? create-chat chat-add-participants diff --git a/src/syng_im/subs.cljs b/src/syng_im/subs.cljs index b8dd5de64d..407676c2de 100644 --- a/src/syng_im/subs.cljs +++ b/src/syng_im/subs.cljs @@ -2,7 +2,7 @@ (:require-macros [reagent.ratom :refer [reaction]]) (:require [re-frame.core :refer [register-sub]] [syng-im.db :as db] - [syng-im.subscriptions.discovery :as discovery] + [syng-im.components.discovery.subs :as discovery] [syng-im.models.chat :refer [current-chat-id chat-updated?]] [syng-im.models.chats :refer [chats-list