fix(messages_list): check if a channel is selected before selection
This commit is contained in:
parent
252a42780f
commit
f52b18cd76
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue