mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Room details: Check power level before showing topic hint
This commit is contained in:
parent
e1f7ab8669
commit
24e2f1a8e0
@ -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 New Issue
Block a user