If I've read the code properly (v9.0.2) ProfileDrawerItem expects plain strings for the account's name and description. Please consider supporting Spanned strings too.
Use case
Mastodon allows accounts to have "custom emoji", described by "short codes", which are : delimited strings. When encountered these strings are replaced by emoji images loaded from the server.
For example, at the time of writing the name for the account https://mastodon.ie/@pachli is Pachli test account :goose:, which renders like this through most of the UI:
because the :goose: in the name is converted to a span that can load the relevant image.
But in the drawer this looks like this:
I think because the drawer treats the text as a lowest common denominator CharSequence or String so the spans that represent the emoji are ignored.
If I've read the code properly (v9.0.2)
ProfileDrawerItemexpects plain strings for the account's name and description. Please consider supportingSpannedstrings too.Use case
Mastodon allows accounts to have "custom emoji", described by "short codes", which are
:delimited strings. When encountered these strings are replaced by emoji images loaded from the server.For example, at the time of writing the name for the account https://mastodon.ie/@pachli is
Pachli test account :goose:, which renders like this through most of the UI:because the
:goose:in the name is converted to a span that can load the relevant image.But in the drawer this looks like this:
I think because the drawer treats the text as a lowest common denominator
CharSequenceorStringso the spans that represent the emoji are ignored.