summaryrefslogtreecommitdiffstats
path: root/pkg/gui/modes
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-04-03 11:32:14 +1100
committerJesse Duffield <jessedduffield@gmail.com>2021-04-06 19:34:32 +1000
commitbc9a99387f68afb24863d17ab4d29c1686843a76 (patch)
treeaac694046f93d457177086d4c5afb5a0c12ea302 /pkg/gui/modes
parent5289d49f75e9735f129e1f8e2a2f9dc74373515b (diff)
refactor of contexts and filtering
Diffstat (limited to 'pkg/gui/modes')
-rw-r--r--pkg/gui/modes/filtering/filtering.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/pkg/gui/modes/filtering/filtering.go b/pkg/gui/modes/filtering/filtering.go
new file mode 100644
index 000000000..da6c97a90
--- /dev/null
+++ b/pkg/gui/modes/filtering/filtering.go
@@ -0,0 +1,25 @@
+package filtering
+
+type Filtering struct {
+ path string // the filename that gets passed to git log
+}
+
+func NewFiltering() Filtering {
+ return Filtering{path: ""}
+}
+
+func (m *Filtering) Active() bool {
+ return m.path != ""
+}
+
+func (m *Filtering) Reset() {
+ m.path = ""
+}
+
+func (m *Filtering) SetPath(path string) {
+ m.path = path
+}
+
+func (m *Filtering) GetPath() string {
+ return m.path
+}