Commit Graph

58 Commits

Author SHA1 Message Date
kyori19 57aab71b0e
Merge remote-tracking branch 'tuskyapp/develop'
# Conflicts:
#	app/build.gradle
#	app/src/main/java/com/keylesspalace/tusky/SplashActivity.kt
#	app/src/main/java/com/keylesspalace/tusky/adapter/StatusDetailedViewHolder.java
#	app/src/main/java/com/keylesspalace/tusky/components/compose/ComposeViewModel.kt
#	app/src/main/java/com/keylesspalace/tusky/components/compose/MediaUploader.kt
#	app/src/main/java/com/keylesspalace/tusky/components/conversation/ConversationViewHolder.java
#	app/src/main/java/com/keylesspalace/tusky/components/search/SearchViewModel.kt
#	app/src/main/java/com/keylesspalace/tusky/components/timeline/TimelineTypeMappers.kt
#	app/src/main/java/com/keylesspalace/tusky/components/timeline/viewmodel/CachedTimelineViewModel.kt
#	app/src/main/res/layout/activity_main.xml
#	app/src/main/res/values-cs/strings.xml
#	app/src/main/res/values-de/strings.xml
#	app/src/main/res/values-fa/strings.xml
#	app/src/main/res/values-fr/strings.xml
#	app/src/main/res/values-hu/strings.xml
#	app/src/main/res/values-it/strings.xml
#	app/src/main/res/values-no-rNB/strings.xml
#	app/src/main/res/values-zh-rCN/strings.xml
2022-07-16 02:51:51 +09:00
Konrad Pozniak 62c4cfde89
improve media upload error messages (#2602) 2022-06-30 20:51:05 +02:00
Konrad Pozniak e1c8461423
replace kotlin-result-calladapter with networkresult-calladapter (#2569)
* replace kotlin-result-calladapter with networkresult-calladapter

* fix tests
2022-05-30 20:03:40 +02:00
mcclure 00c139190e
Ability to crop images attached to posts (#2531)
* First attachment crop attempt: Can crop in place, but does not delete/replace on server so has no effect

* Attachment crop feature works

* ktlint fixes on attachment crop patch

* Upgrade Android-Image-Cropper to 4.2.1

* An error message should be displayed if attachment cropping fails and it is not because the user intentionally cancelled.

* Remove 2 of the 3 "state passing" variables by using MediaUtils

* Cropper should use content uri (MIME type bearing) and setOutputCompressFormat so that PNGs reach the server safely.

* Change to crop requested by Conny: Store inflight cropImageItemOld in view model

* Change to crop requested by Conny: Sort cropImage with the other contracts

* ktlint fixes on attachment crop patch (again)
2022-05-22 21:01:14 +02:00
kyori19 25bee533f1
Merge remote-tracking branch 'tuskyapp/develop'
# Conflicts:
#	app/build.gradle
#	app/src/main/java/com/keylesspalace/tusky/MainActivity.kt
#	app/src/main/java/com/keylesspalace/tusky/entity/Account.kt
#	app/src/main/res/values-zh-rCN/strings.xml
#	app/src/main/res/values-zh-rTW/strings.xml
#	app/src/main/res/values/strings.xml
2022-05-19 02:42:27 +09:00
kyori19 0ef03e2bec
Merge commit '0f1e95d0ca81d0254f8d1ae6b60a3130d51b15cf' 2022-05-19 00:15:17 +09:00
Konrad Pozniak cec8f6dd65
modernize autocomplete (#2510)
* modernize autocomplete

* use @WorkerThread annotation
2022-05-17 19:55:37 +02:00
Konrad Pozniak d9c6269d44
fix deleting media attachments removing the wrong ones (#2517) 2022-05-12 18:21:43 +02:00
Konrad Pozniak beaed6b875
Fix crash when saving redrafted media to drafts (#2502)
* fix crash when saving draft from redraft

* fix crash when saving draft from redraft

* replace ... with …
2022-05-09 19:39:43 +02:00
Konrad Pozniak 444e7365c9
fix race condition where multiple uploaded media can get same internal id (#2479)
* fix race condition where multiple uploaded media can get same internal id

* atomically update media stateflow

* atomically update media stateflow
2022-05-03 19:12:35 +02:00
kyori19 95a1f5632b
Merge remote-tracking branch 'tuskyapp/develop' 2022-05-01 19:54:22 +09:00
Konrad Pozniak 671d2c6a45
Check if media processing finished before sending status (#2458)
* make MastodonApi.createStatus suspending

* check if media processing has finished before sending status

* add backoff for retrying processed media check
2022-04-28 20:37:31 +02:00
kyori19 6c630e08dd Merge remote-tracking branch 'tuskyapp/develop' 2022-04-24 16:42:54 +09:00
Konrad Pozniak d2bfceae7b
refactor compose & announcements to coroutines (#2446)
* refactor compose & announcements to coroutines

* fix code formatting

* add javadoc to InstanceInfoRepository

* fix comments in ImageDownsizer

* remove unused Either extensions

* add explicit return type for InstanceInfoRepository.getEmojis

* make ComposeViewModel.pickMedia return Result

* cleanup code in ImageDownsizer
2022-04-21 18:46:21 +02:00
Konrad Pozniak 3e8c6a318a
introduce KotlinResultCallAdapter for nice suspending network calls (#2415)
* introduce KotlinResultCallAdapter for nice suspending network calls

* fix tests
2022-04-14 19:49:49 +02:00
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