Skip to content

Commit

Permalink
chore: fix detekt
Browse files Browse the repository at this point in the history
  • Loading branch information
typfel committed Aug 16, 2023
1 parent ea87389 commit d790ed6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class SystemMessageContentMapper @Inject constructor(
private val messageResourceProvider: MessageResourceProvider
) {

@Suppress("ComplexMethod")
fun mapMessage(
message: Message.System,
members: List<User>
Expand Down Expand Up @@ -253,8 +254,6 @@ class SystemMessageContentMapper @Inject constructor(
private fun mapConversationDegraded(protocol: Conversation.Protocol): UIMessageContent.SystemMessage =
UIMessageContent.SystemMessage.ConversationDegraded(protocol)



fun mapMemberName(user: User?, type: SelfNameType = SelfNameType.NameOrDeleted): UIText = when (user) {
is OtherUser -> user.name?.let { UIText.DynamicString(it) } ?: UIText.StringResource(messageResourceProvider.memberNameDeleted)
is SelfUser -> when (type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,12 +396,12 @@ sealed class UIMessageContent {
}
)

object HistoryLost: SystemMessage(
object HistoryLost : SystemMessage(
R.drawable.ic_info,
R.string.label_system_message_conversation_history_lost,
true)

object HistoryLostProtocolChanged: SystemMessage(
object HistoryLostProtocolChanged : SystemMessage(
R.drawable.ic_info,
R.string.label_system_message_conversation_history_lost_protocol_changed,
true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object TestClient {
val CLIENT_ID = ClientId("test")

val CLIENT = Client(
id = CLIENT_ID,
id = CLIENT_ID,
type = ClientType.Permanent,
registrationTime = Instant.DISTANT_FUTURE,
lastActive = Instant.DISTANT_PAST,
Expand Down

0 comments on commit d790ed6

Please sign in to comment.