From 0c7aab902ae5a0a51658f5eccb685c24c3b1d9c3 Mon Sep 17 00:00:00 2001 From: Andrey Shovkoplyas Date: Wed, 19 Apr 2017 15:43:24 +0300 Subject: [PATCH] fixes https://github.com/status-im/status-react/issues/984 --- src/status_im/chat/screen.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/status_im/chat/screen.cljs b/src/status_im/chat/screen.cljs index 8446f82bba..439438d56d 100644 --- a/src/status_im/chat/screen.cljs +++ b/src/status_im/chat/screen.cljs @@ -137,7 +137,9 @@ (sort-by :clock-value >) (map #(assoc % :datemark (time/day-relative (:timestamp %)))) (group-by :datemark) - (map (fn [[k v]] [v {:type :datemark :value k}])) + (vals) + (sort-by (comp :clock-value first) >) + (map (fn [v] [v {:type :datemark :value (:datemark (first v))}])) (flatten)) remove-last? (some (fn [{:keys [content-type]}] (= content-type content-type-status))