Nik Clayton
9cb41d6353
fix: Show media when resuming ViewMediaFragment ( #174 )
...
Previous code finalised the view setup in `onViewCreated`, so if you
opened some media, switched away from the app, and switched back you'd
get a blank screen.
Fix this by doing the finalisation in `onResume()`, so the media is
displayed correctly when returning to the fragment.
Fixes #161
2023-10-15 14:45:41 +02:00
Nik Clayton
99dd15ea89
fix: Add foregroundServiceType/onTimeout() to prevent crash ( #163 )
...
Android 14 (SDK 34) requires a `foregroundServiceType` and `onTimeout()`
implementation for foreground services, otherwise creating the service
will crash.
Do this. If `SendStatusService` does timeout then any pending statuses
are marked as failed, saved to drafts, and the user is informed.
Fixes #162
2023-10-15 13:07:35 +02:00
Weblate (bot)
34c53a67e0
fix(l10n): Translations update from Weblate ( #159 )
...
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/UI
strings](https://hosted.weblate.org/projects/pachli/ui-strings/ )
Current translation status:
![Weblate translation
status](https://hosted.weblate.org/widget/pachli/fastlane-metadata/horizontal-auto.svg )
---------
Co-authored-by: sanao <jinsei@sanao.dev>
Co-authored-by: Eryk Michalak <gnu.ewm@protonmail.com>
2023-10-15 11:48:52 +02:00
renovate[bot]
ca06d46d32
fix(deps): update glide to v4.16.0 ( #123 )
...
[![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.bumptech.glide:okhttp3-integration](https://togithub.com/bumptech/glide )
| `4.15.1` -> `4.16.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.github.bumptech.glide:okhttp3-integration/4.16.0?slim=true )](https://docs.renovatebot.com/merge-confidence/ )
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.github.bumptech.glide:okhttp3-integration/4.16.0?slim=true )](https://docs.renovatebot.com/merge-confidence/ )
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.github.bumptech.glide:okhttp3-integration/4.15.1/4.16.0?slim=true )](https://docs.renovatebot.com/merge-confidence/ )
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.github.bumptech.glide:okhttp3-integration/4.15.1/4.16.0?slim=true )](https://docs.renovatebot.com/merge-confidence/ )
|
| [com.github.bumptech.glide:glide](https://togithub.com/bumptech/glide )
| `4.15.1` -> `4.16.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.github.bumptech.glide:glide/4.16.0?slim=true )](https://docs.renovatebot.com/merge-confidence/ )
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.github.bumptech.glide:glide/4.16.0?slim=true )](https://docs.renovatebot.com/merge-confidence/ )
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.github.bumptech.glide:glide/4.15.1/4.16.0?slim=true )](https://docs.renovatebot.com/merge-confidence/ )
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.github.bumptech.glide:glide/4.15.1/4.16.0?slim=true )](https://docs.renovatebot.com/merge-confidence/ )
|
| [com.github.bumptech.glide:ksp](https://togithub.com/bumptech/glide ) |
`4.15.1` -> `4.16.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.github.bumptech.glide:ksp/4.16.0?slim=true )](https://docs.renovatebot.com/merge-confidence/ )
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.github.bumptech.glide:ksp/4.16.0?slim=true )](https://docs.renovatebot.com/merge-confidence/ )
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.github.bumptech.glide:ksp/4.15.1/4.16.0?slim=true )](https://docs.renovatebot.com/merge-confidence/ )
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.github.bumptech.glide:ksp/4.15.1/4.16.0?slim=true )](https://docs.renovatebot.com/merge-confidence/ )
|
---
### Release Notes
<details>
<summary>bumptech/glide
(com.github.bumptech.glide:okhttp3-integration)</summary>
###
[`v4.16.0`](https://togithub.com/bumptech/glide/releases/tag/v4.16.0 ):
Glide 4.16.0
This release focuses on some build improvements and Compose. The two
major Compose improvements are adding support for Compose specific
transitions (e.g. cross fade) and supporting recomposition based on
request state using `GlideSubcomposition`. There's also been a bunch of
internal refactoring to move away from Painters to Modifier nodes based
on feedback from the Compose team. This is still an alpha release of
Compose, but barring unexpectedly negative feedback, the next release
should be beta.
This should be the last release of Glide that targets Java 7. That
probably means our next release will be a major version change.
##### Features
- Allow passing an executor into ChromiumRequestSerializer in
[https://github.com/bumptech/glide/pull/5077 ](https://togithub.com/bumptech/glide/pull/5077 )
- Allow host app to provide a way to clear all resources onStop() by
[@​osamaaftab](https://togithub.com/osamaaftab ) in
[https://github.com/bumptech/glide/pull/5145 ](https://togithub.com/bumptech/glide/pull/5145 )
##### Compose
- Add a Transition API and a CrossFade Transition for Compose by
[@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5235 ](https://togithub.com/bumptech/glide/pull/5235 )
- Influence layout using intrinsics in GlideNode by
[@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5240 ](https://togithub.com/bumptech/glide/pull/5240 )
\* Log instead of throwing parsing manifests to fix compose previews by
[@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5167 ](https://togithub.com/bumptech/glide/pull/5167 )
- Launch no more than one request per onRemembered by
[@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5062 ](https://togithub.com/bumptech/glide/pull/5062 )
- Remove GlidePainter in favor of Modifier nodes / Flows by
[@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5230 ](https://togithub.com/bumptech/glide/pull/5230 )
- Replace flows in GlideSubcomposition with a listener on GlideNode by
[@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5238 ](https://togithub.com/bumptech/glide/pull/5238 )
##### Bugs
- Read library glide module names from Java indexes by
[@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5052 ](https://togithub.com/bumptech/glide/pull/5052 )
- Fix typo. anay -> any in GlideSymbolProcessor.kt. by
[@​trevorhackman](https://togithub.com/trevorhackman ) in
[https://github.com/bumptech/glide/pull/5029 ](https://togithub.com/bumptech/glide/pull/5029 )
- Include URL in error log by
[@​paulsowden](https://togithub.com/paulsowden ) in
[https://github.com/bumptech/glide/pull/5164 ](https://togithub.com/bumptech/glide/pull/5164 )
- Add `isInitialized` visible for testing method by
[@​paulsowden](https://togithub.com/paulsowden ) in
[https://github.com/bumptech/glide/pull/5163 ](https://togithub.com/bumptech/glide/pull/5163 )
- Use onIdle to avoid a race in FlowTests by
[@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5202 ](https://togithub.com/bumptech/glide/pull/5202 )
- Add a isEquivalentTo method to correctly check equality by
[@​mori-atsushi](https://togithub.com/mori-atsushi ) in
[https://github.com/bumptech/glide/pull/5232 ](https://togithub.com/bumptech/glide/pull/5232 )
- Add
[@​RequiresPermission](https://togithub.com/RequiresPermission ) to
NotificationTarget by
[@​TWiStErRob](https://togithub.com/TWiStErRob ) in
[https://github.com/bumptech/glide/pull/5220 ](https://togithub.com/bumptech/glide/pull/5220 )
##### Deprecations
- `placeholderOf(@​Composable)` in `GlideImage` is deprecated, use
`GlideSubcomposition` instead. Keep in mind that using either forces a
recomposition each time the state of the image load changes.
Recomposition will have a significant performance penalty in scrolling
lists and should be avoided.
##### Behavior Changes
- Hard code disabling hardware bitmaps on O/OMR1. by
[@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5115 ](https://togithub.com/bumptech/glide/pull/5115 )
- Do not set requireOriginal on Android photo picker uris. by
[@​phoenixli](https://togithub.com/phoenixli ) in
[https://github.com/bumptech/glide/pull/5162 ](https://togithub.com/bumptech/glide/pull/5162 )
##### Breaking Changes
##### Build Changes
- Add integration tests for ksp library modules. by
[@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5054 ](https://togithub.com/bumptech/glide/pull/5054 )
- Update README.md to use https by
[@​simoarpe](https://togithub.com/simoarpe ) in
[https://github.com/bumptech/glide/pull/5058 ](https://togithub.com/bumptech/glide/pull/5058 )
- Use dokka to build scripts/update_javadocs.sh by
[@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5104 ](https://togithub.com/bumptech/glide/pull/5104 )
- avif integration: Update libavif dependency by
[@​vigneshvg](https://togithub.com/vigneshvg ) in
[https://github.com/bumptech/glide/pull/5128 ](https://togithub.com/bumptech/glide/pull/5128 )
- Disable java 7 source obsolete warning. by
[@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5168 ](https://togithub.com/bumptech/glide/pull/5168 )
- Update mockito version to fix j16 compilation. by
[@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5169 ](https://togithub.com/bumptech/glide/pull/5169 )
- Switch Glide's dependencies to a version catalog. by
[@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5183 ](https://togithub.com/bumptech/glide/pull/5183 )
- Remove jetifier by [@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5184 ](https://togithub.com/bumptech/glide/pull/5184 )
- Add an updated proguard plugin to compile on Java 17. by
[@​sjudd](https://togithub.com/sjudd ) in
[https://github.com/bumptech/glide/pull/5185 ](https://togithub.com/bumptech/glide/pull/5185 )
- Configure Renovate in
[https://github.com/bumptech/glide/pull/5186 ](https://togithub.com/bumptech/glide/pull/5186 )
- Increment ROBOLECTRIC_SDK to 19 from 18. by
[@​brettchabot](https://togithub.com/brettchabot ) in
[https://github.com/bumptech/glide/pull/5208 ](https://togithub.com/bumptech/glide/pull/5208 )
and
[https://github.com/bumptech/glide/pull/5207 ](https://togithub.com/bumptech/glide/pull/5207 )
- AGP: Upgrade AndroidManifest.xml's package to build.gradle's
namespace. by [@​TWiStErRob](https://togithub.com/TWiStErRob ) in
[https://github.com/bumptech/glide/pull/5221 ](https://togithub.com/bumptech/glide/pull/5221 )
##### New Contributors
- [@​trevorhackman](https://togithub.com/trevorhackman ) made their
first contribution in
[https://github.com/bumptech/glide/pull/5029 ](https://togithub.com/bumptech/glide/pull/5029 )
- [@​simoarpe](https://togithub.com/simoarpe ) made their first
contribution in
[https://github.com/bumptech/glide/pull/5058 ](https://togithub.com/bumptech/glide/pull/5058 )
- [@​paulsowden](https://togithub.com/paulsowden ) made their first
contribution in
[https://github.com/bumptech/glide/pull/5164 ](https://togithub.com/bumptech/glide/pull/5164 )
- [@​phoenixli](https://togithub.com/phoenixli ) made their first
contribution in
[https://github.com/bumptech/glide/pull/5162 ](https://togithub.com/bumptech/glide/pull/5162 )
- [@​osamaaftab](https://togithub.com/osamaaftab ) made their first
contribution in
[https://github.com/bumptech/glide/pull/5145 ](https://togithub.com/bumptech/glide/pull/5145 )
- [@​brettchabot](https://togithub.com/brettchabot ) made their
first contribution in
[https://github.com/bumptech/glide/pull/5207 ](https://togithub.com/bumptech/glide/pull/5207 )
- [@​mori-atsushi](https://togithub.com/mori-atsushi ) made their
first contribution in
[https://github.com/bumptech/glide/pull/5232 ](https://togithub.com/bumptech/glide/pull/5232 )
**Full Changelog**:
https://github.com/bumptech/glide/compare/v4.15.0...v4.16.0
Note - there's been a change in the gpg key used to sign these releases.
The new public key is attached
</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 these
updates 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:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDcuMiIsInVwZGF0ZWRJblZlciI6IjM3LjguMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nik Clayton <nik@ngo.org.uk>
2023-10-13 14:59:45 +02:00
Nik Clayton
71df6254ef
fix: Show thread indicators and other dividers using Material colours ( #157 )
...
Use the Material colour for `conversation_thread_line` (which is
`colorOutlineVariant`) instead of a custom attribute.
Elsewhere, use the Material attribute directly (in code), or replace the
custom divider with a `MaterialDivider`.
This makes some colour definitions unused, so remove them.
Fixes #148
2023-10-13 11:36:05 +02:00
Nik Clayton
ff5d7f1d27
refactor: Update ViewThreadViewModel to use FiltersRepository ( #156 )
...
Instead of calling the filters API directly use `FiltersRepository` to
handle the v1/v2 filter differences.
2023-10-12 12:47:27 +02:00
Nik Clayton
0902b0ba49
refactor: Replace test preference mocks with InMemorySharedPreferences ( #155 )
...
Previously the tests mocked shared preferences with a map and a mock
that had to be implemented for each test that needed it.
Replace this with `InMemorySharedPreferences`, which provides the normal
`SharedPreferences` interface so can be used as a drop-in replacement.
2023-10-12 11:22:41 +02:00
Nik Clayton
628b5a7db5
refactor: Inject Gson in FakeDatabaseModule ( #153 )
2023-10-11 21:27:28 +02:00
Nik Clayton
f88599908b
refactor: Extract FakeMastodonApiModule ( #152 )
...
Extract `FakeMastodonApiModule` from `ComposeActivityTest` to make it
usable in other tests. Update `MainActivityTest` to use the extracted
code.
2023-10-11 15:39:51 +02:00
Nik Clayton
53e7842439
change: Increase compileSdk and targetSdk to 34 ( #150 )
...
Associated changes:
- Handle new null/non-null type signatures in overriden methods
- Configure Robolectric to use SDK 33 (current highest supported
version)
2023-10-11 12:28:45 +02:00
Nik Clayton
38214648dd
refactor: Migrate from Dagger to Hilt ( #143 )
...
- Remove `Injectable` interface, use `@AndroidEntryPoint`
- Remove `DispatchingAndroidInjector`
- Remove `viewModelFactory`, use `@HiltViewModel`
- Create providers for the different DAOs, and inject those instead of
`AppDatabase`
- Create provider for a database transaction, inject that instead of
`AppDatabase`
- Update tests
2023-10-07 19:30:11 +02:00
Nik Clayton
f4c0d3525b
chore: Prepare release 1.2.2 (versionCode 5) ( #140 )
2023-10-03 13:21:53 +02:00
Nik Clayton
802cdd4c46
feat: Embed the privacy policy in the app ( #139 )
...
Instead of linking to the privacy policy embed it in the app as a string
of HTML.
The string is created with a new `markdown2resource` plugin, which
converts `PRIVACY.md` to HTML and generates a Java class with the HTML
content.
Create `PrivacyPolicyActivity` to display the HTML in a `WebView`, and
link to it from `AboutActivity`.
2023-10-03 12:56:30 +02:00
Nik Clayton
2cc534f22a
chore: Prepare release 1.2.1 (versionCode 4) ( #138 )
2023-09-30 14:33:10 +02:00
Nik Clayton
651b0efcd6
feat: Link to the privacy policy from "About" ( #137 )
...
Google requires an in-app link to the privacy policy.
2023-09-30 13:15:44 +02:00
Nik Clayton
7b4d879e80
chore: Prepare release 1.2 (versionCode 3) ( #135 )
2023-09-29 15:49:43 +02:00
Nik Clayton
6fedfe54ba
fix: Restore the user's reading position under all circumstances ( #133 )
...
The previous code did not always work when the user returned to the app
after a lengthy absence (e.g., overnight).
Instead of restoring by scrolling in `TimelineFragment`, restore by
working with the platform.
Determine the initial page to fetch by looking half a page ahead of the
saved saved status ID, and fetch that status and the page immediately
prior. This seems to match the view's expectations about what will be
immediately available.
Set `jumpThreshold` and `enablePlaceholders` in the `PagingConfig` so
the paging system will jump to the saved status.
Remove the restoration code in `TimelineFragment`.
Fixes #53
2023-09-29 11:10:55 +02:00
Nik Clayton
d434144922
ci: Upload orangeRelease to Google Play (internal track) ( #134 )
...
Start building infrastructure to automatically build and deploy the
`orangeRelease` variant to Google Play.
The variant needs an automatically incrementing `versionCode`. That is
derived from the count of all commits.
Change the separator between the version and the build metadata in the
`versionName` from `-` to `+` to be consistent with semantic versioning.
This is still an experiment, so the workflow is triggered manually and
only uploads to the internal track
2023-09-28 13:50:02 +02:00
Nik Clayton
b947c1b289
fix: Improve error handling when blocking accounts ( #131 )
...
The previous code ran the API call in a `try/catch block`, and handled
errors in the `catch`. But `NetworkResult` already catches the exception
and transforms it to a failure, so the error case was not handled.
Replace with `NetworkResult.fold`.
2023-09-27 18:32:58 +02:00
Nik Clayton
50d9aedad9
chore(deps): Update to AGP 8.1.1 ( #130 )
2023-09-27 18:06:14 +02:00
Nik Clayton
0b8d702960
refactor: Remove duplicate `MainCoroutineRule` ( #129 )
2023-09-27 17:53:24 +02:00
Nik Clayton
c5a5540467
refactor: Remove rxjava3 from Mastodon API spec ( #128 )
...
Remove the rxjava3 `Single` type from the MastodonAPI definition,
replacing with `Response` or `NetworkResult` as appropriate.
Update callsites and tests as appropriate.
This removes the need for `com.squareup.retrofit2:adapter-rxjava3`
2023-09-27 11:35:55 +02:00
Nik Clayton
11fecb1914
feat: Show vertical scrollbars on scrollable lists ( #96 )
...
Display normal Android (i.e., fading) scrollbars when the user scrolls
in lists.
2023-09-26 15:57:35 +02:00
Nik Clayton
04025e99ff
fix: Show media when opening a thread, based on user preferences ( #93 )
...
A previous change dropped the check to see if media was marked as
sensitive, and so all media was hidden when viewing a thread. Reinstate
the check so only sensitive media is hidden (if the user preferences are
set that way).
2023-09-24 21:23:29 +02:00
Nik Clayton
9b21f3f9bf
refactor: Ensure `statusDisplayOptions` are created consistently ( #92 )
...
Previous code created `statusDisplayOptions` in full each time, risking
the creation of inconsistent states / defaults.
Refactor to use `StatusDisplayOptions.from()` so the user's settings
(and defaults) are always respected.
2023-09-24 21:23:07 +02:00
Nik Clayton
af7b668476
fix: Enable/disable vote button when the user can/can't vote ( #91 )
...
Previously the voting button was always enabled, even if the user hadn't
made a choice.
Disable the button by default, and listen for clicks on the options.
Enable the button whenever one or more options are selected.
Fixes #90
2023-09-23 21:01:33 +02:00
Nik Clayton
2169c91281
fix: Ensure `setLifeOnScrollTargetView` is called when fragment resumes
...
If you do not do this and the fragment is in a pager then it can be
overridden when another fragment is swiped in to view.
2023-09-23 16:21:05 +02:00
Nik Clayton
d2d6f147ea
fix: Remove second `AppBarLayout` from activity_trending
...
Previous code `include`'d `toolbar_basic` inside an `AppBarLayout`.
But `toolbar_basic` already contains an `AppBarLayout`, which
resulted in some rendering issues.
Remove the `include` and incorporate the `MaterialToolbar` directly.
Set the toolbar to scroll out of the way when the screen scrolls, so
the behaviour is consistent with the tabs in `MainActivity` and
`AccountActivity`.
2023-09-23 16:21:05 +02:00
Nik Clayton
f2cce6947e
fix: Use the correct colour for the status bar
...
Previously, in `MainActivity` and `AccountActivity` the status bar would
be `colorPrimaryDark`.
Adjust the layouts and code so that `colorSurface` is used to match
the toolbar colour.
Fixes #79
2023-09-23 16:21:05 +02:00
Nik Clayton
0b74b073a4
fix: Ensure poll option text is visible against the background ( #86 )
...
Draw poll bars using the container colour variants to ensure that the
text drawn on top is also visible against the background.
Fixes #85
2023-09-23 11:58:00 +02:00
Nik Clayton
5fd15852fb
refactor: Use constant keys whenever preference values are fetched ( #84 )
2023-09-23 11:26:46 +02:00
Nik Clayton
3a274b0594
refactor: Replace .to... with .from() in most cases ( #82 )
...
The previous code generally converted between a higher and a lower type
by putting the type conversion functions on the lower type.
This introduced cycles in the code dependency graph, and made it more
difficult to follow the code flow.
Refactor the code so that types generally have a `from(...)` static
factory method that can create an instance from a lower type, and if
appropriate a `to...()` method that can also create an instance of that
lower type.
Add `docs/code-style.md` which explains the rationale for this change
in more detail so that future contributors can write code in the same
style.
2023-09-22 15:17:38 +02:00
Nik Clayton
f45a3df83f
refactor: Use resource strings on the hashtag toolbar menu
2023-09-20 19:05:35 +02:00
Nik Clayton
2b2d5d4bd8
refactor: Remove unnecessary tint from composeToggleVisibilityButton
2023-09-20 19:05:35 +02:00
Nik Clayton
f9e5063ce6
fix: Label the header and avatar on the account screen
2023-09-20 19:05:35 +02:00
Nik Clayton
2bcb595777
fix: Label the image on the focus dialog
2023-09-20 19:05:35 +02:00
Nik Clayton
254edf5e6f
refactor: Mark the image overlay is not important for accessibility
2023-09-20 19:05:35 +02:00
Nik Clayton
0fadb6f3fd
fix: Set the contentDescription for avatars
2023-09-20 19:05:35 +02:00
Nik Clayton
acaf2a7d89
refactor: Remove warnings about unclosed resources
...
In `MediaUploader` the lint warning can be ignored, as the stream is
closed elsewhere.
In the other files `.use` is used to simplify the code and remove
the need for Closeable.closeQuietly (as `.use` catches exceptions that
are thrown when closing).
2023-09-20 19:05:35 +02:00
Nik Clayton
d00dc97a5f
refactor: Suppress an unncessary CheckResult lint error
...
The result is used, lint isn't smart enough to figure that out.
2023-09-20 19:05:35 +02:00
Nik Clayton
d555e2a69c
refactor: Fix KDoc warnings
2023-09-20 19:05:35 +02:00
Nik Clayton
1aea1cde8b
refactor: Resolve theoretical `BaseActivity` NPEs
2023-09-20 19:05:35 +02:00
Nik Clayton
4db1af5b50
refactor: Resolve theoretical `StatusBaseViewHolder` NPEs
...
Use `assert` to note when a nullable value is known to be non-null.
Extract a method call to a variable where necessary to do this.
2023-09-20 19:05:35 +02:00
Nik Clayton
a6bad12271
refactor: Resolve theoretical Notification NPEs
...
Use `assert` to note when a nullable value is known to be non-null.
Extract a method call to a variable where necessary to do this.
Update `CharSequence.unicodeWrap()` to handle a null `CharSequence`.
2023-09-20 19:05:35 +02:00
Nik Clayton
7b7976c31b
refactor: Rewrite `onRequestPermissionsResult` to remove a theoretical NPE
2023-09-20 19:05:35 +02:00
Nik Clayton
e762008a2a
refactor: Use Java enhanced switch
2023-09-20 19:05:35 +02:00
Nik Clayton
1a817d9b29
fix: Fix potential NPE in `ConversationViewHolder`
...
`ConversationViewHolder` calls `getDisplayName()`, which may return
null.
Replace with `getName()`, which is consistent with usage in other
classes. Mark `getDisplayName()` as deprecated to prevent future
usage.
2023-09-20 19:05:35 +02:00
Nik Clayton
da808793f5
refactor: Remove unncessary `val` from constructor parameter
2023-09-20 19:05:35 +02:00
Nik Clayton
26ff8e5bad
refactor: Remove unnecessary return type from `handleProfileClick`
2023-09-20 19:05:35 +02:00
Nik Clayton
8c95472d42
refactor: Remove unused `consumed` property
2023-09-20 19:05:35 +02:00