get updating posts working

This commit is contained in:
Travis Shears 2025-10-05 14:22:11 +02:00
parent 972707e5fd
commit 6b8ba76018
6 changed files with 148 additions and 53 deletions

View file

@ -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 {