        (fn [c]
          (reset! at-bottom? true)
          (scroll-to-bottom! c)
+         (reset! old-last-msg (:id (last @messages)))
          (go (loop []
                (let [[_ ch] (alts! [embed-update-chan kill-chan])]
                  (when (not= ch kill-chan)


        at-bottom? (atom true)
        first-scroll? (atom true)

        check-at-bottom
        (fn []

       :component-will-unmount
       (fn [] (put! kill-chan (js/Date.)))

       :component-did-update
       (fn [c _]
         (let [last-msg (last @messages)]
           (when (and (not= @old-last-msg (:id last-msg))
                      (= (:user-id last-msg) @(subscribe [:user-id])))
             (reset! at-bottom? true))
           (reset! old-last-msg (:id last-msg)))
         (scroll-to-bottom! c))

       :reagent-render
       (fn [thread-id]
