Skip to content

feat: tokengated & community rooms icons#1

Open
ifaouibadi wants to merge 2 commits intodevelopfrom
features/tg-rooms
Open

feat: tokengated & community rooms icons#1
ifaouibadi wants to merge 2 commits intodevelopfrom
features/tg-rooms

Conversation

@ifaouibadi
Copy link
Copy Markdown
Member

No description provided.

it.replaceFirst("[TG] ", "") // Remove [TG] from the beginning
}
it.contains("$") -> {
it.replace("$", "") // Remove $ from the string
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess all these replacements should only change the first occurance as the name may contain multiple '$$$'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that block change is redundant anyway, there is another "replacement" again on the resulting string below

}
?: VectorMatrixItemDisplayNameFallbackProvider.getDefaultName(this).replace("[TG] ","").replace("$","")

modifiedDisplayName.replace("[TG] ", "").replace("$","")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[TG] name$ would lead to name instead of name$


holder.roomNameText.setTextOrHide(roomDisplayName)
if (roomSummary?.displayName!!.contains("[TG]")) {
holder.roomNameText.setTextOrHide(roomDisplayName!!.replace("[TG] ",""))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

roomDisplayName is already sanitized on line 176

@michele-franchi
Copy link
Copy Markdown

@ifaouibadi what's the status of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants