Commit Graph

60 Commits

Author SHA1 Message Date
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
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
Konrad Pozniak f3d05f82f9
fix toot sending twice when using a hardware keyboard (#1758) 2020-04-18 13:45:19 +02:00
Konrad Pozniak 2cf1e366b8
convert MainActivity to Kotlin and upgrade MaterialDrawer to version 8 (#1748)
* convert MainActivity to Kotlin

* migrate to MaterialDrawer 8

* fix drawer styles

* revert removing BezelImageView and material_drawer_header override

* fix tests

* add lost comment back to material_drawer_header.xml

* add tools:parentTag to material_drawer_header.xml

* use when instead of if in MainActivity

* fix statusbar color over the drawer

* cleanup drawer item creation

* tint secondary drawer items as well

* remove unnecessary ids

* fix header text color in the light theme

* improve header text contrast
2020-04-15 18:57:53 +02:00
kyori19 1370eedc10 Merge remote-tracking branch 'tuskyapp/develop' 2020-04-09 00:34:31 +09:00
Levi Bard dd8abad8ca
When a plaintext share contains EXTRA_TEXT and a distinct EXTRA_SUBJECT, use EXTRA_SUBJECT as the content warning for the shared status (#1712) 2020-02-26 20:41:02 +01:00
kyori19 5503c801c1 Merge remote-tracking branch 'tuskyapp/develop' 2020-02-26 21:09:20 +09:00
Konrad Pozniak d9c802982e
Upgrade deps (#1708)
* upgrade Dagger

* upgrade AndroidX Lifecycle

* upgrade AndroidX Fragment

* upgrade Room, Retrofit, AndroidX core, Material components

* fix report fragments not sharing viewmodels
2020-02-25 19:49:41 +01:00
Levi Bard 80e0c55b67
Warn when scheduling a post within 5 minutes (#1698)
* Warn when scheduling a post within 5 minutes

* Fix NPE when scheduled post time isn't set

* Use AlertDialog with option to cancel instead of Toast when a post isn't scheduled far enough in advance

* Move schedule validation warning to scheduling bottom sheet

* Fix scheduling error display when sending after an initially-valid scheduling time has become invalid
2020-02-25 18:33:24 +01:00
Konrad Pozniak aba36ca6f8
Compose activity fixes (#1707)
* cleanup media keyboard code

* fix crash in ComposeActivity when rotating phone while taking photo

* fix poll button in ComposeActivity being invisible when disabled
2020-02-24 22:02:59 +01:00
kyori19 de8069aec9 Merge remote-tracking branch 'tuskyapp/develop' 2020-02-23 22:23:54 +09:00
Konrad Pozniak 6d48811767
fix crash when inserting custom emojis at the start of the compose field (#1706) 2020-02-21 22:08:41 +01:00
Levi Bard 9a173f0234
Delete draft when sending its status completes. (#1704)
Fixes #1700
2020-02-19 21:10:22 +01:00