Skip to content

Commit

Permalink
style(ktlint): Fix formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Scherzinger <[email protected]>
  • Loading branch information
AndyScherzinger authored and mahibi committed Dec 13, 2024
1 parent 73bf99a commit 09c4972
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,8 @@ class OfflineFirstChatRepository @Inject constructor(
result.second,
blockContainingQueriedMessage,
lookIntoFuture,
hasHistory)
hasHistory
)
} else {
Log.d(TAG, "no data is updated...")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1374,13 +1374,15 @@ class ConversationInfoActivity :
items.add(BasicListItemWithImage(R.drawable.baseline_block_24, context.getString(R.string.ban_participant)))
}

when (participant.type) {
when (participant.type) {
Participant.ParticipantType.MODERATOR, Participant.ParticipantType.GUEST_MODERATOR -> {
items.removeAt(1)
}

Participant.ParticipantType.USER, Participant.ParticipantType.GUEST -> {
items.removeAt(2)
}

else -> {
// Self joined users can not be promoted nor demoted
items.removeAt(2)
Expand Down Expand Up @@ -1457,14 +1459,9 @@ class ConversationInfoActivity :
participant: Participant,
apiVersion: Int,
itemText: String,
@DrawableRes itemIcon: Int = R.drawable.ic_delete_grey600_24dp,
@DrawableRes itemIcon: Int = R.drawable.ic_delete_grey600_24dp
) {
val items = mutableListOf(
BasicListItemWithImage(
itemIcon,
itemText
)
)
val items = mutableListOf(BasicListItemWithImage(itemIcon, itemText))
MaterialDialog(this, BottomSheet(WRAP_CONTENT)).show {
cornerRadius(res = R.dimen.corner_radius)

Expand All @@ -1481,14 +1478,12 @@ class ConversationInfoActivity :
val apiVersion = ApiUtils.getConversationApiVersion(conversationUser, intArrayOf(ApiUtils.API_V4, 1))
val binding = DialogBanParticipantBinding.inflate(layoutInflater)
val actorTypeConverter = EnumActorTypeConverter()
val dialog = MaterialAlertDialogBuilder(context)
.setView(binding.root)
.create()
val dialog = MaterialAlertDialogBuilder(context).setView(binding.root).create()
binding.avatarImage.loadUserAvatar(
conversationUser,
participant.actorId!!,
true,
false
requestBigSize = true,
ignoreCache = false
)
binding.displayNameText.text = participant.actorId
binding.buttonBan.setOnClickListener {
Expand Down

0 comments on commit 09c4972

Please sign in to comment.