Keep displaying local markdowns after stashing & deleting them

This commit is contained in:
Nicolas Martin 2020-11-04 18:13:59 +01:00 committed by Christian Rocha
parent 8d03dd5731
commit 5e27376af4

View file

@ -636,10 +636,11 @@ func stashUpdate(msg tea.Msg, m stashModel) (stashModel, tea.Cmd) {
// back to a local file.
md.markdownType = localMarkdown
md.Note = m.markdowns[i].displayPath
} else {
// Delete optimistically and remove the stashed item
// before we've received a success response.
m.markdowns = append(m.markdowns[:i], m.markdowns[i+1:]...)
}
// Delete optimistically and remove the stashed item
// before we've received a success response.
m.markdowns = append(m.markdowns[:i], m.markdowns[i+1:]...)
}
// Set state and delete