Skip to content

Commit

Permalink
Code style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
borichellow committed Dec 17, 2024
1 parent 6ceb9b2 commit 6c29136
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,10 @@ class ConversationMessagesViewModel @Inject constructor(
}
.distinctUntilChanged()
.map { messageId ->
val senderNameResult = messageId?.let { getSenderNameByMessageId(conversationId, it) }
val senderName = if (senderNameResult is GetSenderNameByMessageIdUseCase.Result.Success) senderNameResult.name
else null
val senderName = messageId?.let {
val result = getSenderNameByMessageId(conversationId, it)
if (result is GetSenderNameByMessageIdUseCase.Result.Success) result.name else null
}

messageId to senderName
}
Expand Down

0 comments on commit 6c29136

Please sign in to comment.