"Jump to read receipt" available only for joined members

This commit is contained in:
Benoit Marty 2020-10-05 18:53:32 +02:00 committed by Benoit Marty
parent 7952e205b9
commit 6325ee9310

View File

@ -172,13 +172,16 @@ class RoomMemberProfileController @Inject constructor(
val membership = state.asyncMembership() ?: return val membership = state.asyncMembership() ?: return
buildProfileSection(stringProvider.getString(R.string.room_profile_section_more)) buildProfileSection(stringProvider.getString(R.string.room_profile_section_more))
buildProfileAction(
id = "read_receipt", if (membership == Membership.JOIN) {
editable = false, buildProfileAction(
title = stringProvider.getString(R.string.room_member_jump_to_read_receipt), id = "read_receipt",
dividerColor = dividerColor, editable = false,
action = { callback?.onJumpToReadReceiptClicked() } title = stringProvider.getString(R.string.room_member_jump_to_read_receipt),
) dividerColor = dividerColor,
action = { callback?.onJumpToReadReceiptClicked() }
)
}
val ignoreActionTitle = state.buildIgnoreActionTitle() val ignoreActionTitle = state.buildIgnoreActionTitle()