Lint mentions cannot be null.

This commit is contained in:
Vitor Pamplona 2023-04-07 14:22:48 -04:00
parent 0fc6757d4a
commit b8e4ccfc28

View File

@ -372,7 +372,7 @@ fun NoteComposeInner(
ReplyInformation(note.replyTo, sortedMentions, account, navController) ReplyInformation(note.replyTo, sortedMentions, account, navController)
} }
Spacer(modifier = Modifier.height(5.dp)) Spacer(modifier = Modifier.height(5.dp))
} else if (!makeItShort && noteEvent is ChannelMessageEvent && (note.replyTo != null || noteEvent.mentions() != null)) { } else if (!makeItShort && noteEvent is ChannelMessageEvent && (note.replyTo != null || noteEvent.mentions().isNotEmpty())) {
val sortedMentions = noteEvent.mentions() val sortedMentions = noteEvent.mentions()
.mapNotNull { LocalCache.checkGetOrCreateUser(it) } .mapNotNull { LocalCache.checkGetOrCreateUser(it) }
.toSet() .toSet()