Skip to content

Provide Spanned strings to ProfileDrawerItem #2850

@nikclayton

Description

@nikclayton

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:

Image

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:

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions