From 1a0821766baeb793d36dff0099810aeb0e202c00 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 28 Mar 2017 15:45:03 +0200 Subject: Low items don't count against shopping list --- Handler/List.hs | 3 ++- bar.cabal | 2 +- bar.nix | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Handler/List.hs b/Handler/List.hs index 7ab4ebe..8f9e777 100644 --- a/Handler/List.hs +++ b/Handler/List.hs @@ -28,7 +28,8 @@ list = runDB $ do let references' = Set.filter (isNothing . flip find items . matches) references matches (Reference{..} `WithType` _) Item{..} - | today `isBefore` itemExpires = itemNormKind == referenceNormKind + | today `isBefore` itemExpires + , not $ itemRunningLow = itemNormKind == referenceNormKind | otherwise = False isBefore _ DateNever = True diff --git a/bar.cabal b/bar.cabal index 1cb254f..ffeb4be 100644 --- a/bar.cabal +++ b/bar.cabal @@ -1,5 +1,5 @@ name: bar -version: 0.4.0 +version: 0.4.1 cabal-version: >= 1.8 build-type: Simple diff --git a/bar.nix b/bar.nix index 9cd039c..53bbb10 100644 --- a/bar.nix +++ b/bar.nix @@ -10,7 +10,7 @@ }: mkDerivation { pname = "bar"; - version = "0.4.0"; + version = "0.4.1"; src = ./.; isLibrary = true; isExecutable = true; -- cgit v1.2.3