Description improvements (#1846)

* Increase character limit for media descriptions to 1500

It was increased in Mastodon 3.0.0 which was released in October 2019.

* Improve image description view

Since media descriptions can be longer now, we need to adjust the UI.
It is a common problem that description takes up the whole screen, it's
hard for readers and also discourages people from adding descriptions.

This commit uses bottom sheet to hide most of the description. Since we
know how much screen space it will cover, we can use darker background
which makes reading text easier.

* Adjust description handle

* Fix unable to dismiss image caption
This commit is contained in:
Ivan Kupalov 2020-08-01 21:48:51 +02:00 committed by GitHub
commit ed2918da2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 140 additions and 81 deletions

View file

@ -753,7 +753,7 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
itemView.setAccessibilityDelegate(null);
} else {
if (payloads instanceof List)
for (Object item : (List) payloads) {
for (Object item : (List<?>) payloads) {
if (Key.KEY_CREATED.equals(item)) {
setCreatedAt(status.getCreatedAt(), statusDisplayOptions);
}