From 0df0ef6ef2de35393b6801d6f5a6681e422dff31 Mon Sep 17 00:00:00 2001 From: pablodip Date: Mon, 5 Feb 2018 16:26:48 +0100 Subject: [PATCH] change :update-at by :update and sort direction fixing --- src/cljs/commiteth/ui_model.cljs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cljs/commiteth/ui_model.cljs b/src/cljs/commiteth/ui_model.cljs index 46824a1..fd7d41c 100644 --- a/src/cljs/commiteth/ui_model.cljs +++ b/src/cljs/commiteth/ui_model.cljs @@ -9,8 +9,8 @@ (def bounty-sorting-types-def {::bounty-sorting-type|most-recent {::bounty-sorting-type.name "Most recent" ::bounty-sorting-type.sort-key-fn (fn [bounty] - (:updated-at bounty)) - ::bounty-sorting-type.sort-comparator-fn compare} + (:updated bounty)) + ::bounty-sorting-type.sort-comparator-fn (comp - compare)} ::bounty-sorting-type|lowest-value {::bounty-sorting-type.name "Lowest value" ::bounty-sorting-type.sort-key-fn (fn [bounty] (js/parseFloat (:value-usd bounty))) @@ -59,7 +59,7 @@ (t/interval filter-from (t/now))))) (def bounty-filter-type-date-predicate (fn [filter-value-interval bounty] - (when-let [date-inst (:updated-at bounty)] + (when-let [date-inst (:updated bounty)] (let [date (-> date-inst inst-ms t-coerce/from-long)] (t/within? filter-value-interval date)))))