refactor(messageslist): drop redundant empty check in selectedMessage
This commit is contained in:
parent
a205c17854
commit
54e7aabb68
1 changed files with 0 additions and 4 deletions
|
|
@ -821,10 +821,6 @@ func (ml *Model) drawPinnedMessage(builder *richtext.Builder, message discord.Me
|
|||
}
|
||||
|
||||
func (ml *Model) selectedMessage() (*discord.Message, bool) {
|
||||
if len(ml.items) == 0 {
|
||||
return nil, false
|
||||
}
|
||||
|
||||
cursor := ml.cursor()
|
||||
if cursor < 0 || cursor >= len(ml.items) || ml.items[cursor].separator {
|
||||
return nil, false
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue