                            {:messages-focused? true
                             :input-focused?    false}]))}
     (let [no-messages (empty? messages)
-          m-limit     @messages-limit
-          threshold   (if (= m-limit initial-limit)
-                        initial-threshold
-                        default-threshold)
           flat-list-conf
-          {:data                      (take m-limit messages)
+          {:data                      messages
            :ref                       #(reset! messages-list-ref %)
            :footer                    [chat-intro-header-container chat no-messages]
            :key-fn                    #(or (:message-id %) (:value %))

                                          :row                message
                                          :idx                idx
                                          :list-ref           messages-list-ref}])
           :inverted                  true
           :onEndReachedThreshold     threshold
           :onEndReached              (fn []
                                        (swap! messages-limit increment-limit)
                                        (when (> @messages-limit (count messages))
                                          (re-frame/dispatch
                                           [:chat.ui/load-more-messages])))
           :keyboardShouldPersistTaps :handled}
          group-header {:header [group-chat-footer chat-id]}]
      (if pending-invite-inviter-name


(defonce messages-list-ref (atom nil))

(defview messages-view
  [{:keys [group-chat chat-id pending-invite-inviter-name contact] :as chat}
   modal?]
  (letsubs [messages           [:chats/current-chat-messages-stream]
            photo-path         [:chats/photo-path chat-id]
            current-public-key [:account/public-key]]
    {:component-did-mount
     (fn [args]
       (when-not (:messages-initialized? (second (.-argv (.-props args))))
         (re-frame/dispatch [:chat.ui/load-more-messages]))
