tui: fix conversation loading

This commit is contained in:
Matt Low 2024-03-13 05:15:41 +00:00
parent ea78edf039
commit 2cb1a0005d

View File

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