Commit Graph

8 Commits

Author SHA1 Message Date
David Teresi 6ceb5cda8b Allow newlines in image descriptions 2020-10-05 13:15:15 +03:00
Ivan Kupalov 44ed189b3c 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
2020-08-04 00:17:02 +03:00
Alibek Omarov c332a6893a ViewImageFragment: finalize transition to BigImageViewer. Now it should correctly handle EXIF rotation, do not stuck at transition and pick preview image if it's in cache but full image isn't 2020-07-26 03:38:24 +03:00
Alibek Omarov 9c29cf1640 ViewImageFragment: replace TouchImageView by BigImageView based on SSIV and with proper GIF support 2020-06-30 19:22:52 +03:00
Ivan Kupalov 762be59036 Improve image viewer (#1843)
This commit does 3 things:
1. Replaces PhotoView (which is abandonware) with modern TouchImageView
2. Fixes an issue with panning images. Gesture was not intercepted
properly and pager was taking control instead of image being moved.
3. Adds feedback to dismissing of images with vertical gesture.
2020-06-25 16:42:56 +03:00
Ivan Kupalov 5945700c1b
Allow higher zooming levels for caption dialog images (#1672) 2020-02-10 14:00:21 +01:00
Ivan Kupalov e1aa3cc995 Enable zooming and panning in the CaptionDialog (#1643) 2020-01-18 12:12:37 +01:00
Ivan Kupalov 8770fbe986 ComposeActivity refactor (#1541)
* Convert ComposeActivity to Kotlin

* More ComposeActivity cleanups

* Move ComposeActivity to it's own package

* Remove ComposeActivity.IntentBuilder

* Re-do part of the media downsizing/uploading

* Add sending of status to ViewModel, draft media descriptions

* Allow uploading video, update description after uploading

* Enable camera, enable upload cancelling

* Cleanup of ComposeActivity

* Extract CaptionDialog, extract ComposeActivity methods

* Fix handling of redrafted media

* Add initial state and media uploading out of Activity

* Change ComposeOptions.mentionedUsernames to be Set rather than List

We probably don't want repeated usernames when we are writing a post
and Set provides such guarantee for free plus it tells it to the
callers. The only disadvantage is lack of order but it shouldn't be a
problem.

* Add combineOptionalLiveData. Add docs.

It it useful for nullable LiveData's. I think we cannot differentiate
between value not being set and value being null so I just added the
variant without null check.

* Add poll support to Compose.

* cleanup code

* move more classes into compose package

* cleanup code

* fix button behavior

* add error handling for media upload

* add caching for instance data again

* merge develop

* fix scheduled toots

* delete unused string

* cleanup ComposeActivity

* fix restoring media from drafts

* make media upload code a little bit clearer

* cleanup autocomplete search code

* avoid duplicate object creation in SavedTootActivity

* perf: avoid unnecessary work when initializing ComposeActivity

* add license header to new files

* use small toot button on bigger displays

* fix ComposeActivityTest

* fix bad merge

* use Singles.zip instead of Single.zip
2019-12-19 19:09:40 +01:00