Commit Graph

327 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 8a0848d252
fix data loss when re-adding existing account (#2601) 2022-06-30 20:49:48 +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
Levi Bard 4188670b42
Implement reply count indicator to track web UI (#2467)
Addresses #882
2022-05-20 16:47:45 +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 4c9cd4084b
show list title when viewing list timeline (#2503) 2022-05-17 19:55:26 +02:00
Martin Marconcini d97493d312
Issue 2477: Show account's creation date in Profile. (#2480)
* Show account's creation date in Profile.

* Fix broken test.

* Store account creation date in the Database.

* Reformat and reposition Joined Date according to PR Feedback.

* Revert "Store account creation date in the Database."

This reverts commit d9761f53 as it's not needed.

* Change Account's Creation Date to a java.util.Date.
Update Test.

* Fix wildcard import.

* Show full month instead of an abbreviation.

* Remove `lazy` usage in favor of local instantiation.

Co-authored-by: Martin Marconcini <martin.marconcini.rodriguez@nl.abnamro.com>
Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
2022-05-17 19:49:42 +02:00
Peter Cai 9ec5d6e3b0
Push notifications support via UnifiedPush (#2303)
Fixes #793.

This is an implementation for push notifications based on UnifiedPush
for Tusky. No push gateway (other than UP itself) is needed, since
UnifiedPush is simple enough such that it can act as a catch-all
endpoint for WebPush messages. When a UnifiedPush distributor is present
on-device, we will by default register Tusky as a receiver; if no
UnifiedPush distributor is available, then pull notifications are used
as a fallback mechanism.

Because WebPush messages are encrypted, and Mastodon does not send the
keys and IV needed for decryption in the request body, for now the push
handler simply acts as a trigger for the pre-existing NotificationWorker
which is also used for pull notifications. Nevertheless, I have
implemented proper key generation and storage, just in case we would
like to implement full decryption support in the future when Mastodon
upgrades to the latest WebPush encryption scheme that includes all
information in the request body.

For users with existing accounts, push notifications will not be enabled
until all of the accounts have been re-logged in to grant the new push
OAuth scope. A small prompt will be shown (until dismissed) as a
Snackbar to explain to the user about this, and an option is added in
Account Preferences to facilitate re-login without deleting local drafts
and cache.
2022-05-17 19:32:09 +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
Ivan Kupalov f3d7923803
Improve UX when Login WebView fails to load the page (#2492)
Previously we simply closed the screen with the login WebView which
could cause confusion. Now we specify that page could not be loaded.

As a side effect it will also show the error message which the server
returns (if any).
2022-05-03 19:14:55 +02:00
kyori19 95a1f5632b
Merge remote-tracking branch 'tuskyapp/develop' 2022-05-01 19:54:22 +09:00
Martin Marconcini 260e25a0a4
Issue 2379: Make it possible to select text in posts. (#2472)
* Set TextIsSelectable on the corresponding view holders and remove a longpress listener to let Android select text.

* Revert changes, and make selectable text only in detailed status.

Remove long press listener to copy to clipboard (as it interferes with natural text selection on Android).

* Remove unused string (copy_to_clipboard_success) from all translations.

Co-authored-by: Martin Marconcini <martin.marconcini.rodriguez@nl.abnamro.com>
2022-04-30 19:05:44 +02:00
Konrad Pozniak e5b58770ce
improve LoginWebViewActivityUX (#2465) 2022-04-28 20:38:51 +02:00
kyori19 6c630e08dd Merge remote-tracking branch 'tuskyapp/develop' 2022-04-24 16:42:54 +09:00
Levi Bard dff039e123
Add support for post edit notifications (#2431)
* Add support for post edit notifications

* Update notification icon
2022-04-19 11:10:13 +02:00
kyori19 d21d045eda
Support new signup notifications (#2357) 2022-04-14 19:39:30 +02:00
kyori19 1228f645a6 Merge remote-tracking branch 'tuskyapp/develop' 2022-04-13 00:59:06 +09:00
Mélanie Chauvel 2fc3ba3cee
Replace “status” by “post” in strings name and source values (#2405) 2022-03-27 12:23:25 +02: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
kyori19 4a8fa74f79 Merge commit '224161caf111a15887cbc8a419763e87fe69931d' 2022-03-04 00:37:23 +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
Colin Kinloch c37ccbb6e8
Add confirmation for favourite and bookmark actions (#2245)
* Add confirmation for favourite and bookmark actions

* Favourite confirmation american spelling and default values

* Remove bookmarking confirmation

* Update app/src/main/java/com/keylesspalace/tusky/fragment/NotificationsFragment.java

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

Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
2021-10-04 07:48:44 +02:00
kyori19 10acf4088d Add option to disable quick compose 2021-08-04 00:16:40 +09:00
kyori19 76cd8f6c06 Fix tab resetting behaviour 2021-07-26 00:10:48 +09:00
kyori19 2005b32dfa Merge remote-tracking branch 'tuskyapp/develop' 2021-07-03 23:59:57 +09:00
Konrad Pozniak 6d4f5ad027
migrate to paging 3 (#2182)
* migrate conversations and search to paging 3

* delete SearchRepository

* remove unneeded executor from search

* fix bugs in conversations

* update license headers

* fix conversations refreshing

* fix search refresh indicators

* show fullscreen loading while conversations are empty

* search bugfixes

* error handling

* error handling

* remove mastodon bug workaround

* update ConversationsFragment

* fix conversations more menu and deleting conversations

* delete unused class

* catch exceptions in ConversationsViewModel

* fix bug where items are not diffed correctly / cleanup code

* fix search progressbar display conditions
2021-06-17 18:54:56 +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 dee6a3a160
always show follow requests in main menu (#1809)
* always show follow requests in main menu

* update recyclerview to v1.2.0

* fix bug that shows follow requests info to wrong users
2021-04-10 20:30:44 +02: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
kyori19 a746009f74 Merge remote-tracking branch 'tuskyapp/develop' 2021-03-04 15:08:48 +09:00
Konrad Pozniak d2a8254d4f
add content description to account subscription button (#2076) 2021-02-18 19:26:25 +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
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
Levi Bard baa915a0a3
Support opening unknown attachment types via `openLink` (#2044)
* Support opening unknown attachment types via openLink. #1970

* Fix label text for unknown attachment types
2021-01-18 13:53:13 +01:00
Levi Bard cb2296f248
Prompt before deleting lists (#2043)
* Prompt before deleting lists. #1998

* Address pull request feedback
2021-01-18 11:40:13 +01:00
Levi Bard be60155de5
Implement timed mutes. (#2035)
Fixes #2033
2021-01-15 21:05:36 +01:00
kyori19 b3c825339f Fix broken preferences 2021-01-03 14:42:50 +09: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
Garrit Franke 0fbb4e9713
Wellbeing mode (#1992)
* Add wellbeing mode settings toggle

* Translate wellbeing mode string to german

* Disable fav/boost count on toots if wellbeing is enabled

* Hide follow/post stats on profiles

* Reload notifications when wellbeing mode is toggled

* Add wellbeing mode explainer dialog

* Move wellbeing filter timeline into own category

* Add toggles for quantitative stats

* Hide announcement badge counts if wellbeing is enabled

* Move fetching of wellbeing setting to activity

* Add wellbeing option to statusDisplayOptions

* Update post filters for all accounts

* Remove local translations

* Revert "Remove local translations"

This reverts commit e92e636a5c759b09649174ab68ec91bc13680287.

* Remove german translations
2020-12-23 19:13:37 +01:00
Alibek Omarov b91a0aceeb
Notification bell (#2012)
* Add notification bell button, API endpoints and new relationship field

* Add notification type for subscriptions

* Add subscriptions to legacy notification filtering

* Update schemas

* Fix build

* Make rewrite static method into method of Notification class, fix getNotificationText

* Mastodon wording for subscriptions
2020-12-23 12:52:39 +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
Konrad Pozniak ce973ea7e7
Personal account notes (#1978)
* add personal notes to AccountActivity

* use RxJava instead of plain okhttp calls

* make AccountViewModel rx aware

* hide note input until data is loaded
2020-11-17 20:10:54 +01:00
Konrad Pozniak 26a051220b
improve relative poll timestamp string format (#1939) 2020-10-02 17:11:48 +02:00