style(ktlint): Fix formatting

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2024-12-13 11:38:48 +01:00
parent 383bf2a728
commit 44badccad2
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B
2 changed files with 10 additions and 14 deletions

View File

@ -510,7 +510,8 @@ class OfflineFirstChatRepository @Inject constructor(
result.second, result.second,
blockContainingQueriedMessage, blockContainingQueriedMessage,
lookIntoFuture, lookIntoFuture,
hasHistory) hasHistory
)
} else { } else {
Log.d(TAG, "no data is updated...") Log.d(TAG, "no data is updated...")
} }

View File

@ -1374,13 +1374,15 @@ class ConversationInfoActivity :
items.add(BasicListItemWithImage(R.drawable.baseline_block_24, context.getString(R.string.ban_participant))) 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 -> { Participant.ParticipantType.MODERATOR, Participant.ParticipantType.GUEST_MODERATOR -> {
items.removeAt(1) items.removeAt(1)
} }
Participant.ParticipantType.USER, Participant.ParticipantType.GUEST -> { Participant.ParticipantType.USER, Participant.ParticipantType.GUEST -> {
items.removeAt(2) items.removeAt(2)
} }
else -> { else -> {
// Self joined users can not be promoted nor demoted // Self joined users can not be promoted nor demoted
items.removeAt(2) items.removeAt(2)
@ -1457,14 +1459,9 @@ class ConversationInfoActivity :
participant: Participant, participant: Participant,
apiVersion: Int, apiVersion: Int,
itemText: String, itemText: String,
@DrawableRes itemIcon: Int = R.drawable.ic_delete_grey600_24dp, @DrawableRes itemIcon: Int = R.drawable.ic_delete_grey600_24dp
) { ) {
val items = mutableListOf( val items = mutableListOf(BasicListItemWithImage(itemIcon, itemText))
BasicListItemWithImage(
itemIcon,
itemText
)
)
MaterialDialog(this, BottomSheet(WRAP_CONTENT)).show { MaterialDialog(this, BottomSheet(WRAP_CONTENT)).show {
cornerRadius(res = R.dimen.corner_radius) cornerRadius(res = R.dimen.corner_radius)
@ -1481,14 +1478,12 @@ class ConversationInfoActivity :
val apiVersion = ApiUtils.getConversationApiVersion(conversationUser, intArrayOf(ApiUtils.API_V4, 1)) val apiVersion = ApiUtils.getConversationApiVersion(conversationUser, intArrayOf(ApiUtils.API_V4, 1))
val binding = DialogBanParticipantBinding.inflate(layoutInflater) val binding = DialogBanParticipantBinding.inflate(layoutInflater)
val actorTypeConverter = EnumActorTypeConverter() val actorTypeConverter = EnumActorTypeConverter()
val dialog = MaterialAlertDialogBuilder(context) val dialog = MaterialAlertDialogBuilder(context).setView(binding.root).create()
.setView(binding.root)
.create()
binding.avatarImage.loadUserAvatar( binding.avatarImage.loadUserAvatar(
conversationUser, conversationUser,
participant.actorId!!, participant.actorId!!,
true, requestBigSize = true,
false ignoreCache = false
) )
binding.displayNameText.text = participant.actorId binding.displayNameText.text = participant.actorId
binding.buttonBan.setOnClickListener { binding.buttonBan.setOnClickListener {