From 957de197b7754a761ff5bbfbd7d1b699d45f7b83 Mon Sep 17 00:00:00 2001 From: pablodip Date: Tue, 13 Feb 2018 16:26:17 +0100 Subject: [PATCH 1/3] currency-filter-or --- src/cljs/commiteth/ui_model.cljs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cljs/commiteth/ui_model.cljs b/src/cljs/commiteth/ui_model.cljs index fd7d41c..b5824bb 100644 --- a/src/cljs/commiteth/ui_model.cljs +++ b/src/cljs/commiteth/ui_model.cljs @@ -87,10 +87,11 @@ ::bounty-filter-type.category ::bounty-filter-type-category|multiple-dynamic-options ::bounty-filter-type.re-frame-subs-key-for-options :commiteth.subscriptions/open-bounties-currencies ::bounty-filter-type.predicate (fn [filter-value bounty] - (and (or (not-any? #{"ETH"} filter-value) - (< 0 (:balance-eth bounty))) - (set/subset? (->> filter-value (remove #{"ETH"}) set) - (-> bounty :tokens keys set))))} + (or (and (some #{"ETH"} filter-value) + (< 0 (:balance-eth bounty))) + (not-empty (set/intersection + (->> filter-value (remove #{"ETH"}) set) + (-> bounty :tokens keys set)))))} ::bounty-filter-type|date {::bounty-filter-type.name "Date" From 7587b21154b54846fc7debb993e7cb4f8809cb10 Mon Sep 17 00:00:00 2001 From: pablodip Date: Tue, 13 Feb 2018 16:27:56 +0100 Subject: [PATCH 2/3] fix cs --- src/cljs/commiteth/ui_model.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cljs/commiteth/ui_model.cljs b/src/cljs/commiteth/ui_model.cljs index b5824bb..d200bbe 100644 --- a/src/cljs/commiteth/ui_model.cljs +++ b/src/cljs/commiteth/ui_model.cljs @@ -88,7 +88,7 @@ ::bounty-filter-type.re-frame-subs-key-for-options :commiteth.subscriptions/open-bounties-currencies ::bounty-filter-type.predicate (fn [filter-value bounty] (or (and (some #{"ETH"} filter-value) - (< 0 (:balance-eth bounty))) + (< 0 (:balance-eth bounty))) (not-empty (set/intersection (->> filter-value (remove #{"ETH"}) set) (-> bounty :tokens keys set)))))} From 9297de5660f074de0eff8728c52ad980b5142dd9 Mon Sep 17 00:00:00 2001 From: pablodip Date: Wed, 14 Feb 2018 08:05:01 +0100 Subject: [PATCH 3/3] some details --- src/cljs/commiteth/ui_model.cljs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cljs/commiteth/ui_model.cljs b/src/cljs/commiteth/ui_model.cljs index d200bbe..909828c 100644 --- a/src/cljs/commiteth/ui_model.cljs +++ b/src/cljs/commiteth/ui_model.cljs @@ -87,11 +87,12 @@ ::bounty-filter-type.category ::bounty-filter-type-category|multiple-dynamic-options ::bounty-filter-type.re-frame-subs-key-for-options :commiteth.subscriptions/open-bounties-currencies ::bounty-filter-type.predicate (fn [filter-value bounty] - (or (and (some #{"ETH"} filter-value) + (or (and (contains? #{"ETH"} filter-value) (< 0 (:balance-eth bounty))) - (not-empty (set/intersection - (->> filter-value (remove #{"ETH"}) set) - (-> bounty :tokens keys set)))))} + (not-empty + (set/intersection + (->> filter-value (remove #{"ETH"}) set) + (-> bounty :tokens keys set)))))} ::bounty-filter-type|date {::bounty-filter-type.name "Date"