Load selected item from stash into the pager

This commit is contained in:
Christian Rocha 2020-05-15 13:42:33 -04:00 committed by Christian Muehlhaeuser
parent 8ba5c1fa0d
commit c622816a43

View file

@ -148,8 +148,9 @@ func stashUpdate(msg boba.Msg, m stashModel) (stashModel, boba.Cmd) {
case "enter":
m.state = stashStateLoadingItem
indexToLoad := m.paginator.Page*m.paginator.PerPage + m.index
return m, boba.Batch(
loadStashedItem(m.cc, m.documents[m.index].ID),
loadStashedItem(m.cc, m.documents[indexToLoad].ID),
spinner.Tick(m.spinner),
)