4386 Commits

Author SHA1 Message Date
தமிழ்நேரம்
7b9131cd4d fix(l10n): Update Tamil translations
Currently translated at 100.0% (2 of 2 strings)

Translation: Pachli/App : Google
Translate-URL: https://hosted.weblate.org/projects/pachli/app-google/ta/
2025-01-28 13:52:10 +01:00
Nik Clayton
0a42ab0b37
fix: Scroll and restore position correctly in Home and Notifications (#1240)
These are cached timelines, backed by Room. Room **requires** the
`PagingConfig` to have `enablePlaceholders = true`. Otherwise the list
is corrupted when scrolling down the list and paging in new items.

To restore the user's reading position correctly in the UI, wait for the
adapter to emit the very first page. Combine this with the user's
refresh key, and the number of placeholders in the page, to scroll the
user to the correct place in the list.

To make all this work, ensure that Room loads a large enough page of
data around the refresh key (in the `initialKey` calculation).
2025-01-28 10:57:18 +01:00
Nik Clayton
353f123b5d
fix: Show an error message if a Dao error occurs during login (#1235)
Previous code would crash on an SQLiteException. Catch it and convert to
a specific error.
2025-01-25 16:06:04 +01:00
Nik Clayton
b1ed66fe73
chore: Log after updating the notification marker (#1232)
Suspect a crash is occurring in the database update on the preceding
line. Log afterwards; if the log entry is missing the crash location
is confirmed.
2025-01-24 18:16:06 +01:00
Nik Clayton
5f67f9938c
fix: Ensure coroutine cancellations propograte, rethrow CancellationException (#1231)
Previous code had legacy `try ... catch` blocks that could catch all
exceptions, including `CancellationException`, thrown if the job of a
suspending function is cancelled.

Indiscriminately catching those can interfere with cancellation, so use
`currentCoroutineContext().ensureActive()` to rethrow the exception if
the job has been cancelled.
2025-01-24 18:04:46 +01:00
Nik Clayton
8ad1a37991
refactor: Collect distinct loadstates to minimise churn (#1230) 2025-01-24 17:40:15 +01:00
Nik Clayton
7bf322c4f3
refactor: Use same patterns as Notifications* implementation (#1222)
The modifications to the Notifications* classes highlighted different
(and better) ways of writing the code that manages status timelines.
Follow those practices here.

Changes include:

- Move `pachliAccountId` in to `IStatusViewData` so the adapter does not
need to be initialised with the information. This allows the parameter
to be removed from functions that operate on `IStatusViewData`, and the
adapter does not need to be marked `lateinit`.

- Convert Fragment/ViewModel communication to use the `uiResult`
pattern instead of separate `uiSuccess` and `uiError`.

- Show a `LinearProgressIndicator` when refreshing the list.

- Restore the reading position more smoothly by responding when the
first page of results is loaded.

- Save the reading position to `RemoteKeyEntity` instead of a dedicated
property in `AccountEntity`.

- Fixed queries for returning the row number of a notification or
status in the database.

Fixes #238, #872, #928, #1190
2025-01-23 13:23:17 +01:00
Nik Clayton
e8e84a1538
feat: Persist notification filtering decisions locally (#1196)
Persist the user's notification filtering decisions (i.e., the decision
to show a filtered notification) by caching all notification data,
including the filtering decision, in the database.

## Structure changes

This means re-writing the notification management system to use Room and
the Paging library to manage the notification data.

Implement a repository and remote mediator for notifications that does
this, with knock on effects for the viewmodel and the fragment. Take the
opportunity to rewrite these to reflect (current understanding of) best
practice for state management.

Active account information is included in the viewdata for each
notification when sent to the adapter. This allows the adapter to be
created before the fragment knows the active account from the view
model.

`RemoteKeyDao` is extended to support sorting the "refresh" key for
a timeline. This is used to persist the notifications refresh key
instead of the `lastNotificationId` property in the account (which has
been removed).

## UX changes

A linear progress bar is used to show progress when notifications are
refreshed, as part of the ongoing effort to migrate the UI.
2025-01-19 22:24:30 +01:00
Sunniva Løvstad
972d1bd291 fix(l10n): Update Norwegian Nynorsk translations
Currently translated at 100.0% (744 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/nn/
2025-01-19 21:05:53 +01:00
Juan M Sevilla
69caad845b fix(l10n): Update Spanish translations
Currently translated at 100.0% (744 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/es/
2025-01-19 21:05:53 +01:00
Nik Clayton
40370e607e
fix: Show lists sorted by title (#1218)
Some parts of the UI already showed lists sorted by title, but not all.

The areas fixed are:

- The list of lists in the main drawer (left side navitation)
- The list of lists when adding/removing an account from a list

Fixes #1168
2025-01-18 18:02:29 +01:00
Sunniva Løvstad
a5ef69e08d fix(l10n): Update Norwegian Nynorsk translations
Currently translated at 100.0% (744 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/nn/
2025-01-16 19:12:30 +01:00
jens persson
d0881843c5 fix(l10n): Update Swedish translations
Currently translated at 79.4% (591 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/sv/
2025-01-16 19:12:30 +01:00
Aindriú Mac Giolla Eoin
47de616922 fix(l10n): Update Irish translations
Currently translated at 100.0% (744 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/ga/
2025-01-16 19:12:30 +01:00
--//--
f02b798eb9 fix(l10n): Update Burmese translations
Currently translated at 100.0% (2 of 2 strings)

Translation: Pachli/App : Fdroid
Translate-URL: https://hosted.weblate.org/projects/pachli/app-fdroid/my/
2025-01-16 19:12:30 +01:00
--//--
4fc4ca56f8 fix(l10n): Update Burmese translations
Currently translated at 32.1% (239 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/my/
2025-01-16 19:12:30 +01:00
Anonymous
961a194fba fix(l10n): Update Norwegian Nynorsk translations
Currently translated at 99.8% (743 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/nn/
2025-01-16 19:12:30 +01:00
Anonymous
4347f484b8 fix(l10n): Update Vietnamese translations
Currently translated at 68.9% (513 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/vi/
2025-01-16 19:12:30 +01:00
Anonymous
6e8fc9e500 fix(l10n): Update Swedish translations
Currently translated at 76.6% (570 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/sv/
2025-01-16 19:12:30 +01:00
Anonymous
4c5ea8d65d fix(l10n): Update Portuguese (Brazil) translations
Currently translated at 73.1% (544 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/pt_BR/
2025-01-16 19:12:30 +01:00
Anonymous
79af9f810a fix(l10n): Update Norwegian Bokmål translations
Currently translated at 99.8% (743 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/nb_NO/
2025-01-16 19:12:30 +01:00
Anonymous
1de8e36ae3 fix(l10n): Update Galician translations
Currently translated at 95.4% (710 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/gl/
2025-01-16 19:12:30 +01:00
Anonymous
b0fe582fea fix(l10n): Update Irish translations
Currently translated at 99.4% (740 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/ga/
2025-01-16 19:12:30 +01:00
Anonymous
1a99c64734 fix(l10n): Update Finnish translations
Currently translated at 99.8% (743 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/fi/
2025-01-16 19:12:30 +01:00
Anonymous
402376a127 fix(l10n): Update Persian translations
Currently translated at 68.9% (513 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/fa/
2025-01-16 19:12:30 +01:00
Anonymous
7132883b22 fix(l10n): Update Spanish translations
Currently translated at 99.8% (743 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/es/
2025-01-16 19:12:30 +01:00
Anonymous
fce77df257 fix(l10n): Update German translations
Currently translated at 73.2% (545 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/de/
2025-01-16 19:12:30 +01:00
Anonymous
2ca9fb2b17 fix(l10n): Update Welsh translations
Currently translated at 68.9% (513 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/cy/
2025-01-16 19:12:30 +01:00
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
Nik Clayton
670eb0e0ae
chore: Prepare release 2.9.1 (versionCode 25) (#1191) 2024-12-30 13:20:19 +01:00
Nik Clayton
edc7692cd3
fix: Show bold text correctly in many locales (#1189)
Previous translations used `<b>` instead of escaping the opening bracket
(`&lt;b>`) so the styling was being lost, per
https://developer.android.com/guide/topics/resources/string-resource#StylingWithHTML.
2024-12-30 12:50:59 +01:00
Kalle Kniivilä
8116fcbb55 fix(l10n): Update Finnish translations
Currently translated at 100.0% (744 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/fi/
2024-12-30 11:43:29 +01:00
Kalle Kniivilä
88d3f60a60 fix(l10n): Update Finnish translations
Currently translated at 100.0% (744 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/fi/
2024-12-23 12:33:00 +01:00
jens persson
5274406589 fix(l10n): Update Swedish translations
Currently translated at 76.7% (571 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-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
bafd8e474d
fix: "KeyStoreException: BKS not found" error during login (#1182)
"BKS" in the error refers to "Bouncycastle KeyStore". Remove all usage
of the Bouncycastle library from the code, re-implementing one required
function based on code from SubwayTooter. Add a license entry that
acknowledges this.

Fixes #1143
2024-12-16 18:17:23 +01:00
Nik Clayton
ed77d7aeb3
fix: Don't show "Remove tab" menu if there are no tabs (#1179)
Prevents a crash that would otherwise occur.
2024-12-13 15:18:01 +01:00
Nik Clayton
002ad8e750 fix(l10n): Update Spanish translations
Currently translated at 100.0% (744 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/es/
2024-12-11 17:15:54 +01:00
Juan M Sevilla
ef0239cf3f fix(l10n): Update Spanish translations
Currently translated at 100.0% (744 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/es/
2024-12-11 17:15:54 +01:00
Juan M Sevilla
a340f2f5d8 fix(l10n): Update Spanish translations
Currently translated at 99.8% (743 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/es/
2024-12-11 17:15:54 +01:00
Nik Clayton
1a85f27a93
feat: Add Norsk Nynorsk as a selectable language (#1162)
Fixes #1159
2024-12-08 15:18:11 +01:00
Sunniva Løvstad
55ed71a52f fix(l10n): Update Norwegian Nynorsk translations
Currently translated at 100.0% (744 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/nn/
2024-12-08 15:00:29 +01:00
Sunniva Løvstad
f99d0da0b3 fix(l10n): Update Norwegian Bokmål translations
Currently translated at 100.0% (744 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/nb_NO/
2024-12-08 15:00:29 +01:00
sunniva
e4780ecf38 fix(l10n): Update Norwegian Nynorsk translations
Currently translated at 88.7% (660 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/nn/
2024-12-08 15:00:29 +01:00
sunniva
d8f2d1d2fe fix(l10n): Update Norwegian Bokmål translations
Currently translated at 100.0% (744 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/nb_NO/
2024-12-08 15:00:29 +01:00
Sunniva Løvstad
743d5cd905 fix(l10n): Update Norwegian Bokmål translations
Currently translated at 100.0% (744 of 744 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/nb_NO/
2024-12-08 15:00:29 +01:00
Aindriú Mac Giolla Eoin
29de2c4aac fix(l10n): Update Irish translations
Currently translated at 100.0% (741 of 741 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/ga/
2024-12-06 13:35:44 +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