 
 (.on socket "chat message"
   (fn [message]
-    (swap! app-state assoc :messages (conj (:messages @app-state) message))))
+    (swap! app-state assoc :messages (conj (:messages @app-state) message))
+    (swap! app-state assoc :message-received true)))
 
 (.on socket "userslist"
   (fn [users]

        (om/build-all message-view (:messages data))))
    om/IDidUpdate
      (did-update [_ _ _]
        (let [div (js/$ "#messages")]
          (.scrollTop div (.prop div "scrollHeight"))))))

(defn file-upload-progress-view [data owner]
  (reify

                          :upload-progress nil
                          :data-uploaded 0
                          :current-file-download nil
                          :current-download-stream-id (new js/Blob)
                          :message-received false}))

(enable-console-print!)

