get updating posts working
This commit is contained in:
parent
972707e5fd
commit
6b8ba76018
6 changed files with 148 additions and 53 deletions
|
|
@ -52,7 +52,12 @@ func (m EntryListPageModel) Update(msg tea.Msg, active bool, ctx *context) (Entr
|
|||
id := m.entries[m.cursor].ID
|
||||
rev := m.entries[m.cursor].Rev
|
||||
switch m.actionToTake {
|
||||
// TODO: handle edit
|
||||
case Edit:
|
||||
editCmd := EditPostCMD(ctx.config, id, rev)
|
||||
navCmd := func() tea.Msg {
|
||||
return SwitchPages{Page: ActionList}
|
||||
}
|
||||
return m, tea.Sequence(editCmd, navCmd)
|
||||
case Read:
|
||||
loadCmd := LoadGemlogCMD(ctx.config, id)
|
||||
navCmd := func() tea.Msg {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue