summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorChristian Rocha <christian@rocha.is>2020-07-14 17:32:50 -0400
committerChristian Muehlhaeuser <muesli@gmail.com>2020-10-05 13:49:31 +0200
commitac872bf41f21335b8723ced5473c5c36c3027ed0 (patch)
tree85326cfbbbaa82b0bab0c0bda8107f1c5816a14b /ui
parent68d2d344b2b2a7c507b8b60602199947822a6f66 (diff)
Let's now refer to userMarkdown as stashedMarkdown
Diffstat (limited to 'ui')
-rw-r--r--ui/pager.go2
-rw-r--r--ui/stash.go12
2 files changed, 7 insertions, 7 deletions
diff --git a/ui/pager.go b/ui/pager.go
index 8265fc2..5df3243 100644
--- a/ui/pager.go
+++ b/ui/pager.go
@@ -184,7 +184,7 @@ func pagerUpdate(msg tea.Msg, m pagerModel) (pagerModel, tea.Cmd) {
}
case "m":
// Users can only set the note on user-stashed markdown
- if m.currentDocument.markdownType != userMarkdown {
+ if m.currentDocument.markdownType != stashedMarkdown {
break
}
diff --git a/ui/stash.go b/ui/stash.go
index 52e9d34..ee7d642 100644
--- a/ui/stash.go
+++ b/ui/stash.go
@@ -50,7 +50,7 @@ type localFileSearchFinished struct{}
type markdownType int
const (
- userMarkdown markdownType = iota
+ stashedMarkdown markdownType = iota
newsMarkdown
localFile
)
@@ -240,7 +240,7 @@ func stashUpdate(msg tea.Msg, m stashModel) (stashModel, tea.Cmd) {
// If the server comes back with nothing then we've got everything
m.fullyLoaded = true
} else {
- docs := wrapMarkdowns(userMarkdown, msg)
+ docs := wrapMarkdowns(stashedMarkdown, msg)
m.addMarkdowns(docs...)
}
@@ -333,7 +333,7 @@ func stashUpdate(msg tea.Msg, m stashModel) (stashModel, tea.Cmd) {
// Set note
case "m":
md := m.selectedMarkdown()
- isUserMarkdown := md.markdownType == userMarkdown
+ isUserMarkdown := md.markdownType == stashedMarkdown
isSettingNote := m.state == stashStateSettingNote
isPromptingDelete := m.state == stashStatePromptDelete
@@ -346,7 +346,7 @@ func stashUpdate(msg tea.Msg, m stashModel) (stashModel, tea.Cmd) {
// Prompt for deletion
case "x":
- isUserMarkdown := m.selectedMarkdown().markdownType == userMarkdown
+ isUserMarkdown := m.selectedMarkdown().markdownType == stashedMarkdown
isValidState := m.state != stashStateSettingNote
if isUserMarkdown && isValidState {
@@ -544,7 +544,7 @@ func stashHelpView(m stashModel) string {
var (
h []string
md = m.selectedMarkdown()
- isStashed = md != nil && md.markdownType == userMarkdown
+ isStashed = md != nil && md.markdownType == stashedMarkdown
)
if m.state == stashStateSettingNote {
@@ -621,7 +621,7 @@ func loadRemoteMarkdown(cc *charm.Client, id int, t markdownType) tea.Cmd {
err error
)
- if t == userMarkdown {
+ if t == stashedMarkdown {
md, err = cc.GetStashMarkdown(id)
} else {
md, err = cc.GetNewsMarkdown(id)