Commit Graph

5432 Commits

Author SHA1 Message Date
Nik Clayton 56b0505955 change: Remove obsolete @Suppress annotations 2024-04-30 16:23:34 +02:00
Nik Clayton 1f50a9cbe7 change: Remove unnecessary types 2024-04-30 16:23:34 +02:00
Nik Clayton 01887d427b change: Remove unnecessary `constructor` keyword 2024-04-30 16:23:34 +02:00
Nik Clayton 4ddd23dda6 change: Correct constructor parameter visibility 2024-04-30 16:23:34 +02:00
Nik Clayton c8532c9fb4 change: Remove dead code 2024-04-30 16:23:34 +02:00
Nik Clayton 6fd993acf6 change: Use supportFragmentManager.commit 2024-04-30 16:23:34 +02:00
Nik Clayton 286a152fde change: Move MediaUploadApi to the correct package 2024-04-30 16:23:34 +02:00
Nik Clayton 2d0cf6c17e change: Mark some properties private 2024-04-30 16:23:34 +02:00
Nik Clayton bf474a5eef
fix(deps): update dependency androidx.core:core-ktx to v1.13.0 (#673)
Use `GestureDetector` as this release deprecates
`GestureDetectorCompat`.
2024-04-30 16:14:11 +02:00
renovate[bot] 7102c359db
fix(deps): update dependency com.github.ajalt.clikt:clikt to v4.4.0 (#660)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.github.ajalt.clikt:clikt](https://togithub.com/ajalt/clikt) |
`4.3.0` -> `4.4.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.github.ajalt.clikt:clikt/4.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.github.ajalt.clikt:clikt/4.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.github.ajalt.clikt:clikt/4.3.0/4.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.github.ajalt.clikt:clikt/4.3.0/4.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

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

---

### Release Notes

<details>
<summary>ajalt/clikt (com.github.ajalt.clikt:clikt)</summary>

###
[`v4.4.0`](https://togithub.com/ajalt/clikt/blob/HEAD/CHANGELOG.md#440)

[Compare Source](https://togithub.com/ajalt/clikt/compare/4.3.0...4.4.0)

##### Added

-   Publish `linuxArm64` and `wasmJs` targets.

##### Changed

- In a subcommand with `argument().multiple()`, the behavior is now the
same regardless of the value of `allowMultipleSubcommands`: if a token
matches a subcommand name, it's now treated as a subcommand rather than
a positional argument.
- Due to changes to the internal parsing algorithm, the exact details of
error messages when multiple usage errors occur have changed in some
cases.
- **Breaking Change:** Moved the following parameters from
`CliktCommand`'s constructor; override the corresponding properties
instead:

    | removed parameter           | replacement property            |
    |-----------------------------|---------------------------------|
    | `help`                      | `fun help`                      |
    | `epilog`                    | `fun helpEpilog`                |
    | `invokeWithoutSubcommand`   | `val invokeWithoutSubcommand`   |
    | `printHelpOnEmptyArgs`      | `val printHelpOnEmptyArgs`      |
    | `helpTags`                  | `val helpTags`                  |
    | `autoCompleteEnvvar`        | `val autoCompleteEnvvar`        |
    | `allowMultipleSubcommands`  | `val allowMultipleSubcommands`  |
    | `treatUnknownOptionsAsArgs` | `val treatUnknownOptionsAsArgs` |
    | `hidden`                    | `val hiddenFromHelp`            |
- The following methods on `CliktCommand` have been renamed:
`commandHelp` -> `help`, `commandHelpEpilog` -> `epilog`. The old names
are deprecated.
- **Breaking Change:** `CliktCommand.main` and `CliktCommand.parse` are
now extension functions rather than methods.

##### Fixed

- Fixed excess arguments not being reported when
`allowMultipleSubcommands=true` and a subcommand has excess arguments
followed by another subcommand.

##### Deprecated

- Deprecated `Context.originalArgv`. It will now always return an empty
list. If your commands need an argv, you can pass it to them before you
run them.

##### Removed

-   Removed previously deprecated experimental annotations.

</details>

---

### 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMyMS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-30 14:42:55 +02:00
renovate[bot] 9b740a0b8d
fix(deps): update dependency com.squareup.leakcanary:leakcanary-android to v2.14 (#656)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[com.squareup.leakcanary:leakcanary-android](https://togithub.com/square/leakcanary)
| `2.13` -> `2.14` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.squareup.leakcanary:leakcanary-android/2.14?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.squareup.leakcanary:leakcanary-android/2.14?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.squareup.leakcanary:leakcanary-android/2.13/2.14?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.squareup.leakcanary:leakcanary-android/2.13/2.14?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

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

---

### Release Notes

<details>
<summary>square/leakcanary
(com.squareup.leakcanary:leakcanary-android)</summary>

### [`v2.14`](https://togithub.com/square/leakcanary/releases/tag/v2.14)

See [Change Log](https://square.github.io/leakcanary/changelog)

</details>

---

### 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMyMS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-30 14:39:26 +02:00
renovate[bot] 7c38ccfdcd
chore(deps): update gradle/actions digest to db19848 (#653)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [gradle/actions](https://togithub.com/gradle/actions) | action |
digest | `750cdda` -> `db19848` |

---

> [!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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMyMS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-30 14:39:04 +02:00
Nik Clayton 2236f53838
fix: Show edit history for status' with polls (#672)
Edited polls only include the list of options with titles; no other
metadata (poll ID, single/multiple choice, vote counts, etc). Since the
data shape didn't match Moshi wasn't decoding the data.

Provide dedicated data classes to model the response, and add a fourth
poll display option to represent viewing an edit history snapshot.
2024-04-30 14:38:36 +02:00
renovate[bot] c175e1efcd
chore(deps): update actions/checkout digest to 0ad4b8f (#651)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://togithub.com/actions/checkout) | action |
digest | `1d96c77` -> `0ad4b8f` |

---

> [!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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMyMS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-30 14:38:16 +02:00
Nik Clayton c7783b65f9
refactor: Use AppCompatResources.getDrawable() (#671)
Replace `ContextCompat.getDrawable()`, as the app-compat version has
platform fixes and backports.

appcompat-lint warns about bare `context.getDrawable()`, but does not
cover `ContextCompat` (https://issuetracker.google.com/issues/337905331)
2024-04-30 13:30:19 +02:00
Nik Clayton c6d6f0f810
chore: Prepare release 2.5.1 (versionCode 15) (#670) 2024-04-29 18:52:34 +02:00
Nik Clayton 22729df1b7
fix: Only enable accessible actions on notifications attached to a status
Fixes #669
2024-04-29 18:43:39 +02:00
Nik Clayton fc5061f777
chore: Prepare release 2.5.0 (versionCode 14) (#668) 2024-04-29 12:44:59 +02:00
Nik Clayton 859ea9642b
docs: Change title to "Pachli for Mastodon" (#667) 2024-04-29 11:55:20 +02:00
Miles Krell 6fed74099a fix(l10n): Update Spanish translations
Currently translated at 100.0% (609 of 609 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/es/
2024-04-29 08:58:44 +02:00
Nik Clayton af3aae00e8
ci: Run CI on release as well as debug builds (#664)
Experiment to see if CI can run on release builds without a large
performance impact.
2024-04-29 00:06:48 +02:00
Nik Clayton e65bc13184
fix: Mark tab drag icon as unimportant for accessiblity (#663)
Talkback was speaking it as "Unlabeled". It's not necessary for
Talkback, as the tab name describes it in the list.
2024-04-28 23:53:38 +02:00
Nik Clayton f771dd7026
fix: Enable talkback actions in notifications and conversations (#661)
`ListStatusAccessiblityDelegate` was ignoring notifications because it
was checking the status against the concrete `StatusViewData` and not
the interface `IStatusViewData`.

Fix that and now notifications have accessibility actions.

`ConversationsFragment` didn't set the accessibility delegate, so no
actions appeared. Fix that so they do.
2024-04-28 23:46:11 +02:00
Miles Krell b4780b146c
fix(docs): fix broken link from README.md to CODE_OF_CONDUCT.md (#657) 2024-04-28 22:19:05 +02:00
Nik Clayton 362cdfeb27
fix: Prevent crash when Pachli is a share target (#659)
Crash was occuring because the instance info hadn't been fetched, trying
to take the last item of an empty list.

To fix:

- Expose the instance info as a state flow, with a default. New instance
info is fetched whenever the active account changes.

- Do the same for the emojis supported by the server.

- Update call sites as appropriate.

- Mark `InstanceInfoRepository` as `@Singleton` so it isn't repeatedly
created causing fresh content fetches.

The tests needed updating to get this to work.

- Extract the network fake modules in to a network-test module so
multiple other modules can use them.

- Rewrite `InstanceInfoRepositoryTest` to use Hilt and use Turbine to
test the new flows.

Checking this showed cosmetic bugs in the About layout when instance
info is missing, clean those up.
2024-04-28 18:19:13 +02:00
Miles Krell 1f4930ff79 fix(l10n): Update Spanish translations
Currently translated at 100.0% (606 of 606 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/es/
2024-04-27 02:08:54 +02:00
Miles Krell 2a38f8e926 fix(l10n): Update Spanish translations
Currently translated at 100.0% (17 of 17 strings)

Translation: Pachli/Feature/Login
Translate-URL: https://hosted.weblate.org/projects/pachli/featurelogin/es/
2024-04-27 02:08:54 +02:00
Miles Krell 6ac2a317b1 fix(l10n): Update Spanish translations
Currently translated at 100.0% (16 of 16 strings)

Translation: Pachli/Fastlane Metadata
Translate-URL: https://hosted.weblate.org/projects/pachli/fastlane-metadata/es/
2024-04-27 02:08:54 +02:00
Nik Clayton 78cda01ec8
change: Adjust SwipeRefreshLayout offset in AccountActivity (#652)
The change in 5959d23d resulted in a stuck margin when scrolling up in
the account view.

Fix the `SwipeRefreshLayout` offset in a different way that doesn't have
that problem; move the spinner's start position to the top of the screen
(instead of the negative offset it normally has) and keep the same
relative offset from the end position.

Have it scale in on the drag to complete the effect.
2024-04-27 00:15:21 +02:00
Nik Clayton 93e6b38d43
feat: Update activity transitions, prepare for predictive-back (#650)
Previous code used a single animation type (slide) when transitioning,
the transition was quite slow, and didn't behave appropriately if the
device was set to a RTL writing system.

In addition, handling the back affordance didn't work well with the new
"Predictive Back" feature in Android 14

(https://developer.android.com/guide/navigation/custom-back/predictive-back-gesture).

Fix this.

## Transitions

To update the transitions the `startActivityWithSlideInAnimation()`
implementation (and associated `finishWithoutSlideOutAnimation()`) have
been replaced.

There are three transitions; `default`, `slide`, and `explode`,
represented as an enum passed to the activity intent.

The `default` transition is the activity transition from Android 14,
from the Android open source project

(https://cs.android.com/android/platform/superproject/+/android-14.0.0_r18:frameworks/base/core/res/res/anim/;bpv=1).
This is used for most transitions.

The `slide` transition is the pre-existing slide transition, with a
shorter transition time so it feels more responsive, and an RTL
implementation. This is used when there is a strong spatial component to
the navigation, for example, when going from:

- a status to its thread
- a preference menu item to its subscreen
- a filter in a list to the "edit filter" screen
- viewing your profile to editing your profile

The `explode` transition is used when the state of the app changes
significantly, such as when switching accounts.

Activities are now started with `startActivityWithTransition()` which
sets the intent and prepares the transition. `BaseActivity` checks the
intent for the transition type and makes further changes to the
transition as necessary.

## Predictive back

"Predictive back" needs to know what the back button would do before the
user interacts with it with an `onBackPressedCallback` that is either
enabled or disabled. This required refactoring some code (particularly
in `ComposeActivity`) to gather data ahead of time and enable/disable
the callback appropriately.

## Fixed bugs

- Back button wasn't stepping back through the tabs in AccountActivity
- Modifying a filter and pressing back without saving wasn't prompting
the user to save the changes
- Writing a content warning and then hiding it would still count the
text of the content warning toward's the post's length

## Other cleanups

- Use `ViewCompat.setTransitionName()` instead of setting the
`transitionName` property
- Delete the unused `fade_in` and `fade_out` animations.
- Use androidx-activity 1.9.0 to get the latest predictive back support
library code
- Show validation errors when creating / editing filters
2024-04-26 23:18:30 +02:00
renovate[bot] 2b3cbb6465
chore(deps): update ytanikin/prconventionalcommits action to v1.2.0 (#646)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[ytanikin/PRConventionalCommits](https://togithub.com/ytanikin/PRConventionalCommits)
| action | minor | `1.1.0` -> `1.2.0` |

---

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

---

### Release Notes

<details>
<summary>ytanikin/PRConventionalCommits
(ytanikin/PRConventionalCommits)</summary>

###
[`v1.2.0`](https://togithub.com/ytanikin/PRConventionalCommits/releases/tag/1.2.0)

[Compare
Source](https://togithub.com/ytanikin/PRConventionalCommits/compare/1.1.0...1.2.0)

#### What's Changed

- docs: remove `v` from `uses` examples in README.md by
[@&#8203;twhiston](https://togithub.com/twhiston) in
[https://github.com/ytanikin/PRConventionalCommits/pull/1](https://togithub.com/ytanikin/PRConventionalCommits/pull/1)
- build(deps-dev): bump
[@&#8203;babel/traverse](https://togithub.com/babel/traverse) from
7.22.4 to 7.23.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/ytanikin/PRConventionalCommits/pull/3](https://togithub.com/ytanikin/PRConventionalCommits/pull/3)
- fix: Run on Node.js@20 by
[@&#8203;WillGibson](https://togithub.com/WillGibson) in
[https://github.com/ytanikin/PRConventionalCommits/pull/6](https://togithub.com/ytanikin/PRConventionalCommits/pull/6)
- fix: Use conventional-commits/parser to fix case where both scope and
breaking changes are present by
[@&#8203;Danh4](https://togithub.com/Danh4) in
[https://github.com/ytanikin/PRConventionalCommits/pull/9](https://togithub.com/ytanikin/PRConventionalCommits/pull/9)

#### New Contributors

- [@&#8203;twhiston](https://togithub.com/twhiston) made their first
contribution in
[https://github.com/ytanikin/PRConventionalCommits/pull/1](https://togithub.com/ytanikin/PRConventionalCommits/pull/1)
- [@&#8203;dependabot](https://togithub.com/dependabot) made their first
contribution in
[https://github.com/ytanikin/PRConventionalCommits/pull/3](https://togithub.com/ytanikin/PRConventionalCommits/pull/3)
- [@&#8203;WillGibson](https://togithub.com/WillGibson) made their first
contribution in
[https://github.com/ytanikin/PRConventionalCommits/pull/6](https://togithub.com/ytanikin/PRConventionalCommits/pull/6)
- [@&#8203;Danh4](https://togithub.com/Danh4) made their first
contribution in
[https://github.com/ytanikin/PRConventionalCommits/pull/9](https://togithub.com/ytanikin/PRConventionalCommits/pull/9)

**Full Changelog**:
https://github.com/ytanikin/PRConventionalCommits/compare/1.1.0...1.2.0

</details>

---

### 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-24 12:26:49 +02:00
renovate[bot] ae8c74c16c
fix(deps): update dependency ch.qos.logback:logback-classic to v1.5.6 (#644)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ch.qos.logback:logback-classic](http://logback.qos.ch)
([source](https://togithub.com/qos-ch/logback),
[changelog](https://logback.qos.ch/news.html)) | `1.5.5` -> `1.5.6` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/ch.qos.logback:logback-classic/1.5.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/ch.qos.logback:logback-classic/1.5.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/ch.qos.logback:logback-classic/1.5.5/1.5.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/ch.qos.logback:logback-classic/1.5.5/1.5.6?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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-24 12:07:49 +02:00
Nik Clayton 12eccb63ae
refactor: Prefer System.currentTimeMillis() to Date().getTime() (#645)
Avoids unnecessary object creation.

Add a lint rule to catch this.
2024-04-24 12:07:05 +02:00
Nik Clayton 3e1d94ded2
feat: Use Let's Encrypt certificates on API 23 devices (#640)
Android 7 devices no longer trust certificates issued by Let's Encrypt
(see https://letsencrypt.org/2020/11/06/own-two-feet and
https://letsencrypt.org/2023/07/10/cross-sign-expiration.html for
details).

To work around that provide the Let's Encrypt root certs as resources.

On API 24+ devices add those via network_security_config.xml.

On API 23 devices they need to be installed manually for OkHttp SSL
connections, and checked when there is an SSL error in
LoginWebViewActivity.

The root certificates were downloaded from
https://letsencrypt.org/certificates/:

- https://letsencrypt.org/certs/isrgrootx1.der (self-signed)
- https://letsencrypt.org/certs/isrg-root-x1-cross-signed.der
(cross-signed)
- https://letsencrypt.org/certs/isrg-root-x2.der (self-signed)
- https://letsencrypt.org/certs/isrg-root-x2-cross-signed.der
(cross-signed)

Fixes #638
2024-04-24 10:32:50 +02:00
renovate[bot] fefeb0a653
chore(deps): update plugin com.gradle.develocity to v3.17.2 (#639)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| com.gradle.develocity | `3.17.1` -> `3.17.2` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.gradle.develocity/3.17.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.gradle.develocity/3.17.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.gradle.develocity/3.17.1/3.17.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.gradle.develocity/3.17.1/3.17.2?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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-23 22:27:15 +02:00
Miles Krell f6bcded976 fix(l10n): Update Spanish translations
Currently translated at 100.0% (21 of 21 strings)

Translation: Pachli/Feature/Lists : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/featurelists-main/es/
2024-04-23 22:25:56 +02:00
Miles Krell d4105ecf2f fix(l10n): Update Spanish translations
Currently translated at 100.0% (12 of 12 strings)

Translation: Pachli/Core/Ui : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/coreui-main/es/
2024-04-23 22:25:56 +02:00
Miles Krell 4fdb997d7e fix(l10n): Update Spanish translations
Currently translated at 100.0% (606 of 606 strings)

Translation: Pachli/App : Main
Translate-URL: https://hosted.weblate.org/projects/pachli/app-main/es/
2024-04-23 22:25:56 +02:00
Nik Clayton 5959d23d89
change: Move SwipeRefreshLayout margin in AccountActivity (#642)
AccountActivity is full screen, so the swipe spinner was appearing very
close to the top system bar. Adjust the spinner's top margin to avoid
the system bar, and have it scale in/out so it doesn't appear to slide
out from an invisible barrier.
2024-04-23 15:58:32 +02:00
Nik Clayton 9e954a2c8b
ci: apk-on-comment: Checkout by SHA (#641)
apk-on-comment checkout is failing on PRs from forked repositories,
possibly because it can't find the ref.

Try and fix this by using the SHA when checking out.
2024-04-23 15:26:17 +02:00
Nik Clayton b3bce36ccc
fix: Improve transitions in/out of playing video (#636)
Previous code didn't trigger the transition from `ViewMediaActivity`
when playing a video until the video had loaded. If the connection was
slow or had other issues this resulted in the video "sticking" in the
timeline until it loaded.

Change this, and trigger the transition immediately.

Fixes #598

While looking at this:

- Save the play/pause state of the video during a swipe, pause the
video, and restore the state when the swipe is cancelled.
- Transition the entire video view, to improve the animated transition
back to the activity.
- Remove the custom progress spinner, use the one provided by the
player.
- Display the player controller via the layout XML instead of code
2024-04-23 11:35:11 +02:00
renovate[bot] 4fe612a4b4
chore(deps): update actions/upload-artifact digest to 6546280 (#637)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/upload-artifact](https://togithub.com/actions/upload-artifact)
| action | digest | `5d5d22a` -> `6546280` |

---

> [!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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-23 11:34:06 +02:00
renovate[bot] d2e8e26563
chore(deps): update actions/checkout digest to 1d96c77 (#635)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://togithub.com/actions/checkout) | action |
digest | `b4ffde6` -> `1d96c77` |

---

> [!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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMTMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-22 21:35:01 +02:00
Nik Clayton aa930f3a6f
feat: Fetch more trending posts, links, and hashtags (#634)
The previous code didn't set a limit for the number of posts, links, and
hashtags to fetch on the trending pages, so used the conservative
defaults.

Increase these to the API maximums to show the user more information.
2024-04-22 21:34:22 +02:00
renovate[bot] 7e335ed51c
fix(deps): update dependency com.ibm.icu:icu4j to v75 (#630)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.ibm.icu:icu4j](https://icu.unicode.org/)
([source](https://togithub.com/unicode-org/icu)) | `74.2` -> `75.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.ibm.icu:icu4j/75.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.ibm.icu:icu4j/75.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.ibm.icu:icu4j/74.2/75.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.ibm.icu:icu4j/74.2/75.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

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

---

### Release Notes

<details>
<summary>unicode-org/icu (com.ibm.icu:icu4j)</summary>

###
[`v75.1`](https://togithub.com/unicode-org/icu/compare/release-74-2...release-75-1)

[Compare
Source](https://togithub.com/unicode-org/icu/compare/release-74-2...release-75-1)

</details>

---

### 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMDEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjMxMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-22 20:40:51 +02:00
renovate[bot] e05fe26493
chore(deps): update gradle/actions digest to 750cdda (#614)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [gradle/actions](https://togithub.com/gradle/actions) | action |
digest | `6cec5d4` -> `750cdda` |

---

> [!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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjMwMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-22 20:40:29 +02:00
Nik Clayton b0d63e4243
fix: Update PageCache to handle non-chronological ordering (#633)
The PageCache implementation wasn't properly dealing with timelines that
could return statuses in non-chronological order.

For example, if you bookmark a recent status, then go back in the
timeline and bookmark an older status; the bookmarks timeline is ordered
by the time of the bookmark event, not the creation time of the status
that was bookmarked.

If a sufficiently old status was bookmarked so it straddled a page
boundary you could have a situation where the range of status IDs in two
different cached pages overlapped.

E.g., this log extract:

```
0: k: 110912736679636090, prev: 3521487, next: 3057175, size: 40, range: 112219564107059218..110912736679636090
1: k: 111651744569170291, prev: 3049659, next: 2710596, size: 40, range: 111926741634665808..111651744569170291
```

The range of IDs in page 0 overlaps with the range of IDs in page 1.

The previous `PageCache` assumed this couldn't happen, and broke in
various interesting ways when it did.

E.g., you can't find the page that contains a given status by looking
for the largest key less than the needle's status id. Given the pages
above looking for ID 112219564107059218 (first status in page 0) would
suggest page 1 as having the greatest key less than that ID. This
manifested as the correct page briefly appearing in the UI (page 0),
then being completely replaced with page 1.

Rewrite PageCache to fix this. The previous implementation used a single
`TreeMap` assuming items were always sorted by ID. The new code keeps an
unordered map from status IDs to the page that contains that status, and
a separate `LinkedList` that contains the pages in order they're
provided by the API. This decouples the ordering of pages in the cache
with the overall ordering of items within the pages.
2024-04-22 20:34:16 +02:00
Nik Clayton b8939dd2cf
fix: Ensure actionbar title is set correctly (#628)
https://github.com/pachli/pachli-android/pull/589 changed the initial
setting of the action bar title to use `binding.mainToolbar.title`
instead of `supportActionBar?.title`.

Not sure why, but this doesn't work on first use, and was showing
"Pachli Current" until the user changes tabs. Swap one usage back to
`supportActionBar?.title` to fix this, and update the other to do the
same thing to keep the code consistent.
2024-04-15 22:42:22 +02:00
Nik Clayton 8a2ba4167f
chore(deps): update agp to v8.3.2, lint to v31.3.2 (#627)
Remove unused autodispose, rxandroid3, and rxkotlin3 definitions.
2024-04-15 21:56:42 +02:00
renovate[bot] a7ba5febda
fix(deps): update dependency ch.qos.logback:logback-classic to v1.5.5 (#622)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ch.qos.logback:logback-classic](http://logback.qos.ch)
([source](https://togithub.com/qos-ch/logback),
[changelog](https://logback.qos.ch/news.html)) | `1.5.3` -> `1.5.5` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/ch.qos.logback:logback-classic/1.5.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/ch.qos.logback:logback-classic/1.5.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/ch.qos.logback:logback-classic/1.5.3/1.5.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/ch.qos.logback:logback-classic/1.5.3/1.5.5?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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/pachli/pachli-android).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-15 21:41:34 +02:00