mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Implement my suggestions
This commit is contained in:
parent
d03ab989e6
commit
8acee57118
2 changed files with 25 additions and 21 deletions
|
@ -97,7 +97,7 @@
|
|||
|
||||
<!-- parameter will be a comma separated list of values of notice_power_level_diff -->
|
||||
<string name="notice_power_level_changed_by_you">You changed the power level of %1$s.</string>
|
||||
<!-- parameter will be a comma separated list of values of notice_power_level_diff -->
|
||||
<!-- First parameter will be a userId or display name, second one will be a comma separated list of values of notice_power_level_diff -->
|
||||
<string name="notice_power_level_changed">%1$s changed the power level of %2$s.</string>
|
||||
<!-- First parameter will be a userId or display name, the two last ones will be value of power_level_* -->
|
||||
<string name="notice_power_level_diff">%1$s from %2$s to %3$s</string>
|
||||
|
|
|
@ -245,26 +245,30 @@ class RoomMemberProfileController @Inject constructor(
|
|||
}
|
||||
|
||||
if (canKick) {
|
||||
if (membership == Membership.JOIN) {
|
||||
buildProfileAction(
|
||||
id = "kick",
|
||||
editable = false,
|
||||
divider = canBan,
|
||||
destructive = true,
|
||||
title = stringProvider.getString(R.string.room_participants_action_kick),
|
||||
dividerColor = dividerColor,
|
||||
action = { callback?.onKickClicked() }
|
||||
)
|
||||
} else if (membership == Membership.INVITE) {
|
||||
buildProfileAction(
|
||||
id = "cancel_invite",
|
||||
title = stringProvider.getString(R.string.room_participants_action_cancel_invite),
|
||||
divider = canBan,
|
||||
dividerColor = dividerColor,
|
||||
destructive = true,
|
||||
editable = false,
|
||||
action = { callback?.onCancelInviteClicked() }
|
||||
)
|
||||
when (membership) {
|
||||
Membership.JOIN -> {
|
||||
buildProfileAction(
|
||||
id = "kick",
|
||||
editable = false,
|
||||
divider = canBan,
|
||||
destructive = true,
|
||||
title = stringProvider.getString(R.string.room_participants_action_kick),
|
||||
dividerColor = dividerColor,
|
||||
action = { callback?.onKickClicked() }
|
||||
)
|
||||
}
|
||||
Membership.INVITE -> {
|
||||
buildProfileAction(
|
||||
id = "cancel_invite",
|
||||
title = stringProvider.getString(R.string.room_participants_action_cancel_invite),
|
||||
divider = canBan,
|
||||
dividerColor = dividerColor,
|
||||
destructive = true,
|
||||
editable = false,
|
||||
action = { callback?.onCancelInviteClicked() }
|
||||
)
|
||||
}
|
||||
else -> Unit
|
||||
}
|
||||
}
|
||||
if (canBan) {
|
||||
|
|
Loading…
Reference in a new issue