Private
Public Access
1
0

Rename shared.State to shared.Shared

This commit is contained in:
2024-06-08 22:01:16 +00:00
parent c9e92e186e
commit c1ead83939
7 changed files with 36 additions and 36 deletions

View File

@@ -42,11 +42,11 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
// wake up spinners and cursors
cmds = append(cmds, cursor.Blink, m.spinner.Tick)
if m.State.Values.ConvShortname != "" {
if m.Shared.Values.ConvShortname != "" {
// (re)load conversation contents
cmds = append(cmds, m.loadConversation(m.State.Values.ConvShortname))
cmds = append(cmds, m.loadConversation(m.Shared.Values.ConvShortname))
if m.conversation.ShortName.String != m.State.Values.ConvShortname {
if m.conversation.ShortName.String != m.Shared.Values.ConvShortname {
// clear existing messages if we're loading a new conversation
m.messages = []models.Message{}
m.selectedMessage = 0
@@ -151,7 +151,7 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
m.updateContent()
case msgResponseError:
m.state = idle
m.State.Err = error(msg)
m.Shared.Err = error(msg)
m.updateContent()
case msgConversationTitleGenerated:
title := string(msg)