fix(messages_list): check if a channel is selected before selection

This commit is contained in:
ayn2op 2025-12-18 14:03:40 -05:00
parent 252a42780f
commit f52b18cd76

View file

@ -296,6 +296,10 @@ func (ml *messagesList) onInputCapture(event *tcell.EventKey) *tcell.EventKey {
}
func (ml *messagesList) _select(name string) {
if app.chatView.selectedChannel == nil {
return
}
ms, err := discordState.Cabinet.Messages(app.chatView.selectedChannel.ID)
if err != nil {
slog.Error("failed to get messages", "err", err, "channel_id", app.chatView.selectedChannel.ID)