wip: refactoring tui

This commit is contained in:
adamdottv 2025-05-28 14:02:03 -05:00
commit 8863a499a9
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
3 changed files with 18 additions and 23 deletions

View file

@ -104,6 +104,10 @@ func (m *messagesCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case renderFinishedMsg:
m.rendering = false
m.viewport.GotoBottom()
case state.StateUpdatedMsg:
m.renderView()
m.viewport.GotoBottom()
case pubsub.Event[message.Message]:
needsRerender := false
if msg.Type == message.EventMessageCreated {