393 Commits

Author SHA1 Message Date
Nik Clayton
df5e65bb47
refactor: Delete account data using foreign key constraints (#1205)
Previous code managed account deletions by having specific functions to
call when an account was deleted that would delete all related data.

Replace this with proper foreign key references back to the account ID,
and cascade account deletes to the related data.

Add tests to ensure the deletes happen as expected. Update existing
tests to create an account where necessary so the new foreign key
constraints are kept.
2025-01-16 18:14:06 +01:00
Nik Clayton
80c0f8813a
chore: Move EventHub from :app to :core:eventhub (#1204)
Precursor to other work that will use the eventhub from modules other
than :app.
2025-01-15 16:19:35 +01:00
Nik Clayton
59ab24a0a6
refactor: Move StatusViewData to core.data.model (#1195)
Makes it available to code in other modules, which will be necessary
when implementing cached notifications.
2025-01-06 15:20:08 +01:00
jens persson
ffe4a73d38 fix(l10n): Update Swedish translations
Currently translated at 100.0% (10 of 10 strings)

Translation: Pachli/Core/Data : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/coredata-main/sv/
2024-12-23 12:33:00 +01:00
Nik Clayton
1996d33aee
feat: Show link title when viewing posts about a trending link (#1184)
Previous code inadvertently crashed when the user clicked on a trending
link count to see statuses about the link.

Don't do that. Instead, show the statuses that mention the link, and
show the link's title in the actionbar to make it more explicit for the
user.

Special-case this timeline type in TimelineActivity so it can't be added
to a tab (it would be difficult to distinguish it amongst tabs as they
would have the same icon).
2024-12-16 20:19:44 +01:00
Nik Clayton
6883072e6f
feat: Show request method and URL in ApiResult errors (#1181)
Append the request method ("GET", etc) and the request URL to error
messages in ApiResult errors. This should provide additional inforamtion
when debugging issues reported by users.
2024-12-14 15:01:44 +01:00
Nik Clayton
16f6330a9e
fix: Include URL when constructing nodeinfo error string (#1160)
Previous code crashed because of a missing format argument.
2024-12-08 14:30:29 +01:00
Nik Clayton
57be148fbf
feat: Show posts that mention a trending link (#1153)
Mastodon 4.3 introduced a new API to fetch a timeline of posts that
mention a trending link.

Use that to display a "See <n> posts about ths link" message in a
trending link's preview card (if supported by the server).

Define a new timeline type with associated API call to fetch the
timeline.

Add an accessibilty action to support this.

While I'm here also support author's in preview cards that don't have a
related Fediverse account; show their name in this case.

Fixes #1123
2024-12-03 23:00:31 +01:00
Nik Clayton
d03cf09708
fix: Show correct account name in "Open as ..." menu (#1139) 2024-11-26 21:01:36 +01:00
Nik Clayton
982963b3b2
refactor: Use type converters instead calling moshi.adapter by hand (#1134)
A few places in the code were calling `moshi.adapter` to marshall
to/from strings in the database where type converters either already
exist, or are straightforward to create.

Create the missing type converters, and use them throughout. This
simplifies several places where a Moshi instance no longer needs to be
passed through several layers of method calls.

Since this doesn't change the underlying database representation of the
data there's no need to bump the database version number.
2024-11-25 21:25:28 +01:00
renovate[bot]
ccab076dc5
fix(deps): update dependency org.robolectric:robolectric to v4.14.1 (#1122)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.robolectric:robolectric](http://robolectric.org)
([source](https://redirect.github.com/robolectric/robolectric)) | `4.14`
-> `4.14.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.robolectric:robolectric/4.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.robolectric:robolectric/4.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.robolectric:robolectric/4.14/4.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.robolectric:robolectric/4.14/4.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nik Clayton <nik@ngo.org.uk>
2024-11-25 12:47:07 +01:00
Nik Clayton
e009c00a76
feat: Initial support for filtering notifications by sending account (#1127)
Allow the user to define filtering rules for notifications by sending
account:

- Not followed
- Younger than 30d
- Limited by moderators

and a policy for each of either show, warn, or hide.

To do this:

## Manage followers

- Create a new `FollowingAccountEntity`, to record accounts the logged
in account is following.
- Fetch the account's followers when an account is made active, and
persist to this table.
- Provide the followers as a property on `PachliAccount`
- Update this table if the user follows/unfollows accounts during normal
operation.

## Track account creation time

- Record account creation time in `TimelineAccount`.

## Track notification creation time

- Record notification creation time in `Notification`.

## API

- Always fetch all notifications, including those the server is
filtering.

## UX and storage for account filters

- Show a new Account preference to edit account notification filters.
- Display a dialog to manage account notification filters.
- Persist the user's choice to new properties in `AccountEntity`.
- New `AccountManager` methods to update the properties

## Filtering notifications

- New `NotificationFilter.filterNotificationByAccount()` method to make
the filtering decision based on the user's preferences.
- Use this in `NotificationFetcher` to filter notifications before
creating Android notifications.
- Use this in `NotificationsViewModel` to filter notifications before
display in `NotificationsFragment`.

## UX for filtered notifications

- Display filtered (with warning) notifications inline with other
notifications, with UI to disclose the notification or edit the filters.
2024-11-25 11:35:05 +01:00
Nik Clayton
acdbf1e52f
refactor: Extract notification type icon code (#1126)
This code will be used elsewhere in an upcoming change, so extract it
now to minimise the diffs.

While I'm here, provide an icon for mentions, and an attribute for the
"favourite" colour.
2024-11-22 15:05:06 +01:00
Nik Clayton
4c7107c910
feat: Support Pleroma returning dates with no timezone (#1120)
Pleroma (and possibly other servers) can return dates that have no
timezone. Previous code would fail to deserialise JSON in this state and
show an error.

Patch around this by assuming anything with a missing timezone is in UTC
(timezone suffix "Z").

Fixes #562
2024-11-21 16:20:27 +01:00
Nik Clayton
9f908cfb7b
refactor: Convert AccountSelectionListener to fun interface (#1118)
`AccountSelectionListener` only has one method; converting to a Kotlin
`fun interface` simplifies the calling code.
2024-11-20 19:50:04 +01:00
Nik Clayton
632282d0e2
fix: Prevent crash when showing account chooser (#1117)
Chooser dialog could start before any accounts have loaded. Fix by
collecting the account flow and waiting for the first emission (convert
the flow to shared instead of state so there's no initial empty list).

Guard against the potential for a similar issue when fetching
notifications.

Order the list of accounts with active account first so that code that
skips it by ignoring the first item works correctly.
2024-11-20 19:28:29 +01:00
Nik Clayton
5c048311b2
refactor: Ensure copying text experience is consistent (#1115)
Previous code was inconsistent about whether or not a notification toast
was shown after copying text (contrary to platform guidelines), and
there was some code duplication.

Fix this with a new `ClipboardUseCase` with a `copyTextTo` method that
handles copying text to the clipboard and showing a message afterwards
(depending on platform level).
2024-11-20 14:51:24 +01:00
Nik Clayton
9ffd89b666
feat: Show extra a11y actions for trending links and suggested accounts (#1114)
Extend the "suggested accounts" accessibility actions to include any
mentions in the account's bio. Links, mentions, and hashtags are now
shown with a button to easily copy them.

Extend the "trending links" accessibility actions with a new "copy link"
action.

Consolidate common functionality in to the new
`PachliRecyclerviewAccessibilityDelegate` base class.
2024-11-20 12:47:43 +01:00
Nik Clayton
f2ed6a0dab
fix: Ensure items in accessibility dialogs are clickable (#1112)
The copy button meant that some dialogs did not return the item click.

Fix this by having the adapter listen for clicks and forward them on.
Pre-emptively move the adapter to core.ui, as it's going to be useful
for the other accessiblity delegates.

Fixes #1108
2024-11-19 15:04:22 +01:00
Nik Clayton
654a81a136
refactor: Convert account relationship API calls to use ApiResult (#1109) 2024-11-18 17:34:52 +01:00
renovate[bot]
88561afcca
fix(deps): update dependency org.robolectric:robolectric to v4.14 (#1105)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.robolectric:robolectric](http://robolectric.org)
([source](https://redirect.github.com/robolectric/robolectric)) | `4.13`
-> `4.14` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.robolectric:robolectric/4.14?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.robolectric:robolectric/4.14?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.robolectric:robolectric/4.13/4.14?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.robolectric:robolectric/4.13/4.14?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMS41IiwidXBkYXRlZEluVmVyIjoiMzkuMTEuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nik Clayton <nik@ngo.org.uk>
2024-11-17 13:43:28 +01:00
Weblate Translation Memory
cb296e9747 fix(l10n): Update Norwegian Nynorsk translations
Currently translated at 32.1% (9 of 28 strings)

Translation: Pachli/Core/Preferences : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/corepreferences-main/nn/
2024-11-16 08:13:15 +01:00
Juan M Sevilla
d36aa18e0a fix(l10n): Update Spanish translations
Currently translated at 100.0% (10 of 10 strings)

Translation: Pachli/Core/Data : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/coredata-main/es/
2024-11-16 08:13:15 +01:00
Nik Clayton
71f39b3823
fix: Ensure clientId and clientSecret are non null during db migration (#1103)
Previous migration code could crash if the `clientId` or `clientSecret`
columns were null during the migration (unclear how that could happen
but there's at least one user report of this crash).

Re-write the migration to set these columns to the empty string if NULL
first.
2024-11-16 00:24:43 +01:00
Languages add-on
81839d1de0 feat(l10n): Added Norwegian Nynorsk translation 2024-11-15 08:54:53 +01:00
Languages add-on
8d8766798d feat(l10n): Added Norwegian Nynorsk translation 2024-11-15 08:54:53 +01:00
Languages add-on
c3ef2ee691 feat(l10n): Added Norwegian Nynorsk translation 2024-11-15 08:54:53 +01:00
Languages add-on
a59bea97ea feat(l10n): Added Norwegian Nynorsk translation 2024-11-15 08:54:53 +01:00
Languages add-on
61f6a5ed96 feat(l10n): Added Norwegian Nynorsk translation 2024-11-15 08:54:53 +01:00
Languages add-on
fce8c1a5c6 feat(l10n): Added Norwegian Nynorsk translation 2024-11-15 08:54:53 +01:00
Languages add-on
f3cf2bee59 feat(l10n): Added Norwegian Nynorsk translation 2024-11-15 08:54:53 +01:00
Weblate (bot)
d7a683e6ea
fix(l10n): Translations update from Hosted Weblate (#1097)
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/Core/Data :
Main](https://hosted.weblate.org/projects/pachli/coredata-main/)

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

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

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

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

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

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

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

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

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

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

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

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



Current translation status:

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

---------

Co-authored-by: Nik Clayton <nik@ngo.org.uk>
Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
2024-11-14 01:36:43 +01:00
Nik Clayton
37169d96c5
fix: Don't crash on relationship severance events (#1092)
Previous code was missing the JSON name of the event, so it wasn't
present when it should have been, resulting in a crash.

Also, the Mastodon documentation is incorrect about the relationship
count, which is instead represented as two properties, one for followers
and one for following. So model that, and display them separately in the
UI.

Fixes #1086
2024-11-13 14:51:03 +01:00
Nik Clayton
710e209e34
refactor: Ongoing work to remove the activeAccount idiom (#964)
Continue the work to remove the "activeAccount" idiom.

- Uses a new PachliAccount type through most of the app. This holds
information that was previously accessed separately (e.g., content
filters, lists) in one place. The information is loaded when the app
launches or the active account switches.

- Fetching data when the account is switched / loaded simplifies error
handling, as more code can now assume the data has already been loaded.
If it hasn't the code path is simply unreachable.

- This opens up the possibility of "acting as one account while logged
in as another". E.g., have two accounts, and be logged in to one account
and boost a post you've seen from your other account.

- Add a database migration to populate existing accounts with default
data when the user updates the app.

- Refactor code that used those list and filter repositories to get the
data from the PachliAccount instead. New local and remote data sources
are implemented, and the list and filter repositories mediate between
those sources.

- Start a ViewModel for MainActivity, which includes:
  - Sending user actions as UiAction objects
  - Providing a flow of uiState for MainActivity to react to
  - Remove most uses of SharedPreferencesRepository from MainActivity
  - Show messages about errors that occur when logging in

- Refactor intent routing in MainActivity to make the logic clearer.

- Add new `core.data` types to push more `core.network` types out of the
UI code
  - `core.data.model.MastodonList` for `core.network.model.MastoList`
  - `core.data.model.Server` for `core.network.model.Server`

- Continue the work to send the Pachli account ID to the code that uses
it.
  - Most view models now get the account ID via assisted injection.
- QueuedMedia now includes the AccountEntity so it can operate with any
account. Modify the `uploadMedia` API call to include explicit
authentication details.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-13 11:45:16 +01:00
Weblate (bot)
c437722c1c
fix(l10n): Translations update from Hosted Weblate (#1077)
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/Core/Data :
Main](https://hosted.weblate.org/projects/pachli/coredata-main/)

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

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

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

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

* [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/Feature/About :
Main](https://hosted.weblate.org/projects/pachli/featureabout-main/)

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

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

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

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

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



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/pachli/fastlane-metadata/horizontal-auto.svg)
2024-11-04 12:16:37 +01:00
Weblate (bot)
e63ee8f834
fix(l10n): Translations update from Hosted Weblate (#1063)
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/Core/Preferences :
Main](https://hosted.weblate.org/projects/pachli/corepreferences-main/)

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

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

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

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

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

* [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/Core/Activity :
Orange](https://hosted.weblate.org/projects/pachli/coreactivity-orange/)

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

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



Current translation status:

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

---------

Co-authored-by: Aindriú Mac Giolla Eoin <aindriu80@gmail.com>
Co-authored-by: LibreTranslate <noreply-mt-libretranslate@weblate.org>
Co-authored-by: Nik Clayton <nik@ngo.org.uk>
Co-authored-by: Kalle Kniivilä <kalle.kniivila@gmail.com>
2024-11-01 18:09:25 +01:00
Nik Clayton
8b192ab18d
change: Bump compileSdk to 35 (#1070) 2024-10-31 19:38:22 +01:00
Nik Clayton
abfd3240bd
fix: Don't lose images / captions when editing with failed uploads (#1054)
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.

Fixes #879
2024-10-30 14:33:16 +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
2f3895d2c4
fix: Allow nullable sensitive and spoiler_text status params (#1058)
This matches the API description and prevents an error when parsing JSON
responses.

Fixes #1057
2024-10-29 15:14:07 +01:00
Weblate (bot)
24e0c16b3f
fix(l10n): Translations update from Hosted Weblate (#1053)
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 :
Fdroid](https://hosted.weblate.org/projects/pachli/app-fdroid/)

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

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

* [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/Designsystem :
Main](https://hosted.weblate.org/projects/pachli/coredesignsystem-main/)

* [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/Feature/Lists :
Main](https://hosted.weblate.org/projects/pachli/featurelists-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/App :
Main](https://hosted.weblate.org/projects/pachli/app-main/)



Current translation status:

![Weblate translation
status](https://hosted.weblate.org/widget/pachli/fastlane-metadata/horizontal-auto.svg)
2024-10-27 12:38:21 +01:00
Nik Clayton
67fe600f2c
Revert "fix: Don't lose images / captions when editing with failed uploads"
This reverts commit 7abd74ad88168ad4534f3b1603a6d31d5fe2a27b.
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
Weblate Translation Memory
d21fbc2005 fix(l10n): Update Lithuanian translations
Currently translated at 60.7% (17 of 28 strings)

Translation: Pachli/Core/Preferences : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/corepreferences-main/lt/
2024-10-24 22:47:26 +02:00
Weblate Translation Memory
11f9e73ca1 fix(l10n): Update Slovak translations
Currently translated at 100.0% (28 of 28 strings)

Translation: Pachli/Core/Preferences : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/corepreferences-main/sk/
2024-10-24 22:47:26 +02:00
LibreTranslate
88df0b9f89 fix(l10n): Update Slovak translations
Currently translated at 100.0% (28 of 28 strings)

Translation: Pachli/Core/Preferences : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/corepreferences-main/sk/
2024-10-24 22:47:26 +02:00
LibreTranslate
31d008c65e fix(l10n): Update Hebrew translations
Currently translated at 100.0% (28 of 28 strings)

Translation: Pachli/Core/Preferences : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/corepreferences-main/he/
2024-10-24 22:47:26 +02:00
Weblate Translation Memory
cd178204e7 fix(l10n): Update English (United Kingdom) translations
Currently translated at 39.2% (11 of 28 strings)

Translation: Pachli/Core/Preferences : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/corepreferences-main/en_GB/
2024-10-24 22:47:26 +02:00
Weblate Translation Memory
5a34b705c3 fix(l10n): Update Greek translations
Currently translated at 100.0% (28 of 28 strings)

Translation: Pachli/Core/Preferences : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/corepreferences-main/el/
2024-10-24 22:47:26 +02:00
LibreTranslate
a44f822242 fix(l10n): Update Greek translations
Currently translated at 100.0% (28 of 28 strings)

Translation: Pachli/Core/Preferences : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/corepreferences-main/el/
2024-10-24 22:47:26 +02:00