Commit Graph

72 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
mcclure 3ca8a0b549
Use specific term "image" in error UI, not "attachment" (#2592)
The new message for the crop feature, "The attachment could not be edited.", turned out to be awkward in some languages (French) where according to the translator it would be better to more specifically say "The image could not be edited." (as currently we can only edit images). Patch replaces error_media_edit_failed with a error_image_edit_failed and deletes the existing error_media_edit_failed-s.
2022-06-21 22:14:11 +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 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
Guntbert Reiter 9a8dfaa744
Remove code to check the server version (#2469)
solves #2439
2022-04-29 18:35:25 +02: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
kyori19 1228f645a6 Merge remote-tracking branch 'tuskyapp/develop' 2022-04-13 00:59:06 +09:00
Konrad Pozniak c47804997c
Improve handling of shared media (#2388)
* support file:// uris

* support subjects on image shares

* improve code

* improve code

* improve code
2022-03-28 18:39:05 +02:00
Levi Bard bbd818084d
When calculating post length, count all urls as being of the reserved character count, even if they're shorter. (#2404)
Addresses #2399
2022-03-24 19:52:18 +01: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
Konrad Pozniak 55513e8e2b
Android 12 support, update AndroidX libraries (#2367)
* Android 12 support, update AndroidX libraries

* fix ktlint

* add Android 12 splash screen support

* fix comments in MainActivity

* remove deprecated Intent.ACTION_CLOSE_SYSTEM_DIALOGS

* delete TimelineViewModelTest

* fix notifications on Android 12

* improve splash screen

* handle pending intent flags in a dedicated function
2022-03-09 20:50:23 +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
kyori19 2005b32dfa Merge remote-tracking branch 'tuskyapp/develop' 2021-07-03 23:59:57 +09:00
Konrad Pozniak 16ffcca748
add ktlint plugin to project and apply default code style (#2209)
* add ktlint plugin to project and apply default code style

* some manual adjustments, fix wildcard imports

* update CONTRIBUTING.md

* fix formatting
2021-06-28 21:13:24 +02:00
Konrad Pozniak ca5c455881
update AndroidX, use ActivityResultContracts (#2170)
* update AndroidX, use ActivityResultContracts

* make allowMultiple setable in PickMediaFiles

* add license headers to PickMediaFiles
2021-05-22 17:50:08 +02:00
Konrad Pozniak 6c37cc770c
remove SavedToots (#2141)
* remove SavedToots

* fix tests
2021-05-16 19:17:56 +02:00
kyori19 609dcf46cb Merge remote-tracking branch 'tuskyapp/develop' 2021-04-28 11:54:29 +09:00
Konrad Pozniak f293670c14
migrating to ViewBinding part 6: the final cleanup (#2117) 2021-03-21 12:42:28 +01:00
Konrad Pozniak 0b86f58139
convert some regular strings to plural strings (#2100)
* convert some regular strings to plural strings

* convert hint_describe_for_visually_impaired from string to plurals

* fix ukrainian strings
2021-03-07 19:43:25 +01:00
Konrad Pozniak ff69a2ad0d
migrating to ViewBinding part 2: Activities (#2093) 2021-03-07 19:05:51 +01:00
kyori19 a746009f74 Merge remote-tracking branch 'tuskyapp/develop' 2021-03-04 15:08:48 +09:00
Konrad Pozniak 13392258f6
upgrade Material Design lib and use their new time picker (#2077) 2021-02-23 20:29:02 +01:00
Alibek Omarov 9580870445
Animated emoji support (#2064)
* Animated emoji support

* Try to query preference only once

* Revert to using SpannableStringBuilder
2021-02-06 08:14:51 +01:00
Konrad Pozniak 483beaa957
move onOptionsItemSelected to BaseActivity (#2059)
* move onOptionsItemSelected to BaseActivity

* revert change in ComposeActivity
2021-01-31 20:27:02 +01:00
lenchan139 0275504a05
Move compose content's EditText cursor to first when shared content parsed in ComposeActivity (#2030)
* multiple media upload support

* multiple media upload support

* multiple media upload support

* remove  typing

* Update app/src/main/res/values/strings.xml

Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>

* remove magic number on string.xml and add to activity.

* move edittext cursor to first when shareBody parsed in ComposeActivity

Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
2021-01-26 16:38:03 +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 2ea8ee6bc8 Merge remote-tracking branch 'tuskyapp/develop' 2020-12-31 09:35:22 +09:00
lenchan139 f7a630c1d8
multiple media upload support (#2029)
* multiple media upload support

* multiple media upload support

* multiple media upload support

* remove  typing

* Update app/src/main/res/values/strings.xml

Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>

* remove magic number on string.xml and add to activity.

Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
2020-12-30 17:36:00 +01:00
kyori19 ea822004dd Merge remote-tracking branch 'tuskyapp/develop' 2020-12-16 23:47:26 +09:00
Konrad Pozniak 9cdf486ceb
remove ThemeUtils.getTintedDrawable (#2015) 2020-12-09 19:08:16 +01:00
kyori19 171f69a35d Merge remote-tracking branch 'tuskyapp/develop' 2020-11-20 13:21:21 +09:00
kyori19 fef4b8b07f
[needs help] Support announcements (#1977)
* Implement announcements activity

* Update reactions without api access

* Add badge style

* Use emptyList() as default parameter

* Simplify newIntent

* Use List instead of Array

* Remove unneeded ConstraintLayout

* Add lineSpacingMultiplier

* Fix wording

* Apply material design's default chip style

* Dismiss announcements automatically
2020-11-18 21:12:27 +01:00
Levi Bard d7e47caef3
Add tests for compose activity initial state changes (#1972) 2020-10-28 18:43:11 +01: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
Konrad Pozniak 6d27d822ca
update Kotlin to 1.4.10 and fix some warnigs (#1963) 2020-10-25 18:36:00 +01:00
Vignesh Kumar 3b67f339b1
Change characters left color to red when negative (#1952)
* Change characters left color to red when negative

* Use val for the integers, optimize variable assignment

* Added tusky_red color

* remove extra line typo

* make characters left bold

* change red hue

* fix typo
2020-10-13 18:30:06 +02:00
Levi Bard e237639adc
Save draft when redrafting a post (#1744) 2020-10-02 18:32:46 +02:00
kyori19 eedfd10f30 Merge remote-tracking branch 'tuskyapp/develop' 2020-06-22 12:59:08 +09:00
Konrad Pozniak 836b7f3f76
don't create a CW when sharing text to Tusky (#1836) 2020-06-21 18:25:17 +02:00
kyori19 3a912cf7a9 Remove string-based quote feature 2020-05-16 17:47:53 +09:00
kyori19 bceb3907a2 Revert "[itabashi-don] Enable unleakable visibility with alternate domain"
This reverts commit 4f008f97d1.
2020-05-16 16:02:01 +09:00
kyori19 87707be3df Revert "When a plaintext share contains EXTRA_TEXT and a distinct EXTRA_SUBJECT, use EXTRA_SUBJECT as the content warning for the shared status"
This reverts commit dd8abad8ca.
2020-05-09 22:21:26 +09:00
kyori19 ca65c5e26f Merge remote-tracking branch 'tuskyapp/develop' 2020-05-04 10:52:47 +09:00