Do not load user repos with timer

* load user repositories on Repositories view render (in case admin
  token exists) instead of with interval timer
* remove unused keys from re-frame default-db
This commit is contained in:
Teemu Patja 2017-03-23 18:32:01 +02:00
parent 32dbc257aa
commit d47f74693a
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
3 changed files with 5 additions and 6 deletions

View File

@ -8,6 +8,4 @@
:open-bounties []
:owner-bounties {}
:top-hunters []
:activity-feed []
:gh-token nil
:gh-admin-token nil})
:activity-feed []})

View File

@ -96,8 +96,7 @@
(let [ls-data (update-local-storage-tokens store login token admin-token)]
(println "update-tokens, ls-data:" ls-data)
{:db (merge db ls-data)
:store ls-data
:dispatch [:load-user-repos]})))
:store ls-data})))
;; copied from plumbing.core to avoid cljsbuild warnings
(defn dissoc-in

View File

@ -92,4 +92,6 @@
[:i.warning.icon]
"To set bounties for your repositories or for organizations' repositories where you have access, you need to grant Commit ETH the required permissions"]
[:a.ui.button.small {:href js/authorizeUrlAdmin} "Enable"]]
[repos-page-token-ok]))))
(do
(rf/dispatch [:load-user-repos])
[repos-page-token-ok])))))