Mostly use String instead of Text
This commit is contained in:
@@ -2,6 +2,7 @@ module Dodge.SelectionList where
|
||||
|
||||
--import Color
|
||||
--import Dodge.WindowLayout
|
||||
import Color
|
||||
import Regex
|
||||
import Dodge.Data.Universe
|
||||
import LensHelp
|
||||
@@ -26,7 +27,14 @@ defaultSelectionList = SelectionList
|
||||
|
||||
getShownItems :: SelectionList a -> [SelectionItem a]
|
||||
getShownItems sl = case sl ^. slRegex of
|
||||
"" -> _slItems sl
|
||||
str -> SelectionFilter ["FILTER: "++str] : filter (doregex str) (_slItems sl)
|
||||
"" | not (sl ^. slRegexInput) -> _slItems sl
|
||||
str -> SelectionFilter
|
||||
{ _siPictures = ["FILTER: "++str]
|
||||
, _siHeight = 1
|
||||
, _siIsSelectable = False
|
||||
, _siWidth = length $ "FILTER: "++str
|
||||
, _siColor = white
|
||||
, _siOffX = 0
|
||||
}: filter (doregex str) (_slItems sl)
|
||||
where
|
||||
doregex str = regexList str . _siPictures
|
||||
|
||||
Reference in New Issue
Block a user