Commit Graph

4285 Commits

Author SHA1 Message Date
Nik Clayton ec52df3d61
chore: Prepare release 2.8.3 (versionCode 23) (#1061) 2024-10-29 18:56:04 +01:00
Weblate (bot) 04d98ae616
fix(l10n): Translations update from Hosted Weblate (#1056)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for [Pachli/Fastlane
Metadata](https://hosted.weblate.org/projects/pachli/fastlane-metadata/).


It also includes following components:

* [Pachli/App :
Main](https://hosted.weblate.org/projects/pachli/app-main/)

* [Pachli/App :
Fdroid](https://hosted.weblate.org/projects/pachli/app-fdroid/)

* [Pachli/Core/Activity :
Main](https://hosted.weblate.org/projects/pachli/coreactivity-main/)

* [Pachli/Core/Data :
Main](https://hosted.weblate.org/projects/pachli/coredata-main/)

* [Pachli/App :
Google](https://hosted.weblate.org/projects/pachli/app-google/)

* [Pachli/Core/Ui :
Main](https://hosted.weblate.org/projects/pachli/coreui-main/)

* [Pachli/Core/Network :
Main](https://hosted.weblate.org/projects/pachli/corenetwork-main/)

* [Pachli/Feature/About :
Main](https://hosted.weblate.org/projects/pachli/featureabout-main/)

* [Pachli/Core/Preferences :
Main](https://hosted.weblate.org/projects/pachli/corepreferences-main/)

* [Pachli/Core/Activity :
Orange](https://hosted.weblate.org/projects/pachli/coreactivity-orange/)

* [Pachli/Feature/Suggestions :
Main](https://hosted.weblate.org/projects/pachli/featuresuggestions-main/)

*
[Pachli/Feature/Login](https://hosted.weblate.org/projects/pachli/featurelogin/)

* [Pachli/Feature/Lists :
Main](https://hosted.weblate.org/projects/pachli/featurelists-main/)

* [Pachli/Core/Designsystem :
Main](https://hosted.weblate.org/projects/pachli/coredesignsystem-main/)



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/pachli/fastlane-metadata/horizontal-auto.svg)

---------

Co-authored-by: Vaclovas Intas <Gateway_31@protonmail.com>
2024-10-29 15:43:23 +01:00
Nik Clayton a03ca432fa
feat(l10n): Add Lithuanian to the locale config (#1059) 2024-10-29 15:31:56 +01:00
Nik Clayton 8c28318474
fix: Retain task state for MainActivity and ComposeActivity (#1055)
Some users report that returning to the `ComposeActivity` loses content
they've entered and returns to `MainActivity`. I can't reproduce this,
but it's possible that Android is clearing the task state and returning
to the root activity (`MainActivity` in this case).

Set `alwaysRetainTaskState` to true to keep the activity stack, and
hopefully prevent this from happening.
2024-10-27 12:38:34 +01:00
Nik Clayton 67fe600f2c
Revert "fix: Don't lose images / captions when editing with failed uploads"
This reverts commit 7abd74ad88.
2024-10-26 22:21:33 +02:00
Nik Clayton 7abd74ad88
fix: Don't lose images / captions when editing with failed uploads
Previous code would remove image attachments from the compose editor
if there was a problem uploading or updating them.

This caused a particular problem with image captions. You could attach
a valid image, then write a caption that was too long for the server.
The server would reject the status, and the status was saved to drafts.

Then you open the draft, which tries to upload the image again with a
too-long caption. The upload is rejected, and the image, along with the
caption, is removed.

Fix this.

- Change `QueuedMedia` to track the upload state as a `Result<_,_>`,
so any error messages are preserved and available to the UI.

- The different `Ok` types for the upload state contain the upload
progress percentage (if appropriate) or the server's ID for the
uploaded media.

- Change `ProgressImageView` to accept the upload state `Result`.
If the result is an error the image is drawn with a red overlay and
white "error" icon.

- If an upload is in an error state allow the user to click on it.
That shows a dialog explaining the error, and provides options to
edit the image, change the caption, etc.

- When changing the caption make the API call to change it on the
server (if the attachment has been uploaded). This makes the user
aware of any errors sooner in the process, so they can correct them.
2024-10-26 22:19:14 +02:00
Nik Clayton 3a18451307
fix: Ensure caption field is always visible (#1052)
Constrain caption image height so the caption field is always visible.
Allow for at least 4 lines of space to enter the caption.
2024-10-25 14:30:21 +02:00
Kalle Kniivilä 87c58a8a4e fix(l10n): Update Finnish translations
Currently translated at 100.0% (726 of 726 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/fi/
2024-10-24 22:47:26 +02:00
Nik Clayton e7068da7e5
feat: Show text counter on caption dialog, request focus (#1045)
Previous layout didn't enable the character counter for entered text, so
it was difficult for the user to see how much they had used.

Fix that. To get the layout to play nicely switch to a ConstraintLayout
with a chain to split the dialog roughly 50/50 between the image and the
caption views.

While I'm here:

- Remove the margins around the image, so it's clearer, and is more
consistent with the "set focus" dialog.
- Set focus on the description immediately, so the keyboard pops up.
- Remove focusability from the image, since the user shouldn't be able
to interact with it.
2024-10-24 15:21:16 +02:00
Juan M Sevilla 8a649393d9 fix(l10n): Update Spanish translations
Currently translated at 100.0% (724 of 724 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/es/
2024-10-23 16:00:27 +02:00
Kalle Kniivilä 41595d63f9 fix(l10n): Update Finnish translations
Currently translated at 100.0% (724 of 724 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/fi/
2024-10-23 16:00:27 +02:00
Anonymous 33e1881dd5 fix(l10n): Update Chinese (Simplified Han script) translations
Currently translated at 71.7% (518 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/zh_Hans/
2024-10-23 16:00:27 +02:00
Anonymous bef1d47982 fix(l10n): Update Vietnamese translations
Currently translated at 71.7% (518 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/vi/
2024-10-23 16:00:27 +02:00
Anonymous 0027de1319 fix(l10n): Update Ukrainian translations
Currently translated at 71.3% (515 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/uk/
2024-10-23 16:00:27 +02:00
Anonymous 371f53a50e fix(l10n): Update Turkish translations
Currently translated at 71.4% (516 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/tr/
2024-10-23 16:00:27 +02:00
Anonymous 5f44989b90 fix(l10n): Update Swedish translations
Currently translated at 76.3% (551 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/sv/
2024-10-23 16:00:27 +02:00
Anonymous de7f188479 fix(l10n): Update Portuguese (Brazil) translations
Currently translated at 76.0% (549 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/pt_BR/
2024-10-23 16:00:27 +02:00
Anonymous 8fa4e271e7 fix(l10n): Update Occitan translations
Currently translated at 71.3% (515 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/oc/
2024-10-23 16:00:27 +02:00
Anonymous 1c64500a09 fix(l10n): Update Dutch translations
Currently translated at 76.7% (554 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/nl/
2024-10-23 16:00:27 +02:00
Anonymous 3d407cbbdc fix(l10n): Update Norwegian Bokmål translations
Currently translated at 99.5% (719 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/nb_NO/
2024-10-23 16:00:27 +02:00
Anonymous 4ca7540850 fix(l10n): Update Japanese translations
Currently translated at 76.0% (549 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/ja/
2024-10-23 16:00:27 +02:00
Anonymous e35d9d8791 fix(l10n): Update Italian translations
Currently translated at 75.3% (544 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/it/
2024-10-23 16:00:27 +02:00
Anonymous 040f8237d5 fix(l10n): Update Icelandic translations
Currently translated at 71.1% (514 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/is/
2024-10-23 16:00:27 +02:00
Anonymous f7114432b9 fix(l10n): Update Hungarian translations
Currently translated at 71.1% (514 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/hu/
2024-10-23 16:00:27 +02:00
Anonymous 737dad1acb fix(l10n): Update Galician translations
Currently translated at 99.5% (719 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/gl/
2024-10-23 16:00:27 +02:00
Anonymous 3bf80165be fix(l10n): Update Gaelic translations
Currently translated at 71.3% (515 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/gd/
2024-10-23 16:00:27 +02:00
Anonymous 071e58ad04 fix(l10n): Update French translations
Currently translated at 75.0% (542 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/fr/
2024-10-23 16:00:27 +02:00
Anonymous 37be6fa7cb fix(l10n): Update Finnish translations
Currently translated at 99.8% (721 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/fi/
2024-10-23 16:00:27 +02:00
Anonymous ad7e7b10d2 fix(l10n): Update Persian translations
Currently translated at 71.7% (518 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/fa/
2024-10-23 16:00:27 +02:00
Anonymous 009076b2cd fix(l10n): Update Spanish translations
Currently translated at 99.8% (721 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/es/
2024-10-23 16:00:27 +02:00
Anonymous 40df2cc610 fix(l10n): Update German translations
Currently translated at 76.0% (549 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/de/
2024-10-23 16:00:27 +02:00
Anonymous e17bc558b6 fix(l10n): Update Welsh translations
Currently translated at 71.7% (518 of 722 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/cy/
2024-10-23 16:00:27 +02:00
Nik Clayton 2bdab8bec9
fix: Make "Open boost author" open the correct profile (#1043)
Previous code passed the actionable status, so "Open boost author"
actually opened the account that posted the original status.

Pass the status representing the boost, so the correct account is
opened.

Fixes #1042
2024-10-23 13:56:47 +02:00
Nik Clayton 90bb85ba00
feat: Show "copy" button for links/hashtags/mentions in accessibility dialogs (#1041)
Users report that copying items can be difficult using Talkback.

Make this easier in the dialogs that appear for links, mentions, and
hashtags by using a dedicated adapter that displays a "Copy" button at
the end of each item.

Fixes #1038
2024-10-23 13:39:51 +02:00
Nik Clayton a012f94c94
fix: Show links, mentions, and hashtag accessibility actions for notifications (#1040)
Previous code checked the item was a `StatusViewData`, which is not true
for notifications, and meant the links, mentions, and hashtags
accessibility features were not available.

Change this to `IStatusViewData`, which notifications do implement.

Fixes #1037
2024-10-23 12:34:28 +02:00
Nik Clayton 84aae1de7d
fix: Always create per-timeline menu (#1039)
Previous code only inflated the timeline fragment menu if swipe/refresh
was enabled -- a hold over from when "Refresh" was the only menu item.

There are other menu items now, and they were also hidden. Fix this by
always inflating the menu.
2024-10-23 12:15:24 +02:00
Nik Clayton 2234c4c782
feat: Add accessibility options for tab justification and content (#1035)
Provide two new lab preferences for controlling the layout and content
of main navigation tabs.

Tabs can now be justfied to start, end, or fully (if room). Start/end
justification may put the tabs closer to the user's fingers, depending
on how they hold the device. Fully justified uses the full width of the
tab bar (if the tabs don't require scrolling).

The content can be set to one of:

- Icon only (previous behaviour)
- Text only
- Icon with text beside
- Icon with text below

Fixes #336
2024-10-21 17:49:19 +02:00
Nik Clayton 8fe2850229
fix: Don't prompt to discard/save unedited scheduled posts (#1034)
Previous code didn't send the language to ComposeActivity when editing a
scheduled status so it always appeared to be dirty. This prompted the
user to save/discard changes when backing out, even if they hadn't made
any changes.

Fix this by collecting the language code when fetching scheduled posts
and passing it in `ComposeOptions`.
2024-10-20 20:48:53 +02:00
Nik Clayton 51769773d1
feat: Show each post's scheduled time in the list of scheduled posts (#1033)
Fixes #293
2024-10-20 20:33:31 +02:00
Nik Clayton 0fe84f1611
refactor: Use Date type for scheduled post date / times (#1032)
Previous code accepted the `scheduledAt` value as a String, and kept it
as a String (including when serialising as part of a draft). Then it was
converted to an actual Date for display.

Refactor to keep it as a Date for as long as possible. Moshi decodes
Dates correctly over the network, and the database is configured to
serialise Dates as Longs.

This necessitates two migration steps to preserve any existing
`scheduledAt` values for drafts. The first step adds a new column to
store the date as a Long and copies over existing data. The second step
replaces the old column with the new column.
2024-10-20 16:29:32 +02:00
Nik Clayton a43ebab69b
feat: Add "Don't ask again" option when confirming the posting language (#1027)
For some users this feature has too many false positives, particularly
when emojis are used.

Provide a preference that enables/disables the feature, default to
"enable".

When the user is prompted the dialog has a third "Don't ask again"
option. If chosen the preference is set to prevent future prompts and
the status is sent as-is.

Fixes #893
2024-10-18 17:26:50 +02:00
Nik Clayton c8aa4fd374
fix: Disable "Scheduled post" support on GoToSocial accounts (#1025)
GoToSocial servers don't support scheduled posts; they return the wrong
type, and this can cause a loop of posting.

The GoToSocial bug to implement scheduled posts is
https://github.com/superseriousbusiness/gotosocial/issues/1006.

Fix this by adding a new server capability for scheduled post support,
using it for most servers, and disabling it for GoToSocial.

If scheduled post support is not available for an account:

- The "Scheduled posts" menu option is not shown.
- The scheduling button (clock) when composing a post is hidden, so the
user cannot set scheduling parameters.

Fixes #963
2024-10-18 15:37:10 +02:00
Nik Clayton 8fac5c3d4d
fix: Don't clip buttons when choosing scheduled post time (#1024)
The MaterialTimePicker library has a bug that results in the "Cancel"
and "Ok" buttons on the dialog being cut off.

See
https://github.com/material-components/material-components-android/issues/3584

Work around this by updating their layout params and explicitly setting
the "bottomToBottom" constraint to their parent.
2024-10-18 15:13:17 +02:00
Nik Clayton a5c8bf5e7e
fix: Remove the "Liimt timeline notifications" preference (#1009)
This wasn't acting as a preference.

It presented as a switch. If the user toggled it some notification
settings were changed for all accounts.

It wasn't clear what was changed, and if the user changed some of those
settings back the switch position did not change (it couldn't, you
couldn't meaningfully represent a partial change using a single switch).

Since the user has full control over the notification filters on a
per-account basis remove this "preference" to reduce confusion.

Fixes #935
2024-10-17 22:09:22 +02:00
Nik Clayton 1b3b78a9dd
refactor: Pass pachliAccountId to more functions (#1008)
While this isn't used in many places yet, it pushes the places where the
active account is referenced further up the call stack.
2024-10-17 21:19:17 +02:00
Nik Clayton fd9cc2ea96
refactor: Improve saveVisibleId log message (#1003) 2024-10-14 17:21:04 +02:00
Nik Clayton f7c87dfe73
refactor: Use pachliAccountId in EditProfileActivity (#1002)
Pass the value to EditProfileViewModel. It's not used yet, but this
minimises diffs an upcoming large refactor.
2024-10-14 16:39:45 +02:00
mondstern 2c75be8936 fix(l10n): Update Ukrainian translations
Currently translated at 100.0% (2 of 2 strings)

Translation: Pachli/App : Fdroid
Translate-URL: https://hosted.weblate.org/projects/pachli/app-fdroid/uk/
2024-10-12 20:49:52 +02:00
Weblate (bot) 0cf50524f2
fix(l10n): Translations update from Hosted Weblate (#995)
Translations update from [Hosted Weblate](https://hosted.weblate.org)
for [Pachli/Fastlane
Metadata](https://hosted.weblate.org/projects/pachli/fastlane-metadata/).


It also includes following components:

* [Pachli/App :
Main](https://hosted.weblate.org/projects/pachli/app-main/)

* [Pachli/App :
Fdroid](https://hosted.weblate.org/projects/pachli/app-fdroid/)

*
[Pachli/Feature/Login](https://hosted.weblate.org/projects/pachli/featurelogin/)

* [Pachli/Feature/Suggestions :
Main](https://hosted.weblate.org/projects/pachli/featuresuggestions-main/)

* [Pachli/Feature/Lists :
Main](https://hosted.weblate.org/projects/pachli/featurelists-main/)

* [Pachli/Core/Ui :
Main](https://hosted.weblate.org/projects/pachli/coreui-main/)

* [Pachli/App :
Google](https://hosted.weblate.org/projects/pachli/app-google/)

* [Pachli/Core/Designsystem :
Main](https://hosted.weblate.org/projects/pachli/coredesignsystem-main/)

* [Pachli/Core/Data :
Main](https://hosted.weblate.org/projects/pachli/coredata-main/)

* [Pachli/Core/Activity :
Main](https://hosted.weblate.org/projects/pachli/coreactivity-main/)

* [Pachli/Feature/About :
Main](https://hosted.weblate.org/projects/pachli/featureabout-main/)

* [Pachli/Core/Preferences :
Main](https://hosted.weblate.org/projects/pachli/corepreferences-main/)

* [Pachli/Core/Activity :
Orange](https://hosted.weblate.org/projects/pachli/coreactivity-orange/)

* [Pachli/Core/Network :
Main](https://hosted.weblate.org/projects/pachli/corenetwork-main/)



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/pachli/fastlane-metadata/horizontal-auto.svg)

---------

Co-authored-by: Vaclovas Intas <vaclovas1999@gmail.com>
Co-authored-by: Languages add-on <noreply-addon-languages@weblate.org>
Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Co-authored-by: LibreTranslate <noreply-mt-libretranslate@weblate.org>
2024-10-10 21:42:59 +02:00
Nik Clayton a4e9c563e9
fix: Prevent crash when ModuleInstall.API is unavailable (#997)
Seen the following crash in user reports:

```
com.google.android.gms.common.api.ApiException: 17:
  API: ModuleInstall.API is not available on this device.
  Connection failed with:
  ConnectionResult{statusCode=SERVICE_INVALID, resolution=null, message=null}
```

Doesn't appear to be properly documented anywhere I can find. To work
around this catch exceptions when checking for MLKit modules or
installing them and return defaults.
2024-10-10 20:44:06 +02:00