mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 04:52:00 +03:00
Room details: Check power level before showing topic hint
This commit is contained in:
parent
e1f7ab8669
commit
24e2f1a8e0
1 changed files with 2 additions and 1 deletions
|
@ -143,7 +143,8 @@ abstract class MergedRoomCreationItem : BasedMergedItem<MergedRoomCreationItem.H
|
|||
val topic = roomSummary?.topic
|
||||
if (topic.isNullOrBlank()) {
|
||||
// do not show hint for DMs or group DMs
|
||||
if (!isDirect) {
|
||||
val canSetTopic = attributes.canChangeTopic && !isDirect
|
||||
if (canSetTopic) {
|
||||
val addTopicLink = holder.view.resources.getString(R.string.add_a_topic_link_text)
|
||||
val styledText = SpannableString(holder.view.resources.getString(R.string.room_created_summary_no_topic_creation_text, addTopicLink))
|
||||
holder.roomTopicText.setTextOrHide(styledText.tappableMatchingText(addTopicLink, object : ClickableSpan() {
|
||||
|
|
Loading…
Reference in a new issue