moved handlers and subs to component folder
Former-commit-id: 2f11811d55
This commit is contained in:
parent
ae547a56ac
commit
5b8adc04ce
|
@ -1,4 +1,4 @@
|
||||||
(ns syng-im.handlers.discovery
|
(ns syng-im.components.discovery.handlers
|
||||||
(:require [re-frame.core :refer [register-handler after dispatch]]
|
(:require [re-frame.core :refer [register-handler after dispatch]]
|
||||||
[syng-im.utils.logging :as log]
|
[syng-im.utils.logging :as log]
|
||||||
[syng-im.protocol.api :as api]
|
[syng-im.protocol.api :as api]
|
|
@ -1,4 +1,4 @@
|
||||||
(ns syng-im.subscriptions.discovery
|
(ns syng-im.components.discovery.subs
|
||||||
(:require-macros [reagent.ratom :refer [reaction]])
|
(:require-macros [reagent.ratom :refer [reaction]])
|
||||||
(:require [re-frame.core :refer [register-sub]]
|
(:require [re-frame.core :refer [register-sub]]
|
||||||
[syng-im.db :as db]
|
[syng-im.db :as db]
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
(register-sub :get-discoveries
|
(register-sub :get-discoveries
|
||||||
(fn [db _]
|
(fn [db _]
|
||||||
(let [discoveries-updated (-> (discoveries-updated? @db)
|
(let [discoveries-updated (-> (discoveries-updated? @db)
|
||||||
(reaction))]
|
(reaction))]
|
||||||
(reaction
|
(reaction
|
||||||
(let [_ @discoveries-updated]
|
(let [_ @discoveries-updated]
|
||||||
(discovery-list))))))
|
(discovery-list))))))
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
(register-sub :get-discoveries-by-tag
|
(register-sub :get-discoveries-by-tag
|
||||||
(fn [db [_ tag limit]]
|
(fn [db [_ tag limit]]
|
||||||
(let [discoveries-updated (-> (discoveries-updated? @db)
|
(let [discoveries-updated (-> (discoveries-updated? @db)
|
||||||
(reaction))]
|
(reaction))]
|
||||||
(log/debug "Getting discoveries for: " tag)
|
(log/debug "Getting discoveries for: " tag)
|
||||||
(reaction
|
(reaction
|
||||||
(let [_ @discoveries-updated]
|
(let [_ @discoveries-updated]
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
(register-sub :get-popular-tags
|
(register-sub :get-popular-tags
|
||||||
(fn [db [_ limit]]
|
(fn [db [_ limit]]
|
||||||
(let [discoveries-updated (-> (discoveries-updated? @db)
|
(let [discoveries-updated (-> (discoveries-updated? @db)
|
||||||
(reaction))]
|
(reaction))]
|
||||||
(log/debug "Getting tags limited: " limit)
|
(log/debug "Getting tags limited: " limit)
|
||||||
(reaction
|
(reaction
|
||||||
(let [_ @discoveries-updated]
|
(let [_ @discoveries-updated]
|
|
@ -28,7 +28,7 @@
|
||||||
apply-staged-commands
|
apply-staged-commands
|
||||||
check-suggestion]]
|
check-suggestion]]
|
||||||
[syng-im.handlers.sign-up :as sign-up-service]
|
[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?
|
[syng-im.models.chats :refer [chat-exists?
|
||||||
create-chat
|
create-chat
|
||||||
chat-add-participants
|
chat-add-participants
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
(:require-macros [reagent.ratom :refer [reaction]])
|
(:require-macros [reagent.ratom :refer [reaction]])
|
||||||
(:require [re-frame.core :refer [register-sub]]
|
(:require [re-frame.core :refer [register-sub]]
|
||||||
[syng-im.db :as db]
|
[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
|
[syng-im.models.chat :refer [current-chat-id
|
||||||
chat-updated?]]
|
chat-updated?]]
|
||||||
[syng-im.models.chats :refer [chats-list
|
[syng-im.models.chats :refer [chats-list
|
||||||
|
|
Loading…
Reference in New Issue