jerboa icon indicating copy to clipboard operation
jerboa copied to clipboard

Quotation mark is not rendered in communities' names

Open Snow4DV opened this issue 2 years ago • 2 comments

Jerboa Version 0.0.33/0.0.34 Describe the bug Quotation mark is not rendered in communities' names but does render on communities' page To Reproduce Steps to reproduce the behavior:

  1. Open app
  2. Go to the page of community with quotation mark in its name
  3. Open any post Screenshot_2023-06-20-19-09-45-47_a10f969cf1c4adf2c503042b459b8476 Screenshot_2023-06-20-19-07-56-67_a10f969cf1c4adf2c503042b459b8476

Snow4DV avatar Jun 20 '23 16:06 Snow4DV

Ok that's not really a bug (or is it?)

The issue is due to the fact that last word of community's name won't fit if url of instance is too long

Maybe zero-length space should be added here in Utils.kt so it could cut name of instance without hiding last word:

fun communityNameShown(community: CommunitySafe): String {
    return if (community.local) {
        community.title
    } else {
        "${community.title}​\u200B@${hostName(community.actor_id)}"
    }
}

Snow4DV avatar Jun 20 '23 17:06 Snow4DV

    Text(
        text = communityNameShown(community),
        style = style,
        color = color,
        modifier = modifier,
        overflow = TextOverflow.Clip,
        maxLines = 1,
    )

It gets clipped

image Here shown working image

MV-GH avatar Jun 20 '23 17:06 MV-GH