Commit Graph

43 Commits

Author SHA1 Message Date
kyori19 1228f645a6 Merge remote-tracking branch 'tuskyapp/develop' 2022-04-13 00:59:06 +09:00
Konrad Pozniak d9931e3d2c
Rename Toots to Posts (#2396)
* rename toots -> posts in strings

* extract tusky_compose_post_quicksetting_label string

* rename toot -> status in code
2022-03-20 20:21:42 +01:00
kyori19 ba005c769b Merge remote-tracking branch 'tuskyapp/develop' 2022-03-04 17:51:25 +09:00
Levi Bard 7114575497
Instance configuration: the easy parts (#2341)
* Add data model for instance configuration

* Support instance.configuration.statuses.max_characters

* Support instance.configuration.statuses.characters_reserved_per_url

* Support instance.configuration.polls.max_options and max_characters_per_option

* Pacify ktlint

* Support instance-configured poll durations

* Fixup versions for migration after rebase
2022-03-01 19:43:36 +01:00
Konrad Pozniak eea81d7106
use POST api/v2/media to upload media (#2327) 2022-02-25 18:57:18 +01:00
Mélanie Chauvel c8ed6b482e
increase default poll max option chars from 25 to 50 (#2343)
25 is old Mastodon default, the new one is 50
2022-02-18 20:08:38 +01:00
kyori19 2005b32dfa Merge remote-tracking branch 'tuskyapp/develop' 2021-07-03 23:59:57 +09:00
Konrad Pozniak 2cc53d6772 fix codestyle 2021-06-28 22:04:34 +02:00
Konrad Pozniak f6dd131b95
migrate drafts to paging 3 (#2206)
* migrate drafts to paging 3

* migrate DraftHelper to coroutines
2021-06-24 21:23:29 +02:00
Konrad Pozniak 751109ac39
upgrade kotlin to 1.5.0 (#2162)
* upgrade kotlin to 1.5.0

* don't explicitly set kotlin jvmtarget
2021-05-21 17:51:35 +02:00
Konrad Pozniak 40b24cd242
migrate to RxJava3 (#2146)
* migrate to RxJava3

* remove unused import
2021-05-16 19:53:27 +02:00
Konrad Pozniak 6c37cc770c
remove SavedToots (#2141)
* remove SavedToots

* fix tests
2021-05-16 19:17:56 +02:00
kyori19 a746009f74 Merge remote-tracking branch 'tuskyapp/develop' 2021-03-04 15:08:48 +09:00
Alibek Omarov 455942505c
ComposeViewModel: remove unused variable (#2060) 2021-01-31 18:58:45 +01:00
Konrad Pozniak 940d6d395a
Drafts v2 (#2032)
* cleanup warnings, reorganize some code

* move ComposeAutoCompleteAdapter to compose package

* composeOptions doesn't need to be a class member

* add DraftsActivity and DraftsViewModel

* drafts

* remove unnecessary Unit in ComposeViewModel

* add schema/25.json

* fix db migration

* drafts

* cleanup code

* fix compose activity rotation bug

* fix media descriptions getting lost when restoring a draft

* improve deleting drafts

* fix ComposeActivityTest

* improve draft layout for almost empty drafts

* reformat code

* show toast when opening reply to deleted toot

* improve item_draft layout
2021-01-21 18:57:09 +01:00
kyori19 ea822004dd Merge remote-tracking branch 'tuskyapp/develop' 2020-12-16 23:47:26 +09:00
Konrad Pozniak 34fb546200
upgrade dependencies (#1990)
* upgrade dependencies

* fix tests
2020-11-22 19:02:54 +01:00
kyori19 171f69a35d Merge remote-tracking branch 'tuskyapp/develop' 2020-11-20 13:21:21 +09:00
Garrit Franke af44b25c29
Delete scheduled post after editing (#1947)
* Delete scheduled post after editing

This ensures that editing a scheduled toot will not duplicate it.

Fixes #1924

* Fix scheduled toot editing

* Convert isEditingScheduledToot to property

* Replace MediatorLiveData with combineLiveData

* Remove dead code

* Fix observer emission

* Fix "Finish media upload" appearing for split second
2020-10-25 18:41:11 +01:00
Levi Bard e237639adc
Save draft when redrafting a post (#1744) 2020-10-02 18:32:46 +02:00
kyori19 3a912cf7a9 Remove string-based quote feature 2020-05-16 17:47:53 +09:00
kyori19 4d33e477a7 Add itabashi.0j0.jp to CAN_USE_QUOTE_ID 2020-05-16 16:10:59 +09:00
kyori19 ca65c5e26f Merge remote-tracking branch 'tuskyapp/develop' 2020-05-04 10:52:47 +09:00
Sylvia van Os 386d197851
Fix content warning state being lost after screen rotation (#1756)
* Restore compose options after rotation

* Fix in ViewModel instead

* Move showContentWarning change into ViewModel
2020-04-18 15:06:24 +02:00
kyori19 1370eedc10 Merge remote-tracking branch 'tuskyapp/develop' 2020-04-09 00:34:31 +09:00
Levi Bard 9c4898117e
Ensure media are marked sensitive any time there's a content warning (#1728)
Addresses the most critical part of #1725, and may also apply to #1721
2020-03-17 19:46:32 +01:00
kyori19 7d404a4c5c Add a lot of instances which can use quote_id 2020-02-23 22:27:54 +09:00
kyori19 fbb1c5aee6 Merge remote-tracking branch 'tuskyapp/develop' 2020-02-12 12:16:30 +09:00
Konrad Pozniak 11a4de858c fix crash when opening Poll dialog and instanceParams are null (#1668) 2020-02-09 22:34:44 +01:00
kyori19 4f0f4d8bfb Merge remote-tracking branch 'tuskyapp/develop' 2020-01-30 16:03:04 +09:00
Konrad Pozniak 7d5a9da992
fix crash when closing ComposeActivity (#1651) 2020-01-29 19:15:53 +01:00
kyori19 cc31f7af70 Merge remote-tracking branch 'tuskyapp/develop' 2020-01-17 14:14:15 +09:00
Levi Bard 9dccd06a06 Add support for uploading audio attachments (#1630)
* Add support for audio attachments.
Partially addresses #1337

* Register Tusky as a target for audio sharing

* Use icon with textColorTertiary for audio preview
2020-01-16 19:05:52 +01:00
Levi Bard 6a2c9bdbe4 Don't drop content warning when replying (#1631) 2020-01-13 15:18:55 +01:00
kyori19 9efc4a4bc9 Merge remote-tracking branch 'tuskyapp/develop' 2020-01-05 01:02:28 +09:00
Konrad Pozniak 8a9d62e654
Merge pull request #1610 from tuskyapp/improve_scheduled_toot
Improve ScheduledTootActivity
2019-12-31 15:00:23 +01:00
Konrad Pozniak 54f04fb4d7 address PR feedback 2019-12-31 13:57:24 +01:00
kyori19 2994af7091 Fix ComposeOptions.visibility not applied (#1605) 2019-12-27 21:02:16 +01:00
kyori19 a90a71e3c3 Fix ComposeOptions.visibility not applied 2019-12-27 14:55:01 +09:00
kyori19 61bc887af5 Merge remote-tracking branch 'tuskyapp/develop' 2019-12-27 14:46:18 +09:00
Konrad Pozniak a795da81b4
fix replying to toots (#1600) 2019-12-21 15:56:19 +01:00
Konrad Pozniak eca3b5379e
fix delete&redraft losing toot text (#1599) 2019-12-21 15:56:07 +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