fix: also append the day's date if we append a message with a different date than the last channel date

This commit is contained in:
2025-08-29 15:59:46 +02:00
parent f88c2af404
commit 096743adca
6 changed files with 78 additions and 92 deletions
+1 -1
View File
@@ -94,7 +94,7 @@ func (s State) Update(msg tea.Msg) (State, tea.Cmd) {
WithTimestamp: true,
}
s.Client.ActiveChannel.Value.AppendMsg(msg.Timestamp, fullMsg, msgOpts)
s.Client.ActiveChannel.Value.AppendMsg(msg.Datetime, fullMsg, msgOpts)
// TODO: make sure to only append the message to the history if server sends back no errors
s.Client.SendCommand(commands.PRIVMSG, s.Client.ActiveChannel.Value.Name, msg.Msg)
s.Viewport.SetContent(s.Client.ActiveChannel.Value.History)