    ;; check once
    ;; Currently any way to check NetInfo does not work
    ;; This is left here as warning
-   ;(js/setTimeout
-   ;    check-nework-state
-   ;    15000)
+   ;;(js/setTimeout
+   ;;    check-nework-state
+   ;;    15000)
    db))
 
 (comment
-
   (re-frame.core/dispatch [:set-page :inbox])
   (re-frame.core/dispatch [:inbox/fetch])
   (re-frame.core/subscribe [:inbox/get]))

;; -------------------------------------------------------------

(register-handler-for
  :initialize-db
  (fn [_ _]
    (info app-db)
    (db/cache-load user-pwd-cache-key
                (fn [data] (dispatch [:auth/login data]))
                identity)
    app-db))


(register-handler-for

  "Simplify register handler calls by automatically registring middleware
   and by droping event name from event arguments"
  (register-handler
   event-name
   validate-schema-mw
   (fn [db evt]
     (debug (str "Dispatch " event-name))
     (apply handler-fn (concat [db] (rest evt))))))

(defn add-in-progress-event-for [db event-key] db)

