chinwag-android/app/src/main/java/com/keylesspalace/tusky/components
Konrad Pozniak 5764c903e1
add role badges (#4029)
This adds support for the new Mastodon 4.2 role badges. Admins can
define if a role should be visible in the interface and then we get it
delivered by the Api on the `Account` object like this:
```
"roles": [
        {
              "id": "4",
              "name": "TEST",
              "color": "#ffee00"
        }
  ]
```

- keeps compatibility with older Mastodon version and non Mastodon
servers
- Took me a while, but I figured out a way to use the color and have it
look ok on all backgrounds (Mastodon itself ignores the color and just
always uses its brand color)
- falls back to Tusky blue in case no color is configured
- I adjusted the "Follows you" and "Bot" badges so they match the new
badge style
- In case the "Follows you" and "Bot" badges are visible at the same
time, "Follows you" gets its own line and "Bot" goes into the same line
as the role badge.
- Will work even with a lot of role badges (right now users can only
have 1 role at once though)
- Will work even when the badges federate (right now they don't)

<img
src="https://github.com/tuskyapp/Tusky/assets/10157047/24cbe889-ae46-408e-bfa0-cf3fd3c24f74"
width="320" />
2023-09-25 09:47:27 +02:00
..
account add role badges (#4029) 2023-09-25 09:47:27 +02:00
accountlist Resets the paging3 changes of 3159 back to the (java) fragment code before. 2023-09-09 21:29:24 +02:00
announcements Fix lint warnings (#4019) 2023-09-13 09:20:53 +02:00
compose Fix lint warnings (#4019) 2023-09-13 09:20:53 +02:00
conversation update minSdk to 24, cleanup code (#4014) 2023-09-12 19:25:45 +02:00
domainblocks ui improvements 2023-07-05 20:11:12 +02:00
drafts update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
filters Prompt the user before deleting a filter 2023-08-17 22:26:46 +02:00
followedtags Simplify repeated code that shows errors (#3762) 2023-06-19 23:49:20 +02:00
instanceinfo Show additional bug report info in AboutActivity (#3802) 2023-08-03 12:20:35 +02:00
login Kotlin 1.9.0 (#3835) 2023-08-02 09:04:24 +02:00
notifications Avoid crash on notification worker (#4025) 2023-09-25 09:44:01 +02:00
preference use PrefKeys everywhere 2023-09-11 19:12:33 +02:00
report update minSdk to 24, cleanup code (#4014) 2023-09-12 19:25:45 +02:00
scheduled Cleanup unused resources (#4013) 2023-09-12 18:11:06 +02:00
search Cleanup unused resources (#4013) 2023-09-12 18:11:06 +02:00
timeline Add "Trending posts" (statuses) feed (#4007) 2023-09-14 22:37:41 +02:00
trending Rename "Trending" to "TrendingTags" or similar where necessary (#3906) 2023-08-19 12:54:35 +02:00
viewthread use PrefKeys everywhere 2023-09-11 19:12:33 +02:00