fix: do not scroll to end if any message is selected (#90)
This commit is contained in:
parent
db764b3cef
commit
0dbc7d3fd5
1 changed files with 4 additions and 2 deletions
|
|
@ -103,8 +103,10 @@ func onSessionMessageCreate(_ *discordgo.Session, m *discordgo.MessageCreate) {
|
|||
} else {
|
||||
selectedChannel.Messages = append(selectedChannel.Messages, m.Message)
|
||||
messagesView.Write(buildMessage(m.Message))
|
||||
// Scroll to the end of the text after the message has been written to the TextView.
|
||||
messagesView.ScrollToEnd()
|
||||
// Scroll to the end of the text if any message is selected.
|
||||
if len(messagesView.GetHighlights()) != 0 {
|
||||
messagesView.ScrollToEnd()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue