tui: fix conversation loading

This commit is contained in:
Matt Low 2024-03-13 05:15:41 +00:00
parent a06ac694c6
commit 8bc2523c17

View File

@ -124,8 +124,8 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.input.SetWidth(msg.Width - 1)
m.updateContent()
case msgConversationLoaded:
c := (*models.Conversation)(msg)
cmd = m.loadMessages(c)
m.conversation = (*models.Conversation)(msg)
cmd = m.loadMessages(m.conversation)
case msgMessagesLoaded:
m.messages = []models.Message(msg)
m.updateContent()