Simplify reply null check
This commit is contained in:
parent
f8358e71d3
commit
d4e9d82ee2
1 changed files with 2 additions and 3 deletions
|
|
@ -306,9 +306,8 @@ class IRCMessage {
|
|||
if (!showMessage) {
|
||||
span.add(const TextSpan(text: ' <message deleted>'));
|
||||
} else {
|
||||
// Check if the message is a reply. If it is, remove the reply username from the message.
|
||||
final replyUser = tags['reply-parent-display-name'];
|
||||
final words = replyUser == null ? split : split?.sublist(1);
|
||||
// Check if the message is a reply. If it is, remove the reply username (first word) from the message.
|
||||
final words = tags.containsKey('reply-parent-display-name') ? split?.sublist(1) : split;
|
||||
|
||||
// Add the message and any emotes to the span.
|
||||
if (words != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue