summaryrefslogtreecommitdiffstats
path: root/TreeView.hs
diff options
context:
space:
mode:
Diffstat (limited to 'TreeView.hs')
-rw-r--r--TreeView.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/TreeView.hs b/TreeView.hs
index 26b04bd..218d167 100644
--- a/TreeView.hs
+++ b/TreeView.hs
@@ -6,6 +6,7 @@
module TreeView
( TreeView (..)
, getMessage
+ , getSearchTerm
, isTVMessage
, isTVSearchResult
, fromSearchResults
@@ -93,6 +94,12 @@ getMessage = \case
_ -> Nothing
+getSearchTerm :: TreeView -> Maybe String
+getSearchTerm = \case
+ TVSearch term -> Just term
+ _ -> Nothing
+
+
isTVMessage :: TreeView -> Bool
isTVMessage = \case
TVMessage _ -> True