Compare commits

...
407 Commits
Author SHA1 Message Date
GitHub Actions a223470da5 feat(release): bump version 2024-09-22 14:02:16 +00:00
renovate[bot]andGitHub 1e5421fbc2 fix(deps): update serialization to v1.7.3 2024-09-19 17:03:22 +00:00
renovate[bot]andGitHub 4087ce1941 chore(deps): update github/codeql-action action to v3.26.8 2024-09-19 11:36:00 +00:00
renovate[bot]andGitHub 63e8ca3df8 fix(deps): update androidx 2024-09-18 18:12:17 +00:00
renovate[bot]andGitHub a9a304cd96 chore(deps): update agp to v8.6.1 2024-09-17 21:58:09 +00:00
renovate[bot]andGitHub 8dd15b8276 chore(deps): update plugin poko to v0.17.1 2024-09-17 20:06:29 +00:00
Harsh Shandilya 5c2793fff3 fix(android): add a theme preview for SettingsScreen 2024-09-16 13:17:34 +05:30
Harsh Shandilya 245437c739 refactor(android): prepare SettingsScreen composable for standalone preview 2024-09-16 13:17:33 +05:30
Harsh Shandilya 2fdbff6f12 fix(core): drop obsolete OptIn and use a named dispatcher 2024-09-16 12:39:39 +05:30
Harsh Shandilya 2bc86509cf chore: update changelog 2024-09-16 12:34:37 +05:30
Harsh Shandilya 1dfea689c6 Revert "refactor: make PostComments non-nullable"
This reverts commit 39e3d783cd.
2024-09-16 12:34:37 +05:30
Harsh Shandilya a0276c4873 Revert "fix(common): reintroduce handling for first views for comment state"
This reverts commit 1cbd3b5bd0.
2024-09-16 12:30:37 +05:30
renovate[bot]andGitHub fbb13c5acf chore(deps): update plugin screenshot to v0.0.1-alpha07 2024-09-14 05:20:46 +00:00
renovate[bot]andGitHub 95b3030e19 chore(deps): update plugin dependencyanalysis to v2.0.2 2024-09-14 02:25:34 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
0f2bb909d4 fix(deps): update coroutines to v1.9.0 (#656)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[org.jetbrains.kotlinx:kotlinx-coroutines-test](https://redirect.github.com/Kotlin/kotlinx.coroutines)
| `1.9.0-RC.2` -> `1.9.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains.kotlinx:kotlinx-coroutines-test/1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jetbrains.kotlinx:kotlinx-coroutines-test/1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jetbrains.kotlinx:kotlinx-coroutines-test/1.9.0-RC.2/1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains.kotlinx:kotlinx-coroutines-test/1.9.0-RC.2/1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[org.jetbrains.kotlinx:kotlinx-coroutines-core](https://redirect.github.com/Kotlin/kotlinx.coroutines)
| `1.9.0-RC.2` -> `1.9.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains.kotlinx:kotlinx-coroutines-core/1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jetbrains.kotlinx:kotlinx-coroutines-core/1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jetbrains.kotlinx:kotlinx-coroutines-core/1.9.0-RC.2/1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains.kotlinx:kotlinx-coroutines-core/1.9.0-RC.2/1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[org.jetbrains.kotlinx:kotlinx-coroutines-android](https://redirect.github.com/Kotlin/kotlinx.coroutines)
| `1.9.0-RC.2` -> `1.9.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains.kotlinx:kotlinx-coroutines-android/1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jetbrains.kotlinx:kotlinx-coroutines-android/1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jetbrains.kotlinx:kotlinx-coroutines-android/1.9.0-RC.2/1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains.kotlinx:kotlinx-coroutines-android/1.9.0-RC.2/1.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>Kotlin/kotlinx.coroutines
(org.jetbrains.kotlinx:kotlinx-coroutines-test)</summary>

###
[`v1.9.0`](https://redirect.github.com/Kotlin/kotlinx.coroutines/blob/HEAD/CHANGES.md#Version-190)

[Compare
Source](https://redirect.github.com/Kotlin/kotlinx.coroutines/compare/1.9.0-RC.2...1.9.0)

##### Features

- Wasm/WASI target support
([#&#8203;4064](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4064)).
Thanks,
[@&#8203;igoriakovlev](https://redirect.github.com/igoriakovlev)!
- `limitedParallelism` now optionally accepts the name of the dispatcher
view for easier debugging
([#&#8203;4023](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4023)).
- No longer initialize `Dispatchers.IO` on the JVM when other standard
dispatchers are accessed
([#&#8203;4166](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4166)).
Thanks,
[@&#8203;metalhead8816](https://redirect.github.com/metalhead8816)!
- Introduced the `Flow<T>.chunked(size: Int): Flow<List<T>>` operator
that groups emitted values into groups of the given size
([#&#8203;1290](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/1290)).
- Closeable dispatchers are instances of `AutoCloseable` now
([#&#8203;4123](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4123)).

##### Fixes

- Calling `hasNext` on a `Channel`'s iterator is idempotent
([#&#8203;4065](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4065)).
Thanks, [@&#8203;gitpaxultek](https://redirect.github.com/gitpaxultek)!
- `CoroutineScope()` created without an explicit dispatcher uses
`Dispatchers.Default` on Native
([#&#8203;4074](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4074)).
Thanks, [@&#8203;whyoleg](https://redirect.github.com/whyoleg)!
- Fixed a bug that prevented non-Android `Dispatchers.Main` from
initializing when the Firebase dependency is used
([#&#8203;3914](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/3914)).
- Ensured a more intuitive ordering of tasks in `runBlocking`
([#&#8203;4134](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4134)).
- Forbid casting a `Mutex` to `Semaphore`
([#&#8203;4176](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4176)).
- Worked around a stack overflow that may occur when calling
`asDeferred` on a `Future` many times
([#&#8203;4156](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4156)).

##### Deprecations and promotions

- Advanced the deprecation levels for `BroadcastChannel`-based API
([#&#8203;4197](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4197)).
- Advanced the deprecation levels for the old `kotlinx-coroutines-test`
API
([#&#8203;4198](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4198)).
- Deprecated `Job.cancelFutureOnCompletion`
([#&#8203;4173](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4173)).
- Promoted `CoroutineDispatcher.limitedParallelism` to stable
([#&#8203;3864](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/3864)).
- Promoted `CoroutineStart.ATOMIC` from `ExperimentalCoroutinesApi` to
`DelicateCoroutinesApi`
([#&#8203;4169](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4169)).
- Promoted `CancellableContinuation.resume` with an `onCancellation`
lambda to stable, providing extra arguments to the lambda
([#&#8203;4088](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4088)).
- Marked the classes and interfaces that are not supposed to be
inherited from with the new `InternalForInheritanceCoroutinesApi` opt-in
([#&#8203;3770](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/3770)).
- Marked the classes and interfaces inheriting from which is not stable
with the new `ExperimentalForInheritanceCoroutinesApi` opt-in
([#&#8203;3770](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/3770)).

##### Other

- Kotlin was updated to 2.0
([#&#8203;4137](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4137)).
- Reworked the documentation for `CoroutineStart` and `Channel`-based
API
([#&#8203;4147](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4147),
[#&#8203;4148](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4148),
[#&#8203;4167](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4167)).
Thanks, [@&#8203;globsterg](https://redirect.github.com/globsterg)!
- Simplified the internal implementation of `Job`
([#&#8203;4053](https://redirect.github.com/Kotlin/kotlinx.coroutines/issues/4053)).
-   Small tweaks, fixes, and documentation improvements.

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, 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 was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/msfjarvis/compose-lobsters).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-13 20:23:57 +00:00
renovate[bot]andGitHub d2e1ae91da chore(deps): update github/codeql-action action to v3.26.7 2024-09-13 14:17:46 +00:00
renovate[bot]andGitHub 82a024baee chore(deps): update gradle/actions digest to d156388 2024-09-13 04:17:11 +00:00
renovate[bot]andGitHub 3021b55fce chore(deps): update plugin com.gradle.develocity to v3.18.1 2024-09-10 18:50:10 +00:00
Harsh Shandilya 7506dd5ca9 fix(build): upgrade to target SDK 35 2024-09-10 22:32:26 +05:30
renovate[bot]andGitHub d3d4519daa chore(deps): update actions/setup-java action to v4.3.0 2024-09-09 17:09:35 +00:00
renovate[bot]andGitHub 83b58aa7fb chore(deps): update dependency gradle to v8.10.1 2024-09-09 11:48:05 +00:00
Harsh Shandilya aa2093424c fix(common): restore missing padding to UserProfile page 2024-09-08 21:08:30 +05:30
Harsh Shandilya 501721fca9 fix(renovate): only allow alpha versions of Compose BOM 2024-09-06 18:16:06 +05:30
Harsh Shandilya aa088f5dd7 fix(deps): pull out Haze version 2024-09-06 17:27:39 +05:30
Harsh Shandilya b0b47d98a5 fix(common): handle pluralization for unread comments note 2024-09-06 15:30:16 +05:30
Harsh Shandilya 2109bcf12c chore(renovate): remove obsolete Compose Compiler directive 2024-09-06 15:30:16 +05:30
Harsh Shandilya 6bc6b13ea6 fix(deps): migrate to the official Compose alpha BOM 2024-09-06 15:30:16 +05:30
renovate[bot]andGitHub 0f20366cf3 chore(deps): update plugin ksp to v2.0.20-1.0.25 2024-09-05 21:51:21 +00:00
renovate[bot]andGitHub 723ab0add3 fix(deps): update dependency org.jetbrains.kotlinx:kotlinx-collections-immutable to v0.3.8 2024-09-05 16:34:11 +00:00
renovate[bot]andGitHub 77dd4496a5 fix(deps): update dependency dev.chrisbanes.haze:haze-materials to v0.9.0-beta01 2024-09-05 14:31:15 +00:00
renovate[bot]andGitHub 1e8a93fde8 fix(deps): update dependency dev.chrisbanes.haze:haze to v0.9.0-beta01 2024-09-05 12:22:20 +00:00
Harsh Shandilya fe0e0ea10e fix(deps): update dev.chrisbanes.compose:compose-bom to 2024.09.00-alpha01 2024-09-05 10:25:35 +05:30
renovate[bot]andGitHub d26245da17 fix(deps): update androidx 2024-09-05 01:26:15 +00:00
renovate[bot]andGitHub aa60160378 chore(deps): update plugin screenshot to v0.0.1-alpha06 2024-09-04 23:00:02 +00:00
Harsh Shandilya 943cddd8a4 fix(android): cache search results properly 2024-09-02 14:11:36 +05:30
Harsh Shandilya d5a0bb256f fix(build): inject test dependencies in the screenshotTest source set 2024-09-02 12:49:32 +05:30
Harsh Shandilya 1ebf610794 fix(common): slightly increase padding in LobstersCard 2024-09-02 12:49:32 +05:30
Harsh Shandilya 784dcf16f8 feat(android): add a screenshot test for NetworkPosts 2024-09-02 12:49:32 +05:30
Harsh Shandilya cc5b95e9c8 fix(ci): always download LFS files 2024-09-02 12:49:32 +05:30
Harsh Shandilya e317a1f4f3 feat(common): add a basic screenshot test for MonthHeader 2024-09-02 12:49:32 +05:30
Harsh Shandilya ed4c573ee4 feat(common): set up for Compose screenshot testing 2024-09-02 03:02:49 +05:30
Harsh Shandilya 7037d55bf2 fix(android): collect saved posts flow in a Lifecycle aware manner 2024-09-02 00:51:30 +05:30
Harsh Shandilya 4ab76c60bb fix(android): ensure pull refresh indicator is visible 2024-09-02 00:31:54 +05:30
renovate[bot]andGitHub 0fe83e8583 chore(deps): update actions/upload-artifact action to v4.4.0 2024-08-30 20:04:41 +00:00
GitHub Actions 68bcae572b feat(release): start next development iteration 2024-08-30 14:34:08 +00:00
GitHub Actions edfe72f12a feat(release): bump version 2024-08-30 14:30:24 +00:00
renovate[bot]andGitHub 4ae70e2129 chore(deps): update agp to v8.6.0 2024-08-30 01:26:51 +00:00
renovate[bot]andGitHub 54c1d4438c chore(deps): update plugin dependencyanalysis to v2.0.1 2024-08-29 21:51:58 +00:00
renovate[bot]andGitHub 3e673b09b6 chore(deps): update actions/setup-python digest to f677139 2024-08-29 18:40:39 +00:00
Harsh Shandilya 77439a5799 fix(common): correctly size spacer to match system bars 2024-08-29 23:13:26 +05:30
renovate[bot]andGitHub adf1af691f chore(deps): update github/codeql-action action to v3.26.6 2024-08-29 14:03:24 +00:00
Harsh Shandilya 1d60fca7eb chore: refresh changelog 2024-08-29 16:54:32 +05:30
Harsh Shandilya 8224b71465 fix(common): manually roll equals/hashCode for CommentNode
Excludes the parent field for comparison since it can trigger cycles in some situations

Fixes COMPOSE-LOBSTERS-5G
2024-08-29 16:47:48 +05:30
Harsh Shandilya bf52966772 fix(common): re-add spacer to comments page 2024-08-29 16:34:43 +05:30
Harsh Shandilya dc06410fc4 fix(common): set item keys in comments page 2024-08-29 16:34:15 +05:30
Harsh Shandilya 7b78438385 chore: refresh screenshots 2024-08-29 12:42:22 +05:30
Harsh Shandilya 077c855ef3 fix(android): give the right padding to SearchBar
Fixes #644
2024-08-29 12:42:22 +05:30
GitHub Actions f7f3f55261 feat(release): start next development iteration 2024-08-29 03:49:12 +00:00
GitHub Actions 74af4ad5b6 feat(release): bump version 2024-08-29 03:45:26 +00:00
renovate[bot]andGitHub 6988b5d412 fix(deps): update serialization to v1.7.2 2024-08-28 21:23:08 +00:00
renovate[bot]andGitHub ecc7b79720 chore(deps): update plugin modulegraphassert to v2.7.1 2024-08-28 20:29:15 +00:00
Harsh Shandilya 1de4916c9c feat: redesign bottom navigation bar 2024-08-28 15:17:38 +05:30
Harsh Shandilya 4f3bafc051 fix(android): migrate to Material3 pull refresh indicator 2024-08-28 13:42:36 +05:30
Harsh Shandilya 8651a4f66b refactor: lazily query saved and read state in UI
Having this always be read from the UI avoids values going stale inside data models

Fixes #641
2024-08-28 13:12:31 +05:30
Harsh Shandilya 6f424ae2d5 fix(android): avoid triggering a refresh on saving posts
The underlying issue is still not resolved since work on paging has stalled out in
Store5, but this trades the bad UX of an unwanted refresh for the slightly less
bad UX of the saved state sometimes being stale.

Fixes #558
2024-08-28 12:37:57 +05:30
Harsh Shandilya c8d1491196 refactor(android): inline refresh load state 2024-08-28 12:18:58 +05:30
Harsh Shandilya e68af9be16 chore: enable ktfmt in IDEA
It's more annoying to have code be incorrectly reformatted during editing than the occasional jumpy cursor
2024-08-28 12:08:50 +05:30
renovate[bot]andGitHub 482258a162 chore(deps): update plugin dependencyanalysis to v2 2024-08-28 00:37:41 +00:00
renovate[bot]andGitHub ee44d99f94 chore(deps): update plugin modulegraphassert to v2.7.0 2024-08-27 23:05:29 +00:00
renovate[bot]andGitHub 6a7de43b15 chore(deps): update gradle/actions digest to 16bf8bc 2024-08-27 01:31:32 +00:00
renovate[bot]andGitHub 89b490d841 fix(deps): update dependency com.diffplug.spotless:spotless-plugin-gradle to v7.0.0.beta2 2024-08-25 23:13:20 +00:00
Harsh Shandilya 1cbd3b5bd0 fix(common): reintroduce handling for first views for comment state 2024-08-24 16:02:56 +05:30
Harsh Shandilya 1dfcda4a64 feat(android): enable Sentry session replay 2024-08-24 16:02:56 +05:30
renovate[bot]andGitHub 18f6689c47 chore(deps): update github/codeql-action action to v3.26.5 2024-08-23 23:37:08 +00:00
renovate[bot]andGitHub 022e05696b chore(deps): update aboutlibraries to v11.2.3 2024-08-23 11:17:01 +00:00
renovate[bot]andGitHub e2bbe9c264 chore(deps): update plugin poko to v0.17.0 2024-08-23 03:23:10 +00:00
renovate[bot]andGitHub d0762b5cae chore(deps): update plugin ksp to v2.0.20-1.0.24 2024-08-22 21:43:00 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>Harsh Shandilya
f452833f6d chore(deps): update kotlin and compose to v2.0.20 (#635)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [org.jetbrains.kotlin.plugin.serialization](https://kotlinlang.org/)
([source](https://togithub.com/JetBrains/kotlin)) | `2.0.10` -> `2.0.20`
|
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains.kotlin.plugin.serialization/2.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jetbrains.kotlin.plugin.serialization/2.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jetbrains.kotlin.plugin.serialization/2.0.10/2.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains.kotlin.plugin.serialization/2.0.10/2.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [org.jetbrains.kotlin.plugin.compose](https://kotlinlang.org/)
([source](https://togithub.com/JetBrains/kotlin)) | `2.0.10` -> `2.0.20`
|
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains.kotlin.plugin.compose/2.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jetbrains.kotlin.plugin.compose/2.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jetbrains.kotlin.plugin.compose/2.0.10/2.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains.kotlin.plugin.compose/2.0.10/2.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [org.jetbrains.kotlin:kotlin-gradle-plugin](https://kotlinlang.org/)
([source](https://togithub.com/JetBrains/kotlin)) | `2.0.10` -> `2.0.20`
|
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains.kotlin:kotlin-gradle-plugin/2.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jetbrains.kotlin:kotlin-gradle-plugin/2.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jetbrains.kotlin:kotlin-gradle-plugin/2.0.10/2.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains.kotlin:kotlin-gradle-plugin/2.0.10/2.0.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>JetBrains/kotlin
(org.jetbrains.kotlin.plugin.serialization)</summary>

###
[`v2.0.20`](https://togithub.com/JetBrains/kotlin/compare/v2.0.10...v2.0.20)

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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 was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/msfjarvis/compose-lobsters).

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

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2024-08-22 18:38:00 +00:00
Harsh Shandilya eb32c84b18 fix(renovate): update Compose compiler dep name 2024-08-22 22:03:18 +05:30
renovate[bot]andGitHub 8f19f794a1 fix(deps): update dependency dev.chrisbanes.compose:compose-bom to v2024.08.00-alpha02 2024-08-22 01:13:40 +00:00
renovate[bot]andGitHub 6bb5994a37 chore(deps): update github/codeql-action action to v3.26.4 2024-08-21 21:56:35 +00:00
renovate[bot]andGitHub 26ccc0d687 fix(deps): update androidx 2024-08-21 19:07:24 +00:00
Harsh Shandilya 39e3d783cd refactor: make PostComments non-nullable 2024-08-21 13:37:48 +05:30
Harsh Shandilya c50790e4f9 refactor(common): get rid of interior mutability in CommentNode 2024-08-21 13:13:38 +05:30
Harsh Shandilya d55ff24add refactor(common): cleanup unused stuff from tree view change
Follows up from changes in 6223198191
2024-08-21 13:13:38 +05:30
Harsh Shandilya 9b2a1cba64 chore: disable ktfmt in the IDE
The auto-format option messes up Compose code
2024-08-21 13:13:38 +05:30
Harsh Shandilya 327cce9075 fix(deps): upgrade Spotless to 7.0.0.BETA1 2024-08-21 13:13:38 +05:30
renovate[bot]andGitHub 466ec7c79f fix(deps): update dependency me.saket.unfurl:unfurl to v2.2.0 2024-08-20 21:25:32 +00:00
Harsh Shandilya 06c9fa1477 chore: refresh changelog 2024-08-21 01:31:55 +05:30
Harsh Shandilya 6223198191 refactor(common): use a simpler tree view for comments 2024-08-21 01:31:54 +05:30
renovate[bot]andGitHub 789e4a124d chore(deps): update dependency com.facebook:ktfmt to v0.52 2024-08-20 11:52:10 +00:00
renovate[bot]andGitHub e3745d0c58 chore(deps): update github/codeql-action action to v3.26.3 2024-08-19 19:03:49 +00:00
renovate[bot]andGitHub 26b35d4dd8 chore(deps): update plugin com.gradle.develocity to v3.18 2024-08-19 12:58:50 +00:00
renovate[bot]andGitHub 691a18b889 fix(deps): update dependency me.saket.unfurl:unfurl to v2 2024-08-15 06:38:31 +00:00
Harsh Shandilya 789339eacb Revert "fix(renovate): avoid Unfurl upgrades for now"
This reverts commit 995caae174.
2024-08-15 12:05:49 +05:30
renovate[bot]andGitHub 78a470dfdd fix(deps): update dependency androidx.test:runner to v1.6.2 2024-08-14 23:49:24 +00:00
renovate[bot]andGitHub eb3185d883 chore(deps): update dependency gradle to v8.10 2024-08-14 19:58:32 +00:00
renovate[bot]andGitHub bf3d507990 chore(deps): update github/codeql-action action to v3.26.2 2024-08-14 17:03:51 +00:00
renovate[bot]andGitHub faa79bcb12 chore(deps): update dependency de.mannodermaus.android-junit5 to v1.11.0.0 2024-08-14 14:54:07 +00:00
renovate[bot]andGitHub e8dcb0dfba fix(deps): update junit5 monorepo to v5.11.0 2024-08-14 10:29:54 +00:00
renovate[bot]andGitHub d502716652 chore(deps): update github/codeql-action action to v3.26.1 2024-08-13 21:03:56 +00:00
renovate[bot]andGitHub bb29924822 fix(deps): update coroutines to v1.9.0-rc.2 2024-08-13 11:55:57 +00:00
renovate[bot]andGitHub 101cd8894f fix(deps): update sentry to v7.14.0 2024-08-13 09:50:01 +00:00
Harsh Shandilya 995caae174 fix(renovate): avoid Unfurl upgrades for now 2024-08-12 15:40:50 +05:30
Harsh Shandilya 1a7b1fbdd1 Revert "fix(deps): update dependency me.saket.unfurl:unfurl to v2"
This reverts commit 7875c63bde.
2024-08-12 15:40:11 +05:30
Harsh Shandilya 9c6008b36e refactor(common): rename Comments.kt 2024-08-12 00:54:18 +05:30
renovate[bot]andGitHub 7875c63bde fix(deps): update dependency me.saket.unfurl:unfurl to v2 2024-08-09 11:23:26 +00:00
renovate[bot]andGitHub 68fe458f7d chore(deps): update agp to v8.5.2 2024-08-09 05:10:22 +00:00
renovate[bot]andGitHub f611b9aa25 fix(deps): update androidx 2024-08-08 01:09:29 +00:00
Harsh Shandilya 67b253ba62 fix(android): reorder settings items 2024-08-08 03:44:03 +05:30
Harsh Shandilya a8f559fe06 fix(build): reduce Gradle heap size 2024-08-08 03:44:03 +05:30
Harsh Shandilya 45dab6d513 fix(build): compile against SDK 35 2024-08-08 03:44:03 +05:30
Harsh Shandilya 13f6467a16 fix(deps): upgrade dev.chrisbanes.compose:compose-bom to 2024.08.00-alpha01 2024-08-08 02:45:40 +05:30
renovate[bot]andGitHub 871abf7873 fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.11.0 2024-08-07 11:55:06 +00:00
renovate[bot]andGitHub 866b487256 chore(deps): update plugin ksp to v2.0.10-1.0.24 2024-08-06 20:32:09 +00:00
renovate[bot]andGitHub 63adacbea8 chore(deps): update github/codeql-action action to v3.26.0 2024-08-06 18:22:54 +00:00
renovate[bot]andGitHub 65b10a0071 chore(deps): update actions/upload-artifact action to v4.3.6 2024-08-06 16:16:33 +00:00
renovate[bot]andGitHub e20af353ac chore(deps): update dependency org.jetbrains.kotlin.plugin.compose to v2.0.10 2024-08-06 12:11:25 +00:00
renovate[bot]andGitHub ba0f62febe fix(deps): update dagger to v2.52 2024-08-05 20:13:37 +00:00
renovate[bot]andGitHub 3a1012288d chore(deps): update actions/setup-java action to v4.2.2 2024-08-05 16:59:32 +00:00
renovate[bot]andGitHub 8424798257 chore(deps): update gradle/actions action to v4 2024-08-04 01:01:10 +00:00
renovate[bot]andGitHub a7e5ede51a chore(deps): update actions/upload-artifact action to v4.3.5 2024-08-02 15:13:54 +00:00
Harsh Shandilya 1197e7fd7f fix(build): remove unused libraries 2024-08-01 22:45:49 +05:30
renovate[bot]andGitHub 72a684dbd1 fix(deps): update sentry to v7.13.0 2024-07-31 10:07:24 +00:00
renovate[bot]andGitHub ba47885490 chore(deps): update plugin anvil to v2.5.0-beta11 2024-07-30 03:02:55 +00:00
renovate[bot]andGitHub 9f153d62ba chore(deps): update plugin ksp to v2.0.0-1.0.24 2024-07-30 00:46:37 +00:00
renovate[bot]andGitHub 9bceb5c680 chore(deps): update plugin dependencyanalysis to v1.33.0 2024-07-27 19:58:13 +00:00
renovate[bot]andGitHub 99d69f1bef chore(deps): update github/codeql-action action to v3.25.15 2024-07-26 14:31:04 +00:00
renovate[bot]andGitHub 1a72d2cbbe fix(deps): update sentry to v7.12.1 2024-07-25 21:46:41 +00:00
renovate[bot]andGitHub e22ecb51d3 fix(deps): update dependency dev.chrisbanes.compose:compose-bom to v2024.07.00-alpha02 2024-07-25 18:08:09 +00:00
renovate[bot]andGitHub 68f779c395 chore(deps): update dependency de.mannodermaus.android-junit5 to v1.10.2.0 2024-07-25 14:31:08 +00:00
renovate[bot]andGitHub 954341c0fb chore(deps): update github/codeql-action action to v3.25.14 2024-07-25 08:57:30 +00:00
renovate[bot]andGitHub 798ffb8bb6 fix(deps): update androidx 2024-07-24 17:36:50 +00:00
renovate[bot]andGitHub a137900ac7 chore(deps): update plugin modulegraphassert to v2.6.0 2024-07-24 11:39:18 +00:00
renovate[bot]andGitHub fdd4f3d1dc chore(deps): update plugin anvil to v2.5.0-beta10 2024-07-23 00:04:50 +00:00
renovate[bot]andGitHub 4c975471fd chore(deps): update plugin com.gradle.develocity to v3.17.6 2024-07-22 10:30:48 +00:00
renovate[bot]andGitHub e2d530635d chore(deps): update github/codeql-action action to v3.25.13 2024-07-19 19:33:18 +00:00
Harsh Shandilya 371780a1fd fixup! feat(common): visually distinguish between read and unread comments 2024-07-18 16:23:20 +05:30
renovate[bot]andGitHub b1d6cbcb39 fix(deps): update coil to v2.7.0 2024-07-17 18:56:26 +00:00
renovate[bot]andGitHub a07c55a430 fix(deps): update sentry 2024-07-16 01:31:16 +00:00
renovate[bot]andGitHub 8415c46492 chore(deps): update gradle/actions digest to d9c87d4 2024-07-15 22:21:24 +00:00
renovate[bot]andGitHub 771892bfb1 fix(deps): update dependency com.google.truth:truth to v1.4.4 2024-07-12 22:31:07 +00:00
renovate[bot]andGitHub 66e69a333c chore(deps): update github/codeql-action action to v3.25.12 2024-07-12 17:13:51 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
67dccf949c chore(deps): update actions/dependency-review-action digest to 5a2ce3f (#611)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-12 20:10:19 +05:30
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
f411460841 chore(deps): update agp to v8.5.1 (#608)
[![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.android.test](https://developer.android.com/studio/build)
([source](https://android.googlesource.com/platform/tools/base)) |
`8.5.0` -> `8.5.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.test/8.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.android.test/8.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.android.test/8.5.0/8.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.test/8.5.0/8.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [com.android.lint](https://developer.android.com/studio/build)
([source](https://android.googlesource.com/platform/tools/base)) |
`8.5.0` -> `8.5.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.lint/8.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.android.lint/8.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.android.lint/8.5.0/8.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.lint/8.5.0/8.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[com.android.tools.build:gradle](https://developer.android.com/studio/build)
([source](https://android.googlesource.com/platform/tools/base)) |
`8.5.0` -> `8.5.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.tools.build:gradle/8.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.android.tools.build:gradle/8.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.android.tools.build:gradle/8.5.0/8.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.tools.build:gradle/8.5.0/8.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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/msfjarvis/compose-lobsters).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-12 10:01:27 +00:00
renovate[bot]andGitHub 17bd98d96d chore(deps): update plugin ksp to v2.0.0-1.0.23 2024-07-12 07:02:25 +00:00
Harsh Shandilya fa2c0bc047 fix(deps): update dev.chrisbanes.compose:compose-bom to 2024.07.00-alpha01 2024-07-12 02:08:34 +05:30
renovate[bot]andGitHub 3dbca71de3 chore(deps): update dependency gradle to v8.9 2024-07-11 17:15:05 +00:00
renovate[bot]andGitHub 2c4f0fa4e2 chore(deps): update androidx 2024-07-10 18:00:45 +00:00
renovate[bot]andGitHub ce7e9db135 chore(deps): update actions/setup-python digest to 39cd149 2024-07-10 15:53:17 +00:00
renovate[bot]andGitHub babd40109b fix(deps): update dependency org.jsoup:jsoup to v1.18.1 2024-07-10 08:23:50 +00:00
Harsh Shandilya f1fcaf53f4 feat(android): link up bottombar visibility with scroll 2024-07-09 23:43:31 +05:30
renovate[bot]andGitHub d678843230 fix(deps): update dependency org.mobilenativefoundation.store:store5 to v5.1.0-alpha04 2024-07-07 22:40:08 +00:00
renovate[bot]andGitHub f7d9447ca0 fix(deps): update dependency org.mobilenativefoundation.store:store5 to v5.1.0-alpha03 2024-07-07 18:25:34 +00:00
Harsh Shandilya 03b0097ae1 chore: brush up changelog 2024-07-07 23:53:33 +05:30
Harsh Shandilya a53af77705 feat(common): visually distinguish between read and unread comments 2024-07-07 23:42:19 +05:30
Harsh Shandilya 05a8b9bc67 fix(build): only enable -Werror in CI 2024-07-07 23:18:38 +05:30
renovate[bot]andGitHub 9815ef1910 chore(deps): update dependency gradle to v8.9-rc-2 2024-07-05 18:02:15 +00:00
renovate[bot]andGitHub 7c9f61eb5e chore(deps): update actions/upload-artifact action to v4.3.4 2024-07-05 17:13:10 +00:00
Harsh Shandilya 8f69490c11 Reapply "refactor(android): migrate to navigation safe-args"
This reverts commit 6296afe51a.
2024-07-03 14:03:48 +05:30
renovate[bot]andGitHub a7dd2c52f5 fix(deps): update konvert to v3.2.2 2024-07-03 01:08:28 +00:00
renovate[bot]andGitHub 100387c759 fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.9.0 2024-07-02 13:24:02 +00:00
renovate[bot]andGitHub ce8d79f08c chore(deps): update mobsf/mobsfscan digest to 25184ed 2024-07-01 20:11:50 +00:00
renovate[bot]andGitHub 4a75ea99a3 fix(deps): update sentry to v7.11.0 2024-07-01 17:20:17 +00:00
renovate[bot]andGitHub bd8148b74b fix(deps): update dependency androidx.lifecycle:lifecycle-viewmodel-compose to v2.8.3 2024-07-01 17:04:59 +00:00
renovate[bot]andGitHub 2b9810c5d4 chore(deps): update plugin invert to v0.0.1-dev 2024-07-01 04:53:54 +00:00
renovate[bot]andGitHub 0e5052a5bb chore(deps): update aboutlibraries to v11.2.2 2024-06-29 14:02:17 +00:00
renovate[bot]andGitHub ffe40d41fd chore(deps): update github/codeql-action action to v3.25.11 2024-06-28 16:07:17 +00:00
renovate[bot]andGitHub 46cf368b99 fix(deps): update junit5 monorepo to v5.10.3 2024-06-27 15:38:30 +00:00
renovate[bot]andGitHub 1d0386f332 fix(deps): update dependency com.google.truth:truth to v1.4.3 2024-06-27 15:28:57 +00:00
Harsh Shandilya 4a621fa120 fix(deps): update dev.chrisbanes.compose:compose-bom to 2024.06.00-alpha01 2024-06-27 20:14:15 +05:30
renovate[bot]andGitHub a53dece4d1 fix(deps): update androidx 2024-06-27 00:50:09 +00:00
renovate[bot]andGitHub a2c6fb40bf fix(deps): update dependency androidx.navigation:navigation-compose to v2.8.0-beta04 2024-06-26 18:48:41 +00:00
Harsh Shandilya b132410282 feat: show "Authored by" on posts when applicable 2024-06-26 21:29:41 +05:30
Harsh Shandilya 4ebb99bf7d fix(build): update to Gradle 8.9-rc-1 2024-06-26 21:11:16 +05:30
Harsh Shandilya 3a15eea2fd Revert "fix(common): temporarily disable collapsible comments feature"
Doesn't fix the bug.

This reverts commit 7ae94ee2e6.
2024-06-26 12:01:16 +05:30
Harsh Shandilya 3a6f7be808 fix(android): surface upstream downtime more prominently 2024-06-26 11:58:12 +05:30
renovate[bot]andGitHub 1cb978aa92 fix(deps): update serialization to v1.7.1 2024-06-25 16:46:06 +00:00
renovate[bot]andGitHub e0de9c97de fix(deps): update androidx 2024-06-24 23:25:23 +00:00
Harsh Shandilya 7ae94ee2e6 fix(common): temporarily disable collapsible comments feature 2024-06-22 19:01:34 +05:30
renovate[bot]andGitHub 5d8467bc67 fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.8.0 2024-06-19 19:51:56 +00:00
renovate[bot]andGitHub 378f4e413a chore(deps): update gradle/actions digest to dbbdc27 2024-06-17 22:50:23 +00:00
renovate[bot]andGitHub 6727424092 chore(deps): update gradle/actions digest to 31ae356 2024-06-15 08:10:21 +00:00
renovate[bot]andGitHub 9594a4dc9e chore(deps): update dependency com.facebook:ktfmt to v0.51 2024-06-14 15:33:25 +00:00
renovate[bot]andGitHub f7fb007f85 chore(deps): update gradle/actions digest to d9336da 2024-06-13 21:13:45 +00:00
renovate[bot]andGitHub 710d2d2c35 chore(deps): update agp to v8.5.0 2024-06-13 18:20:45 +00:00
renovate[bot]andGitHub c3139bfc9d chore(deps): update github/codeql-action action to v3.25.10 2024-06-13 17:50:28 +00:00
Harsh Shandilya e2bcabe4e5 chore: refresh Lint baseline 2024-06-13 20:56:45 +05:30
Harsh Shandilya 9610241489 fix(common): tweak LobstersCard layout to improve touch targets 2024-06-13 20:46:01 +05:30
Harsh Shandilya cef05306ba fix(android): update LeakCanary API usage
Fixes 9a1f42764e
2024-06-13 20:46:01 +05:30
Harsh Shandilya c4aad66c03 refactor(common): move setExpanded to CommentNode 2024-06-13 20:46:01 +05:30
renovate[bot]andGitHub 7f2b052df5 fix(deps): update androidx 2024-06-13 00:38:31 +00:00
renovate[bot]andGitHub 0a3bf1e06a chore(deps): update actions/checkout action to v4.1.7 2024-06-12 21:15:14 +00:00
renovate[bot]andGitHub a779bee74c chore(deps): update plugin com.gradle.develocity to v3.17.5 2024-06-12 18:06:08 +00:00
renovate[bot]andGitHub 7ac87046ae chore(deps): update github/codeql-action action to v3.25.9 2024-06-12 17:04:50 +00:00
Harsh Shandilya 742a30bfdd Revert "fix(android): attempt to workaround duplicate item keys bug"
Doesn't seem to have resolved the issue.

This reverts commit 9c07169b1b.
2024-06-11 19:45:58 +05:30
renovate[bot]andGitHub ecad03e749 chore(deps): update agp to v8.4.2 2024-06-10 16:52:14 +00:00
Harsh Shandilya d2289da184 feat(build): add Invert plugin 2024-06-08 12:57:19 +05:30
Harsh Shandilya 2e91db6908 feat(store): init module
Fixes PP-83
2024-06-07 17:50:03 +05:30
Harsh Shandilya 679e177d47 chore: adjust Renovate config 2024-06-07 10:40:18 +05:30
renovate[bot]andGitHub feb4aa7b17 chore(deps): update dependency com.facebook:ktfmt to v0.50 2024-06-07 03:10:05 +00:00
renovate[bot]andGitHub c6bae7d92a fix(deps): update serialization to v1.7.0 2024-06-06 14:31:42 +00:00
renovate[bot]andGitHub 0277b987da fix(deps): update dependency io.sentry:sentry-bom to v7.10.0 2024-06-06 13:33:28 +00:00
renovate[bot]andGitHub 5024bfa160 fix(deps): update dependency com.slack.eithernet:eithernet to v1.9.0 2024-06-06 04:57:02 +00:00
renovate[bot]andGitHub 60c3d91087 chore(deps): update plugin ksp to v2.0.0-1.0.22 2024-06-06 01:12:50 +00:00
renovate[bot]andGitHub 559cfbb223 chore(deps): update actions/dependency-review-action digest to 72eb03d 2024-06-05 21:47:19 +00:00
renovate[bot]andGitHub 8e1e63b573 fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.7.1 2024-06-05 14:30:59 +00:00
GitHub Actions b0c6806226 feat(release): start next development iteration 2024-06-05 07:52:29 +00:00
GitHub Actions 6e29d61799 feat(release): bump version 2024-06-05 07:49:10 +00:00
Harsh Shandilya 1ee9d92b40 chore: update changelog 2024-06-05 13:12:57 +05:30
Harsh Shandilya 9c07169b1b fix(android): attempt to workaround duplicate item keys bug
Fixes COMPOSE-LOBSTERS-2E
2024-06-05 13:12:52 +05:30
renovate[bot]andGitHub 81f4d35f93 fix(deps): update dependency com.squareup.leakcanary:leakcanary-android-test to v3.0-alpha-8 2024-06-04 23:13:29 +00:00
renovate[bot]andGitHub 361082ded4 chore(deps): update github/codeql-action action to v3.25.8 2024-06-04 16:15:41 +00:00
renovate[bot]andGitHub 4fe43dbdc9 fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.7.0 2024-06-04 08:22:24 +00:00
renovate[bot]andGitHub cef45bd3e5 chore(deps): update dependency gradle to v8.8 2024-05-31 22:51:30 +00:00
renovate[bot]andGitHub c45dd76fc4 chore(deps): update github/codeql-action action to v3.25.7 2024-05-31 10:52:15 +00:00
renovate[bot]andGitHub 9a1f42764e fix(deps): update dependency com.squareup.leakcanary:leakcanary-android-test to v3.0-alpha-7 2024-05-31 02:01:11 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
e62a0eaa84 fix(deps): update androidx (#577)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [androidx.test:runner](https://developer.android.com/testing) |
`1.6.0-beta01` -> `1.6.0-rc01` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.test:runner/1.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.test:runner/1.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.test:runner/1.6.0-beta01/1.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.test:runner/1.6.0-beta01/1.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [androidx.test:rules](https://developer.android.com/testing) |
`1.6.0-beta01` -> `1.6.0-rc01` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.test:rules/1.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.test:rules/1.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.test:rules/1.6.0-beta01/1.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.test:rules/1.6.0-beta01/1.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [androidx.test.ext:junit](https://developer.android.com/testing) |
`1.2.0-beta01` -> `1.2.0-rc01` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.test.ext:junit/1.2.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.test.ext:junit/1.2.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.test.ext:junit/1.2.0-beta01/1.2.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.test.ext:junit/1.2.0-beta01/1.2.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[androidx.test.espresso:espresso-core](https://developer.android.com/testing)
| `3.6.0-beta01` -> `3.6.0-rc01` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.test.espresso:espresso-core/3.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.test.espresso:espresso-core/3.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.test.espresso:espresso-core/3.6.0-beta01/3.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.test.espresso:espresso-core/3.6.0-beta01/3.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [androidx.test:core](https://developer.android.com/testing) |
`1.6.0-beta01` -> `1.6.0-rc01` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.test:core/1.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.test:core/1.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.test:core/1.6.0-beta01/1.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.test:core/1.6.0-beta01/1.6.0-rc01?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

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

🚦 **Automerge**: Enabled.

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

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- 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/msfjarvis/compose-lobsters).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-30 21:13:05 +00:00
Harsh Shandilya 6296afe51a Revert "refactor(android): migrate to navigation safe-args"
This reverts commit cf390de486 and bb3cef2f5b.
2024-05-31 01:05:14 +05:30
Harsh Shandilya cf390de486 refactor(android): move navigation extensions to their own file 2024-05-30 18:07:23 +05:30
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
99a45ab5df chore(deps): update aboutlibraries to v11.2.1 (#574)
[![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.mikepenz.aboutlibraries.plugin | `11.2.0` -> `11.2.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.mikepenz.aboutlibraries.plugin/11.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.mikepenz.aboutlibraries.plugin/11.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.mikepenz.aboutlibraries.plugin/11.2.0/11.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.mikepenz.aboutlibraries.plugin/11.2.0/11.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[com.mikepenz:aboutlibraries-compose-m3](https://togithub.com/mikepenz/AboutLibraries)
| `11.2.0` -> `11.2.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.mikepenz:aboutlibraries-compose-m3/11.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.mikepenz:aboutlibraries-compose-m3/11.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.mikepenz:aboutlibraries-compose-m3/11.2.0/11.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.mikepenz:aboutlibraries-compose-m3/11.2.0/11.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>mikepenz/AboutLibraries
(com.mikepenz:aboutlibraries-compose-m3)</summary>

###
[`v11.2.1`](https://togithub.com/mikepenz/AboutLibraries/releases/tag/11.2.1)

[Compare
Source](https://togithub.com/mikepenz/AboutLibraries/compare/11.2.0...11.2.1)

#### 💬 Other

-   Reduce noise of AmbiguousArtifactVariantsException logs even more
- PR:
[#&#8203;990](https://togithub.com/mikepenz/AboutLibraries/issues/990)
    -   Thanks [@&#8203;sebokopter](https://togithub.com/sebokopter)

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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/msfjarvis/compose-lobsters).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-30 10:57:41 +00:00
Harsh Shandilya 5257d0876a fix(ci): explicitly run assemble task
Seems like the Sentry Gradle plugin doesn't run otherwise
2024-05-30 14:17:39 +05:30
Harsh Shandilya bb3cef2f5b refactor(android): migrate to navigation safe-args
(cherry picked from commit 127a69249e)

Fixes PP-77
2024-05-30 14:03:42 +05:30
Harsh Shandilya a791588423 fix(android): work around weird scroll issue with saved posts 2024-05-30 13:07:51 +05:30
Harsh Shandilya 535624bf22 fix(deps): upgrade to Compose 1.7 betas 2024-05-30 13:04:02 +05:30
Harsh Shandilya b5a7225bd8 chore: update gitignore 2024-05-30 03:19:12 +05:30
Harsh Shandilya 8c0734a19a fix(build): enable Compose strong skipping mode 2024-05-30 02:02:12 +05:30
renovate[bot]andGitHub 71afc634b9 fix(deps): update androidx 2024-05-29 17:28:26 +00:00
renovate[bot]andGitHub fbaede8215 chore(deps): update plugin poko to v0.16.0 2024-05-28 23:03:26 +00:00
Harsh Shandilya 948aea7ea8 fix(deps): upgrade coroutines to 1.9.0-RC 2024-05-29 01:16:44 +05:30
renovate[bot]andGitHub 6acab19b28 chore(deps): update mobsf/mobsfscan digest to 849b749 2024-05-27 22:55:17 +00:00
renovate[bot]andGitHub 2555140ca1 chore(deps): update dependency gradle to v8.8-rc-2 2024-05-27 09:48:31 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
4a5980fd62 fix(deps): update konvert to v3.2.1 (#569)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [io.mcarle:konvert](https://togithub.com/mcarleio/konvert) | `3.2.0`
-> `3.2.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.mcarle:konvert/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.mcarle:konvert/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.mcarle:konvert/3.2.0/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.mcarle:konvert/3.2.0/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [io.mcarle:konvert-api](https://togithub.com/mcarleio/konvert) |
`3.2.0` -> `3.2.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.mcarle:konvert-api/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.mcarle:konvert-api/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.mcarle:konvert-api/3.2.0/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.mcarle:konvert-api/3.2.0/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [io.mcarle:konvert-annotations](https://togithub.com/mcarleio/konvert)
| `3.2.0` -> `3.2.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.mcarle:konvert-annotations/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.mcarle:konvert-annotations/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.mcarle:konvert-annotations/3.2.0/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.mcarle:konvert-annotations/3.2.0/3.2.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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/msfjarvis/compose-lobsters).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-24 09:04:05 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
215afd208e chore(deps): update plugin dependencyanalysis to v1.32.0 (#568)
[![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.autonomousapps.dependency-analysis](https://togithub.com/autonomousapps/dependency-analysis-android-gradle-plugin)
| `1.31.0` -> `1.32.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.autonomousapps.dependency-analysis/1.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.autonomousapps.dependency-analysis/1.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.autonomousapps.dependency-analysis/1.31.0/1.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.autonomousapps.dependency-analysis/1.31.0/1.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>autonomousapps/dependency-analysis-android-gradle-plugin
(com.autonomousapps.dependency-analysis)</summary>

###
[`v1.32.0`](https://togithub.com/autonomousapps/dependency-analysis-android-gradle-plugin/blob/HEAD/CHANGELOG.md#Version-1320)

- \[New]: Output dominator tree results in JSON format including size
and total size of deps.
-   \[New]: Allow to force app behavior for pure Java projects.
-   \[New]: `generateProjectGraph` task.
-   \[New]: `reason` works for multi-capabilities.
-   \[New]: Print build file path in `projectHealth` console report.
- \[Fix]: Enhance logging (more) when `ConstantPoolParser` throws
exception.
- \[Fix]: Do not dotty for path matching and remove prefix and suffix
from binary class name.
-   \[Fix]: Fix Windows file separator incompatibility.
- \[Fix]: Don't suggest adding `testImplementation` dependency on self.
-   \[Fix]: DAGP variants have a `Category` of 'dependency-analysis'.
-   \[Fix]: Sort an input map for better reproducibility.

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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/msfjarvis/compose-lobsters).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-24 04:41:12 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
806ef65e08 fix(deps): update dependency com.squareup.leakcanary:leakcanary-android-test to v3.0-alpha-6 (#566)
[![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-test](https://togithub.com/square/leakcanary)
| `3.0-alpha-5` -> `3.0-alpha-6` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.squareup.leakcanary:leakcanary-android-test/3.0-alpha-6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.squareup.leakcanary:leakcanary-android-test/3.0-alpha-6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.squareup.leakcanary:leakcanary-android-test/3.0-alpha-5/3.0-alpha-6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.squareup.leakcanary:leakcanary-android-test/3.0-alpha-5/3.0-alpha-6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

###
[`v3.0-alpha-6`](https://togithub.com/square/leakcanary/releases/tag/v3.0-alpha-6)

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**: Enabled.

♻ **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/msfjarvis/compose-lobsters).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-22 16:43:47 +00:00
Harsh Shandilya 35e143a458 chore: update changelog 2024-05-22 14:29:21 +05:30
Harsh Shandilya 5b4d1fc48e Merge remote-tracking branches 'origin/renovate/aboutlibraries' and 'origin/renovate/com.slack.lint-slack-lint-checks-0.x'
* origin/renovate/aboutlibraries:
  chore(deps): update aboutlibraries to v11.2.0

* origin/renovate/com.slack.lint-slack-lint-checks-0.x:
  fix(deps): update dependency com.slack.lint:slack-lint-checks to v0.7.4
2024-05-22 14:14:05 +05:30
renovate[bot]andGitHub c9098bbd44 chore(deps): update aboutlibraries to v11.2.0 2024-05-21 21:11:40 +00:00
renovate[bot]andGitHub b7eecd10b4 fix(deps): update dependency com.slack.lint:slack-lint-checks to v0.7.4 2024-05-21 21:11:36 +00:00
Harsh Shandilya c471fee4ee fix(build): cut over to upstream Compose Compiler 2024-05-22 02:40:24 +05:30
Harsh Shandilya e3ed059fde fix(deps): upgrade ksp and poko 2024-05-22 02:39:02 +05:30
renovate[bot]andGitHub 44355de333 chore(deps): update kotlin and compose to v2 2024-05-21 14:31:31 +00:00
renovate[bot]andGitHub 92dc6d9e4c fix(deps): update dependency com.squareup.leakcanary:leakcanary-android-test to v3.0-alpha-5 2024-05-21 05:58:36 +00:00
renovate[bot]andGitHub 68ca569b9d chore(deps): update agp to v8.4.1 2024-05-20 23:29:23 +00:00
renovate[bot]andGitHub 105a33e335 chore(deps): update github/codeql-action action to v3.25.6 2024-05-20 15:03:52 +00:00
renovate[bot]andGitHub 7862b4b5c8 chore(deps): update plugin poko to v0.15.3 2024-05-20 00:10:30 +00:00
Harsh Shandilya b12b5c800f feat(android): add share action 2024-05-20 01:37:00 +05:30
Harsh Shandilya b56de40b12 fix(build): downgrade to stable AGP 2024-05-20 01:29:22 +05:30
renovate[bot]andGitHub 8243b8998c chore(deps): update plugin com.gradle.develocity to v3.17.4 2024-05-17 17:50:12 +00:00
renovate[bot]andGitHub 195b50f919 fix(deps): update androidx 2024-05-17 02:28:27 +00:00
Harsh Shandilya 2d7903efc1 Merge remote-tracking branches 'origin/renovate/actions-checkout-4.x', 'origin/renovate/agp' and 'origin/renovate/sentry'
* origin/renovate/actions-checkout-4.x:
  chore(deps): update actions/checkout action to v4.1.6

* origin/renovate/agp:
  chore(deps): update agp to v8.5.0-beta02

* origin/renovate/sentry:
  fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.6.0
2024-05-17 00:53:33 +05:30
renovate[bot]andGitHub e2ab469ecc fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.6.0 2024-05-16 19:18:13 +00:00
renovate[bot]andGitHub 4ccf8959d9 chore(deps): update agp to v8.5.0-beta02 2024-05-16 19:18:08 +00:00
renovate[bot]andGitHub b73a758501 chore(deps): update actions/checkout action to v4.1.6 2024-05-16 19:18:05 +00:00
Harsh Shandilya cfaa1c17a0 fix(deps): update Compose Compiler to 1.5.14 2024-05-17 00:43:56 +05:30
renovate[bot]andGitHub 47332c22ec fix(deps): update androidx 2024-05-14 17:29:24 +00:00
GitHub Actions ce64454cec feat(release): start next development iteration 2024-05-14 07:49:51 +00:00
GitHub Actions b3313efbbe feat(release): bump version 2024-05-14 07:46:16 +00:00
renovate[bot]andGitHub bc14e58513 chore(deps): update github/codeql-action action to v3.25.5 2024-05-13 14:30:30 +00:00
Harsh Shandilya 83eb3c13b2 feat(android): add a heap growth detection test 2024-05-13 02:51:25 +05:30
Harsh Shandilya 59acbe2a37 fix(build): also inject test dependencies to androidTest source set 2024-05-13 02:07:36 +05:30
renovate[bot]andGitHub 7e31de67b4 chore(deps): update agp to v8.5.0-beta01 2024-05-10 18:21:22 +00:00
renovate[bot]andGitHub 37230e03c4 fix(deps): update coroutines to v1.8.1 2024-05-10 12:47:15 +00:00
renovate[bot]andGitHub fbf937dce2 chore(deps): update plugin com.gradle.develocity to v3.17.3 2024-05-10 11:38:07 +00:00
renovate[bot]andGitHub ee9db517f7 chore(deps): update plugin anvil to v2.5.0-beta09 2024-05-10 00:50:17 +00:00
Harsh Shandilya a4dcdc6f88 chore: refresh feature graphics 2024-05-09 18:11:39 +05:30
Harsh Shandilya c9c908d1a5 fix(android): improve TopAppBar layout spacing 2024-05-09 18:11:39 +05:30
Harsh Shandilya 2ce804ed90 refactor: inline ClawAppBar 2024-05-09 18:02:02 +05:30
Harsh Shandilya 3b044a8d23 chore: reflow UserProfile code for pedantic reasons 2024-05-09 17:54:01 +05:30
Harsh Shandilya bdca0799db fix(common): restore older link styling in user profiles 2024-05-09 17:51:06 +05:30
renovate[bot]andGitHub ca37557297 chore(deps): update actions/checkout action to v4.1.5 2024-05-09 00:49:43 +00:00
Harsh Shandilya 9c0c270f5c chore: refresh feature graphic 2024-05-08 22:53:00 +05:30
Harsh Shandilya 8a9cc844b9 fix(deps): upgrade Compose Compiler to 1.5.14-dev-k1.9.24-50022def4af 2024-05-08 20:11:44 +05:30
renovate[bot]andGitHub 452ba7dbf9 chore(deps): update kotlin and compose 2024-05-08 14:03:41 +00:00
Harsh Shandilya 9edfc23ee3 Merge remote-tracking branches 'origin/renovate/sentry' and 'origin/renovate/github-codeql-action-3.x'
* origin/renovate/sentry:
  fix(deps): update sentry to v7.9.0

* origin/renovate/github-codeql-action-3.x:
  chore(deps): update github/codeql-action action to v3.25.4
2024-05-08 19:32:17 +05:30
renovate[bot]andGitHub 3057f5fede fix(deps): update sentry to v7.9.0 2024-05-08 13:59:12 +00:00
renovate[bot]andGitHub 157748bc61 chore(deps): update github/codeql-action action to v3.25.4 2024-05-08 13:59:06 +00:00
Harsh Shandilya 68a5de84f7 Revert "refactor(android): migrate to navigation safe-args"
This reverts commit 127a69249e.
2024-05-08 19:28:24 +05:30
Harsh Shandilya b69fa43d29 Revert "fix(android): correct navigation route for attribution page"
This reverts commit 60a7b815ea.
2024-05-08 19:24:05 +05:30
Harsh Shandilya 6f76a15ded fix: downgrade to Compose stable
Fixes PP-56
Fixes PP-61
Fixes COMPOSE-LOBSTERS-3Z
Fixes COMPOSE-LOBSTERS-40
2024-05-07 14:02:08 +05:30
Harsh Shandilya 9fe6e34015 chore: make LaunchedEffect keys consistent 2024-05-07 13:09:30 +05:30
Harsh Shandilya 847858d852 fix(common): set key for comment entries 2024-05-04 04:23:28 +05:30
Harsh Shandilya 8735f7f8e8 fix(common): mark CommentNode#findTopMostParent as tailrec 2024-05-04 04:23:28 +05:30
renovate[bot]andGitHub 5061843779 fix(deps): update dependency com.slack.lint:slack-lint-checks to v0.7.3 2024-05-03 21:41:12 +00:00
renovate[bot]andGitHub b8480f1994 chore(deps): update agp to v8.5.0-alpha08 2024-05-03 19:10:12 +00:00
Harsh Shandilya 60a7b815ea fix(android): correct navigation route for attribution page
Fixes PP-54
2024-05-03 23:59:21 +05:30
renovate[bot]andGitHub bff56aa52b fix(deps): update dependency com.slack.lint:slack-lint-checks to v0.7.2 2024-05-02 22:03:33 +00:00
Harsh Shandilya 3137a1bb42 chore: update changelog 2024-05-03 01:27:19 +05:30
Harsh Shandilya 127a69249e refactor(android): migrate to navigation safe-args 2024-05-03 01:27:19 +05:30
Harsh Shandilya 9361c7ef47 fix(deps): upgrade whetstone to 0.9.0-beta02 2024-05-02 12:01:29 +05:30
Harsh Shandilya e8a9594e4c Merge remote-tracking branch 'origin/renovate/com.squareup.anvil-2.x'
* origin/renovate/com.squareup.anvil-2.x:
  chore(deps): update plugin anvil to v2.5.0-beta08
2024-05-02 11:50:18 +05:30
Harsh Shandilya 0a8ca5719d fix(deps): update dev.chrisbanes.compose:compose-bom to 2024.05.00-alpha01 2024-05-02 11:49:01 +05:30
Harsh Shandilya d87e2d1b9c fix(build): adapt strong skipping plugin arg 2024-05-02 11:48:49 +05:30
renovate[bot]andGitHub 774c6cea9b chore(deps): update plugin anvil to v2.5.0-beta08 2024-05-01 18:59:03 +00:00
renovate[bot]andGitHub 5753f65737 chore(deps): update androidx 2024-05-01 18:59:01 +00:00
renovate[bot]andGitHub 17965097bc chore(deps): update aboutlibraries to v11.1.4 2024-05-01 13:15:02 +00:00
renovate[bot]andGitHub f1d06116bc fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.5.1 2024-04-30 23:12:09 +00:00
renovate[bot]andGitHub 319e30c174 chore(deps): update actions/dependency-review-action digest to 0c155c5 2024-04-30 19:37:16 +00:00
Harsh Shandilya 8e8b710603 chore: update changelog 2024-04-30 10:42:48 +05:30
renovate[bot]andGitHub a142563ad8 chore(deps): update agp to v8.5.0-alpha07 2024-04-29 20:12:22 +00:00
Harsh Shandilya 9bd0df2aa8 fix(model): restore konvert-api dependency 2024-04-30 01:41:31 +05:30
Harsh Shandilya 54ec5a4c8d Revert "fix: remove visual divider"
It's better with it

This reverts commit 687cb32f7c.
2024-04-30 01:16:17 +05:30
Harsh Shandilya c79b7114fb refactor: selectively apply DAGP advice 2024-04-30 00:53:21 +05:30
Harsh Shandilya a6fb1fd788 fix(build): add dependency-analysis plugin 2024-04-30 00:25:05 +05:30
Harsh Shandilya 5a268fa5bd Merge remote-tracking branches 'origin/renovate/androidx' and 'origin/renovate/actions-dependency-review-action-digest'
* origin/renovate/androidx:
  fix(deps): update androidx

* origin/renovate/actions-dependency-review-action-digest:
  chore(deps): update actions/dependency-review-action digest to e58c696
2024-04-30 00:19:32 +05:30
renovate[bot]andGitHub 431dabbc09 fix(deps): update androidx 2024-04-29 18:09:12 +00:00
renovate[bot]andGitHub d7f71878f6 chore(deps): update actions/dependency-review-action digest to e58c696 2024-04-29 18:09:09 +00:00
Harsh ShandilyaandGitHub 196dfd056b chore: update changelog 2024-04-29 02:19:24 +05:30
Harsh Shandilya 6d3e749ad6 fix(database): ensure DB is only opened once
Fixes COMPOSE-LOBSTERS-3S
2024-04-28 19:10:05 +05:30
Harsh Shandilya e808e77ab8 fixup! fix(build): upgrade to Gradle 8.8-RC1 2024-04-27 20:34:22 +05:30
Harsh Shandilya d8b2ff6c8d fix(android): add missing user destination to search screen
Fixes COMPOSE-LOBSTERS-3V
2024-04-27 16:56:16 +05:30
Harsh Shandilya 55635f1101 fix(build): upgrade to Gradle 8.8-RC1 2024-04-27 16:24:09 +05:30
renovate[bot]andGitHub a70801c635 chore(deps): update dependency com.facebook:ktfmt to v0.49 2024-04-26 18:45:10 +00:00
Harsh Shandilya 3a60e8f2a1 chore(ci): run on Java 22 2024-04-27 00:13:36 +05:30
renovate[bot]andGitHub 80183fd248 chore(deps): update dependency com.facebook:ktfmt to v0.48 2024-04-26 15:40:32 +00:00
Harsh Shandilya 7cbb8e6237 fix(android): eagerly init ClawApplication#applicationComponent 2024-04-26 17:45:18 +05:30
renovate[bot]andGitHub 32cba40e91 chore(deps): update github/codeql-action action to v3.25.3 2024-04-26 01:33:33 +00:00
renovate[bot]andGitHub a8cef93096 chore(deps): update gradle/actions digest to db19848 2024-04-25 23:14:46 +00:00
renovate[bot]andGitHub b3ea9c6faf chore(deps): update actions/checkout action to v4.1.4 2024-04-25 14:14:23 +00:00
GitHub Actions 215b259288 feat(release): start next development iteration 2024-04-24 18:32:18 +00:00
GitHub Actions ab1f276a08 feat(release): bump version 2024-04-24 18:28:03 +00:00
Harsh Shandilya ca03561df0 fix(common): force titles in lists to be a single line 2024-04-24 23:55:09 +05:30
Harsh Shandilya 687cb32f7c fix: remove visual divider 2024-04-24 23:44:36 +05:30
Harsh Shandilya 12e57298af chore: refresh changelog 2024-04-24 23:32:14 +05:30
Harsh Shandilya 5abb5f109b fix(android): disable back invoked callback
Testing if this fixes the bug I'm seeing

Fixes COMPOSE-LOBSTERS-2X
2024-04-24 23:31:35 +05:30
Harsh Shandilya c8eaf8d769 fix(api): remove sentry-okhttp integration
This keeps logging HTTP 500 errors despite me opting out of them

Fixes COMPOSE-LOBSTERS-2T
2024-04-24 22:58:59 +05:30
GitHub Actions 24a4d20a03 feat(release): start next development iteration 2024-04-24 06:51:09 +00:00
GitHub Actions 57f95d790d feat(release): bump version 2024-04-24 06:47:57 +00:00
renovate[bot]andGitHub 09a6e3e32b chore(deps): update msfjarvis/keep-a-changelog-new-release action to v2.2.0 2024-04-24 01:14:57 +00:00
renovate[bot]andGitHub 491be53dc3 fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.5.0 2024-04-23 14:16:31 +00:00
renovate[bot]andGitHub d1e6260136 chore(deps): update github/codeql-action action to v3.25.2 2024-04-22 21:21:03 +00:00
renovate[bot]andGitHub c71b33a07f chore(deps): update actions/upload-artifact action to v4.3.3 2024-04-22 18:02:54 +00:00
renovate[bot]andGitHub 7d2094866b chore(deps): update actions/checkout action to v4.1.3 2024-04-22 14:30:42 +00:00
Harsh Shandilya a3e9957e49 fix(build): make internal build debuggable
Makes it easier to pull out the database
2024-04-22 01:21:49 +05:30
Harsh Shandilya cec2d70fda fix(common): make LobstersCard more compact
Fixes #526
2024-04-20 15:18:10 +05:30
Harsh Shandilya ec4066c472 chore(android): add a preview to NetworkPosts 2024-04-20 15:18:10 +05:30
Harsh Shandilya 433727a386 refactor(common): expose fields for LobstersCard previews 2024-04-20 15:18:10 +05:30
renovate[bot]andGitHub 1238012e0b chore(deps): update agp to v8.5.0-alpha06 2024-04-18 22:41:29 +00:00
renovate[bot]andGitHub 96e53f104d chore(deps): update gradle/actions digest to 750cdda 2024-04-18 20:34:58 +00:00
renovate[bot]andGitHub e1fed9ccc8 chore(deps): update actions/upload-artifact action to v4.3.2 2024-04-18 17:34:35 +00:00
Harsh Shandilya ced43b00be refactor(android): boost page load performance
This is kinda embarassing tbh.
2024-04-18 17:50:23 +05:30
Harsh Shandilya 0ca18d9216 fix(android): add log tags to Unfurl logger 2024-04-18 17:46:30 +05:30
Harsh ShandilyaandGitHub 1aa2dee779 fix(build): revert Develocity ToS url change
It redirects to the one I had set but the plugin still expects the older one.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2024-04-18 15:00:05 +05:30
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
7f4a382f40 fix(deps): update dependency dev.chrisbanes.compose:compose-bom to v2024.04.00-alpha02 (#523)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[dev.chrisbanes.compose:compose-bom](https://togithub.com/chrisbanes/compose-bom)
| `2024.04.00-alpha01` -> `2024.04.00-alpha02` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/dev.chrisbanes.compose:compose-bom/2024.04.00-alpha02?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/dev.chrisbanes.compose:compose-bom/2024.04.00-alpha02?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/dev.chrisbanes.compose:compose-bom/2024.04.00-alpha01/2024.04.00-alpha02?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/dev.chrisbanes.compose:compose-bom/2024.04.00-alpha01/2024.04.00-alpha02?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>chrisbanes/compose-bom
(dev.chrisbanes.compose:compose-bom)</summary>

###
[`v2024.04.00-alpha02`](https://togithub.com/chrisbanes/compose-bom/releases/tag/v2024.04.00-alpha02)

#### What's Changed

- chore(deps): update plugin com.android.library to v8.3.2 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/chrisbanes/compose-bom/pull/130](https://togithub.com/chrisbanes/compose-bom/pull/130)
- fix(deps): update jetpack compose by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/chrisbanes/compose-bom/pull/131](https://togithub.com/chrisbanes/compose-bom/pull/131)
- Add material3-common by
[@&#8203;eygraber](https://togithub.com/eygraber) in
[https://github.com/chrisbanes/compose-bom/pull/132](https://togithub.com/chrisbanes/compose-bom/pull/132)

**Full Changelog**:
https://github.com/chrisbanes/compose-bom/compare/v2024.04.00-alpha01...v2024.04.00-alpha02

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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/msfjarvis/compose-lobsters).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMDEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjMwMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-18 01:16:41 +00:00
Harsh Shandilya ed5b6c21da Revert "fix(deps): upgrade Compose"
I guess it is not unmaintained

This reverts commit d19c1e11be.
2024-04-18 03:48:34 +05:30
Harsh Shandilya d0bf2a4fb2 fix: handle user profile navigation correctly 2024-04-18 01:54:26 +05:30
Harsh Shandilya 2b9680d3d8 refactor: remove deeplinks
Fixes #484
2024-04-18 01:08:42 +05:30
Harsh Shandilya d19c1e11be fix(deps): upgrade Compose
The BOM is likely to go unmaintained in the future

See: https://github.com/chrisbanes/compose-bom/issues/97
2024-04-18 01:02:26 +05:30
renovate[bot]andGitHub 809cec61cd chore(deps): update dependency androidx.compose.compiler:compiler to v1.5.12 2024-04-17 17:47:28 +00:00
Harsh Shandilya 13feb83063 chore(deps): upgrade AndroidX libraries 2024-04-17 23:16:47 +05:30
renovate[bot]andGitHub 40b7884520 chore(deps): update plugin com.gradle.develocity to v3.17.2 2024-04-17 14:31:29 +00:00
renovate[bot]andGitHub 75b05b83c1 chore(deps): update github/codeql-action action to v3.25.1 2024-04-17 12:26:22 +00:00
renovate[bot]andGitHub 9afe913548 chore(deps): update plugin anvil to v2.5.0-beta07 2024-04-17 00:39:33 +00:00
renovate[bot]andGitHub 44d589e729 chore(deps): update plugin anvil to v2.5.0-beta06 2024-04-16 17:24:25 +00:00
renovate[bot]andGitHub ace1a3c94c fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.4.1 2024-04-15 21:41:22 +00:00
renovate[bot]andGitHub 31c94dc8cc chore(deps): update github/codeql-action action to v3.25.0 2024-04-15 14:31:03 +00:00
Harsh Shandilya 493ab8712c chore: add changelog entry 2024-04-14 21:10:50 +05:30
Harsh Shandilya 1fff9d9aa2 fix(android): only attempt to scroll when items exist
Fixes COMPOSE-LOBSTERS-3F
2024-04-14 20:51:57 +05:30
Harsh Shandilya 9357362ef6 fix(ci): validate Gradle wrappers in CI 2024-04-13 14:18:45 +05:30
Harsh Shandilya 7b07a4676b refactor(ci): introduce a reusable workflow 2024-04-13 14:08:30 +05:30
renovate[bot]andGitHub e272427031 fix(deps): update konvert to v3.2.0 2024-04-12 21:14:45 +00:00
renovate[bot]andGitHub 7882b86b39 chore(deps): update gradle/actions digest to 6cec5d4 2024-04-12 20:11:13 +00:00
renovate[bot]andGitHub afb00c64fc chore(deps): update agp to v8.5.0-alpha05 2024-04-11 18:17:03 +00:00
renovate[bot]andGitHub 3a7727e563 chore(deps): update plugin anvil to v2.5.0-beta05 2024-04-09 19:02:52 +00:00
Harsh Shandilya d28c9c2e61 Revert "fix(deps): update glance to 1.1.0-beta01"
This reverts commit dc70293bd4.
2024-04-10 00:31:52 +05:30
renovate[bot]andHarsh Shandilya 99aff514f2 fix(deps): update sentry to v7.8.0 2024-04-10 00:31:52 +05:30
renovate[bot]andHarsh Shandilya 0e8f1a51bf chore(deps): update plugin com.gradle.develocity to v3.17.1 2024-04-10 00:31:52 +05:30
renovate[bot]andGitHub 52829fedb2 chore(deps): update dependency com.mikepenz.aboutlibraries.plugin to v11.1.3 2024-04-09 17:12:54 +00:00
renovate[bot]andGitHub 4e479cf0f1 chore(deps): update aboutlibraries to v11.1.2 2024-04-09 14:30:56 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2020f43dd6 chore(deps): update gradle/actions digest to 1168cd3 (#514)
[![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 | `e24011a` -> `1168cd3` |

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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/msfjarvis/compose-lobsters).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-09 04:17:33 +00:00
Harsh Shandilya 659eaf9789 feat: enable Compose strong skipping mode 2024-04-09 09:43:22 +05:30
renovate[bot]andGitHub a410267f99 chore(deps): update agp to v8.5.0-alpha04 2024-04-08 18:31:44 +00:00
renovate[bot]andGitHub 6f248c529e fix(deps): update sentry to v7.7.0 2024-04-08 12:56:18 +00:00
renovate[bot]andGitHub 142fafba23 fix(deps): update konvert to v3.1.0 2024-04-06 03:34:33 +00:00
renovate[bot]andGitHub 7119cda579 chore(deps): update sqldelight to v2.0.2 2024-04-06 01:21:27 +00:00
renovate[bot]andGitHub e3c1213be6 chore(deps): update github/codeql-action action to v3.24.10 2024-04-05 17:12:11 +00:00
renovate[bot]andGitHub 5487615436 chore(deps): update plugin ksp to v1.9.23-1.0.20 2024-04-05 02:24:24 +00:00
renovate[bot]andGitHub 619b771aff chore(deps): update gradle/actions digest to e24011a 2024-04-04 21:53:02 +00:00
Harsh Shandilya a12a1f92a5 fix(deps): update dev.chrisbanes.compose:compose-bom to 2024.04.00-alpha01 2024-04-04 04:28:24 +05:30
Harsh Shandilya dc70293bd4 fix(deps): update glance to 1.1.0-beta01 2024-04-04 04:22:42 +05:30
renovate[bot]andGitHub f9ecdebc63 fix(deps): update androidx 2024-04-03 19:35:21 +00:00
renovate[bot]andHarsh Shandilya 4a96af17f4 chore(deps): update plugin com.gradle.enterprise to v3.17 2024-04-03 11:22:18 +05:30
renovate[bot]andGitHub e9b69c5cad chore(deps): update agp to v8.5.0-alpha03 2024-04-02 14:08:09 +00:00
Harsh Shandilya d3f9bb4c00 fix(build): switch over to includeGroupAndSubgroups API
The bug that broke this was fixed in Gradle 8.7
2024-03-31 17:33:16 +05:30
renovate[bot]andHarsh Shandilya feae5d2630 chore(deps): update plugin licensee to v1.11.0
(cherry picked from commit a030290ec242a469d5610c85e2faa1c26ed2535f)
2024-03-30 03:00:45 +05:30
renovate[bot]andGitHub df7868de2d fix(deps): update dagger to v2.51.1 2024-03-29 20:04:32 +00:00
renovate[bot]andGitHub 8a66361a98 fix(deps): update retrofit to v2.11.0 2024-03-29 01:03:51 +00:00
renovate[bot]andGitHub 3099ffe201 chore(deps): update plugin licensee to v1.10.0 2024-03-28 21:21:17 +00:00
renovate[bot]andGitHub 0fc9c28354 fix(deps): update dependency com.slack.lint:slack-lint-checks to v0.7.1 2024-03-27 18:10:39 +00:00
renovate[bot]andGitHub 6ba7dec98d chore(deps): update actions/setup-python digest to 82c7e63 2024-03-26 16:20:57 +00:00
renovate[bot]andGitHub 332a84c6ec fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.4.0 2024-03-26 13:09:10 +00:00
renovate[bot]andGitHub a19a5e926c chore(deps): update actions/dependency-review-action digest to 5bbc3ba 2024-03-26 08:10:02 +00:00
renovate[bot]andGitHub bd952b74d8 chore(deps): update actions/dependency-review-action digest to 733dd5d 2024-03-24 14:30:41 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
3e374df3aa chore(deps): update aboutlibraries to v11.1.1 (#499)
[![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.mikepenz.aboutlibraries.plugin | `11.1.0` -> `11.1.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.mikepenz.aboutlibraries.plugin/11.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.mikepenz.aboutlibraries.plugin/11.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.mikepenz.aboutlibraries.plugin/11.1.0/11.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.mikepenz.aboutlibraries.plugin/11.1.0/11.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[com.mikepenz:aboutlibraries-compose-m3](https://togithub.com/mikepenz/AboutLibraries)
| `11.1.0` -> `11.1.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.mikepenz:aboutlibraries-compose-m3/11.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.mikepenz:aboutlibraries-compose-m3/11.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.mikepenz:aboutlibraries-compose-m3/11.1.0/11.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.mikepenz:aboutlibraries-compose-m3/11.1.0/11.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>mikepenz/AboutLibraries
(com.mikepenz:aboutlibraries-compose-m3)</summary>

###
[`v11.1.1`](https://togithub.com/mikepenz/AboutLibraries/releases/tag/v11.1.1)

##### 🚀 Features

-   Library Serializer
- PR:
[#&#8203;963](https://togithub.com/mikepenz/AboutLibraries/issues/963)
    -   Thanks [@&#8203;DatL4g](https://togithub.com/DatL4g)
-   Update major dependencies | Compose 1.6.4 | Compose-MP 1.6.1
- PR:
[#&#8203;968](https://togithub.com/mikepenz/AboutLibraries/issues/968)

##### 🐛 Fixes

- Set onclick listener of SimpleLibraryItem to null if no license is
known
- PR:
[#&#8203;966](https://togithub.com/mikepenz/AboutLibraries/issues/966)
    -   Thanks [@&#8203;alexbakker](https://togithub.com/alexbakker)
-   Sort a copy of the list of libraries to prevent a crash
- PR:
[#&#8203;967](https://togithub.com/mikepenz/AboutLibraries/issues/967)
    -   Thanks [@&#8203;alexbakker](https://togithub.com/alexbakker)

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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/msfjarvis/compose-lobsters).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI2MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-23 16:40:19 +00:00
renovate[bot]andGitHub 6b67819007 chore(deps): update mobsf/mobsfscan digest to 35b2016 2024-03-23 00:34:18 +00:00
Harsh Shandilya 83af44b0e6 Merge remote-tracking branches 'origin/renovate/agp' and 'origin/renovate/gradle-8.x'
* origin/renovate/agp:
  chore(deps): update agp to v8.5.0-alpha02

* origin/renovate/gradle-8.x:
  chore(deps): update dependency gradle to v8.7
2024-03-23 00:42:53 +05:30
renovate[bot]andGitHub bec12d8e09 chore(deps): update dependency gradle to v8.7 2024-03-22 18:18:14 +00:00
renovate[bot]andGitHub b34fc8c721 chore(deps): update agp to v8.5.0-alpha02 2024-03-22 18:10:16 +00:00
renovate[bot]andGitHub dc51fa7802 chore(deps): update github/codeql-action action to v3.24.9 2024-03-22 11:49:49 +00:00
renovate[bot]andGitHub 42a667462f fix(deps): update dependency dev.chrisbanes.compose:compose-bom to v2024.03.00-alpha02 2024-03-20 22:24:53 +00:00
renovate[bot]andGitHub c76661762f chore(deps): update actions/dependency-review-action digest to 0fa40c3 2024-03-20 20:39:57 +00:00
Harsh Shandilya 9dab223da8 fix(deps): update agp to 8.5.0-alpha01 2024-03-21 01:57:58 +05:30
Harsh Shandilya 1ef6b2bf91 chore: minor formatting tweak 2024-03-21 01:29:44 +05:30
Harsh Shandilya f2f3319ac4 fix(deps): update AndroidX dependencies 2024-03-21 01:21:39 +05:30
Harsh Shandilya 7fd9cef051 chore: fix link to IzzyOnDroid badge 2024-03-20 23:21:26 +05:30
Harsh Shandilya 4d4cccbba9 chore(readme): add IzzyOnDroid badge 2024-03-19 22:41:25 +05:30
GitHub Actions aff0e366fe feat(release): start next development iteration 2024-03-19 12:57:11 +00:00
99 changed files with 1711 additions and 1271 deletions
+1
View File
@@ -3,3 +3,4 @@
**/clawicons/** linguist-generated
android/src/main/baseline-prof.txt linguist-generated -diff
android/src/main/generated/** linguist-generated -diff
**/screenshotTest/**/*.png filter=lfs diff=lfs merge=lfs -text
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 KiB

After

Width:  |  Height:  |  Size: 319 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 KiB

After

Width:  |  Height:  |  Size: 315 KiB

+13 -13
View File
@@ -7,6 +7,11 @@
"github>msfjarvis/shared-workflows//renovate/automerge"
],
"branchConcurrentLimit": 15,
"github-actions": {
"fileMatch": [
".github/reusable-workflows/.+\\.ya?ml$",
],
},
"packageRules": [
{
matchDatasources: [
@@ -20,11 +25,11 @@
],
},
{
"matchPackageNames": [
"androidx.compose.compiler:compiler",
"matchDepNames": [
"com.google.devtools.ksp",
"dev.drewhamilton.poko",
"org.jetbrains.kotlin:kotlin-gradle-plugin",
"org.jetbrains.kotlin.plugin.compose",
"org.jetbrains.kotlin.plugin.serialization",
],
"groupName": "Kotlin and Compose",
@@ -48,6 +53,12 @@
],
"allowedVersions": "!/.*-1-8$/",
},
{
"matchDepNames": [
"androidx.compose:compose-bom",
],
"allowedVersions": "/.*-alpha$/",
},
{
"matchPackagePatterns": [
"^androidx.glance",
@@ -67,16 +78,5 @@
"depNameTemplate": "com.facebook:ktfmt",
"registryUrlTemplate": "https://repo1.maven.org/maven2/",
},
{
"fileMatch": [
"gradle/libs.versions.toml"
],
"matchStrings": [
"composeCompiler = \"(?<currentValue>.*)\""
],
"datasourceTemplate": "maven",
"depNameTemplate": "androidx.compose.compiler:compiler",
"registryUrlTemplate": "https://maven.google.com",
},
],
}
@@ -0,0 +1,43 @@
name: 'Setup Gradle'
description: 'Checks out the repository and sets up Java and Gradle'
inputs:
token:
description: 'token input for actions/checkout'
required: false
default: ${{ github.token }}
fetch-depth:
description: 'fetch-depth input for actions/checkout'
required: false
default: 1
cache-read-only:
description: 'cache-read-only input for gradle/actions/setup-gradle'
required: false
default: ${{ github.event.repository != null && github.ref_name != github.event.repository.default_branch }}
dependency-graph:
description: 'dependency-graph input for gradle/actions/setup-gradle'
required: false
default: 'disabled'
runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: ${{ inputs.fetch-depth }}
token: ${{ inputs.token }}
lfs: true
- name: Set up JDK
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0
with:
distribution: temurin
java-version: 22
- name: Setup Gradle
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4
with:
gradle-home-cache-cleanup: true
cache-read-only: ${{ inputs.cache-read-only }}
add-job-summary: always
dependency-graph: ${{ inputs.dependency-graph }}
validate-wrappers: true
+5 -17
View File
@@ -18,23 +18,11 @@ jobs:
check:
runs-on: macos-14
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup build environment
uses: msfjarvis/compose-lobsters/.github/reusable-workflows/setup-gradle@main
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: temurin
java-version: 18
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
gradle-home-cache-cleanup: true
add-job-summary: always
dependency-graph: generate-and-submit
- name: Check changelog format
@@ -48,7 +36,7 @@ jobs:
- name: (Fail-only) Upload test report
if: failure()
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: Test report
path: '**/build/reports/tests/**'
@@ -60,10 +48,10 @@ jobs:
- check
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Dependency Review
uses: actions/dependency-review-action@9129d7d40b8c12c1ed0f60400d00c92d437adcce # v4
uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4
with:
base-ref: refs/heads/main
head-ref: ${{ github.ref }}
+9 -17
View File
@@ -22,22 +22,14 @@ jobs:
name: CodeQL
runs-on: macos-14
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: temurin
java-version: 18
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3
- name: Setup build environment
uses: msfjarvis/compose-lobsters/.github/reusable-workflows/setup-gradle@main
with:
fetch-depth: 0
cache-read-only: true
- name: Initialize CodeQL
uses: github/codeql-action/init@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8
uses: github/codeql-action/init@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
languages: java
tools: latest
@@ -49,7 +41,7 @@ jobs:
./gradlew assembleDebug assembleInternal
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8
uses: github/codeql-action/analyze@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
category: "/language:java"
mobsfscan:
@@ -57,19 +49,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
with:
python-version: 3.8
- name: Run mobsfscan
uses: MobSF/mobsfscan@e29e85c36fa1aa950d7f1b1064345d94a70b2a28
uses: MobSF/mobsfscan@25184ed98afa315d90f982d10a44e42c065dcebe
with:
args: . --sarif --output results.sarif || true
- name: Upload mobsfscan report
uses: github/codeql-action/upload-sarif@05963f47d870e2cb19a537396c1f668a348c7d8f # v3.24.8
uses: github/codeql-action/upload-sarif@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
sarif_file: results.sarif
+5 -16
View File
@@ -5,7 +5,7 @@ on:
inAppUpdatePriority:
description: 'In app update priority (0-5)'
type: number
default: "0"
default: 0
required: false
concurrency:
@@ -15,23 +15,12 @@ jobs:
publish-google-play-release:
runs-on: macos-14
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup build environment
uses: msfjarvis/compose-lobsters/.github/reusable-workflows/setup-gradle@main
with:
token: ${{ secrets.POST_RELEASE_GH_TOKEN }}
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: temurin
java-version: 18
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
gradle-home-cache-cleanup: true
- name: Set up Git author
shell: bash
@@ -54,7 +43,7 @@ jobs:
echo VERSION="${VERSION}" >> $GITHUB_ENV
- name: Update changelog
uses: msfjarvis/keep-a-changelog-new-release@78cddbe3549f1c9263a2d754446d3765e865c518 # v2.1.1
uses: msfjarvis/keep-a-changelog-new-release@e60399f488b25149c0963a4e22fff928a9277ce7 # v2.2.0
with:
tag: v${{ env.VERSION }}
version: ${{ env.VERSION }}
@@ -70,7 +59,7 @@ jobs:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: |
./gradlew --no-configuration-cache collectReleaseApks collectReleaseBundle -PenableSentry
./gradlew --no-configuration-cache assembleRelease collectReleaseApks collectReleaseBundle -PenableSentry
- name: Clean secrets
run: scripts/signing-cleanup.sh
+4 -14
View File
@@ -16,26 +16,16 @@ jobs:
signed-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: temurin
java-version: 18
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3
- name: Setup build environment
uses: msfjarvis/compose-lobsters/.github/reusable-workflows/setup-gradle@main
with:
cache-read-only: true
gradle-home-cache-cleanup: true
- name: Build release app
run: |
./scripts/setup-age.sh
./scripts/signing-setup.sh "$AGE_SECRET_KEY"
./gradlew --no-configuration-cache --stacktrace -PenableSentry collectReleaseBundle
./gradlew --no-configuration-cache --stacktrace assembleRelease collectReleaseBundle -PenableSentry
./scripts/signing-cleanup.sh
env:
AGE_SECRET_KEY: ${{ secrets.AGE_SECRET_KEY }}
@@ -45,7 +35,7 @@ jobs:
ORG_GRADLE_PROJECT_VERSION_CODE: ${{ github.event.inputs.versionCode }}
- name: Upload app bundle
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: release-aab
path: android/build/outputs/bundle/release/android-release.aab
+1
View File
@@ -247,3 +247,4 @@ keystore.properties
distribution/
screenshots/
claw-export.json
.kotlin/
+1
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KtfmtSettings">
<option name="enableKtfmt" value="Enabled" />
<option name="enabled" value="true" />
<option name="uiFormatterStyle" value="Google (internal)" />
</component>
+221 -171
View File
@@ -7,469 +7,519 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [1.51.0] - 2024-09-22
### Fixed
- Pull to refresh indicator is no longer hiding behind the top app bar
- User profile page correctly renders contents below the top app bar
- Revert unread comment handling changes that caused false positives
## [1.50.0] - 2024-08-30
### Fixed
- Search bar draws under the status bar when hiding keyboard
- Bottom of the comments page is cut off by the navigation bar
- Rare crash in comments page
## [1.49.0] - 2024-08-29
### Added
- Opening posts you have previously seen will show the number of new comments since last visit
### Fixed
- Saving posts no longer triggers a page refresh that invalidates scroll position
### Changed
- Change submitter text to 'authored' when applicable
- Unread comments now have a brighter background rather than a text badge
- Bottom navigation bar has been redesigned
## [1.48.0] - 2024-06-05
### Added
- Swiping a post from left to right now offers a share action
### Fixed
- Try to workaround an infrequent crash when scrolling hottest/newest posts
### Changed
- Upgrade to Kotlin 2.0.0
- Upgrade to Compose May beta releases
## [1.47.0] - 2024-05-14
### Changed
- Bring back dividers between posts (I regret my earlier choices)
- Upgrade to Compose May stable releases
### Fixed
- Navigating to user profiles now works when invoked from the search
results page
- Fix occasional crashes due to the app incorrectly trying to open
multiple database connections
## [1.46.0] - 2024-04-24
### Changed
- Remove dividers between posts
- Post titles in lists are now truncated to be a single line
### Fixed
- Disable logging of network errors to Sentry
- Add potential workaround for navigation-related crashes
## [1.45.0] - 2024-04-24
### Changed
- Upgrade to Compose April releases
- Story items are now more compact so you can see more items
on your screen.
### Fixed
- Fixed a crash when clicking an item on the bottom navigation bar
too quickly
- Removed buggy deeplinks
- Clicking a username now correctly navigates to the right page in-app
## [1.44.0] - 2024-03-19
### Fixed
* Fixed a bug in the database code that was triggering crashes for
a subset of upgrading users
- Fixed a bug in the database code that was triggering crashes for
a subset of upgrading users
## [1.43.0] - 2024-03-17
### Fixed
* Fix crash when trying to open a comments-only post from
the home screen widget
- Fix crash when trying to open a comments-only post from
the home screen widget
## [1.42.0] - 2024-03-16
### Fixed
* Adapt to changes in lobste.rs API
- Adapt to changes in lobste.rs API
## [1.41.0] - 2024-03-07
### Fixed
* Downgrade dependency that was pulling in extraneous storage
permissions which the app does not require.
- Downgrade dependency that was pulling in extraneous storage
permissions which the app does not require.
## [1.40.0] - 2024-03-07
### Changed
* Update to Compose March releases
* Improve performance of frequently invoked database queries
* Refactor UI data model to improve state handling
* Make saved posts update in the background more often
* Consolidate widget display logic
* Rework some theming logic to align with new Material guidelines
- Update to Compose March releases
- Improve performance of frequently invoked database queries
- Refactor UI data model to improve state handling
- Make saved posts update in the background more often
- Consolidate widget display logic
- Rework some theming logic to align with new Material guidelines
## [1.39.0] - 2024-01-23
### Changed
* Add HTML bookmarks as an export format
* Rework widget item layout for consistent touch targets
* Add attribution for libraries used in the app
* Redesign settings screen
* Update to Compose December releases
- Add HTML bookmarks as an export format
- Rework widget item layout for consistent touch targets
- Add attribution for libraries used in the app
- Redesign settings screen
- Update to Compose December releases
## [1.38.0] - 2023-11-20
### Changed
* Add brand new icon by dzuk
* Fix a bug that caused the app to fetch the same 20 posts over and over
* Significantly improve scrolling performance when there are a lot of saved posts
* Move search feature to its own screen
* Make top app and bottom system bars use the same color
* Reduce unnecessary API calls in search screen
* Upgrade to Compose November releases
* Enable logging of SQLite queries
- Add brand new icon by dzuk
- Fix a bug that caused the app to fetch the same 20 posts over and over
- Significantly improve scrolling performance when there are a lot of saved posts
- Move search feature to its own screen
- Make top app and bottom system bars use the same color
- Reduce unnecessary API calls in search screen
- Upgrade to Compose November releases
- Enable logging of SQLite queries
## [1.37.0] - 2023-10-06
### Changed
* Fixed a crash that infrequently happened in the comments page
* Fixed a crash when trying to list saved posts
* Fixed a crash in home screen widget when user had less than 50 saved posts
* Upgraded to Compose 1.6.0-alpha07
- Fixed a crash that infrequently happened in the comments page
- Fixed a crash when trying to list saved posts
- Fixed a crash in home screen widget when user had less than 50 saved posts
- Upgraded to Compose 1.6.0-alpha07
## [1.36.0] - 2023-10-04
### Added
* Introduce an initial attempt at a home screen widget
- Introduce an initial attempt at a home screen widget
### Changed
* Fixed a crash triggered when swiping items
* Adjusted pull to refresh component to match Material You theme
- Fixed a crash triggered when swiping items
- Adjusted pull to refresh component to match Material You theme
## [1.35.0] - 2023-09-19
### Changed
* Fixed missing vertical spacing between post tags
* Fixed user profile links not displaying correctly in-app
* Update to Compose October release
- Fixed missing vertical spacing between post tags
- Fixed user profile links not displaying correctly in-app
- Update to Compose October release
## [1.34.0] - 2023-08-30
### Added
* Add a swipe action on each story to open the comments page on `lobste.rs`
* Automatically mark posts as "read" and visually distinguish between them
- Add a swipe action on each story to open the comments page on `lobste.rs`
- Automatically mark posts as "read" and visually distinguish between them
### Changed
* Tweak list items to reduce vertical size and adjust colors
* Drop bogus workarounds for native library crashes
* Updated Jetpack Compose and SQLite
- Tweak list items to reduce vertical size and adjust colors
- Drop bogus workarounds for native library crashes
- Updated Jetpack Compose and SQLite
### Fixed
* Rework how comments are displayed to adapt to lobste.rs API change
- Rework how comments are displayed to adapt to lobste.rs API change
## [1.33.0] - 2023-07-31
### Changed
* Yet another attempt at fixing native library crashes
* Rework how baseline profiles are generated
- Yet another attempt at fixing native library crashes
- Rework how baseline profiles are generated
## [1.32.0] - 2023-07-27
### Changed
* Upgrade to AndroidX July 26 release
* Revert selectable text feature due to sporadic crashes
- Upgrade to AndroidX July 26 release
- Revert selectable text feature due to sporadic crashes
## [1.31.0] - 2023-07-25
### Added
* Added the ability to search for posts
* Text in the comments page is now selectable
- Added the ability to search for posts
- Text in the comments page is now selectable
### Changed
* Upgrade to Compose July release
* Upgrade to Kotlin 1.9.0
- Upgrade to Compose July release
- Upgrade to Kotlin 1.9.0
## [1.30.0] - 2023-07-02
### Changed
* Added another workaround for native library loading crash
- Added another workaround for native library loading crash
## [1.29.0] - 2023-06-08
### Added
* Backup and restore options for saved posts
- Backup and restore options for saved posts
### Fixed
* Spamming the comments button no longer causes it to be opened multiple times
* Saved posts screen now has a visual indication when you have nothing saved
* Iconography has been updated across the board to be more consistent
- Spamming the comments button no longer causes it to be opened multiple times
- Saved posts screen now has a visual indication when you have nothing saved
- Iconography has been updated across the board to be more consistent
## [1.28.0] - 2023-06-03
### Changed
* Navigation transitions have been slightly sped up
- Navigation transitions have been slightly sped up
### Fixed
* Add workaround for a native library loading crash observed on some devices
- Add workaround for a native library loading crash observed on some devices
## [1.27.0] - 2023-05-31
### Changed
* Small accessibility improvements
* Slightly tweak the layout for story items to take less vertical space
* Upgrade to Compose `1.5.0-beta01` release
* Set accessibility web URI for profile screen
* Directly use Material Icons from upstream artifacts
* Upgrade dependencies
* Add adaptive navigation support (thanks @Yash-Garg)
* Use latest SQLite for backing databases
- Small accessibility improvements
- Slightly tweak the layout for story items to take less vertical space
- Upgrade to Compose `1.5.0-beta01` release
- Set accessibility web URI for profile screen
- Directly use Material Icons from upstream artifacts
- Upgrade dependencies
- Add adaptive navigation support (thanks @Yash-Garg)
- Use latest SQLite for backing databases
## [1.26.0] - 2023-05-03
### Changed
* Upgrade to Compose May release
* Disable Sentry performance reporting
* Migrate to Compose Foundation `FlowRow` in `LobstersCard`
- Upgrade to Compose May release
- Disable Sentry performance reporting
- Migrate to Compose Foundation `FlowRow` in `LobstersCard`
## [1.25.0] - 2023-04-18
### Changed
* Make the app draw edge to edge
* Simplify Top App Bar color scheme
* Rework how baseline profiles are generated
* Upgrade to Compose April release
- Make the app draw edge to edge
- Simplify Top App Bar color scheme
- Rework how baseline profiles are generated
- Upgrade to Compose April release
## [1.24.0] - 2023-03-24
### Changed
* Rebuild app icon assets to align better with Material guidelines
* Adopt Slack's Compose lints and address issues found by it
* Upgrade to OkHttp 4.x
* Upgrade to Compose March release
* Start work on support for logging in with lobste.rs
- Rebuild app icon assets to align better with Material guidelines
- Adopt Slack's Compose lints and address issues found by it
- Upgrade to OkHttp 4.x
- Upgrade to Compose March release
- Start work on support for logging in with lobste.rs
## [1.23.0] - 2023-03-02
### Added
* Introduce [Sentry](https://sentry.io) for error reporting and performance monitoring
- Introduce [Sentry](https://sentry.io) for error reporting and performance monitoring
## [1.22.0] - 2023-03-02
### Changed
* In-app browser now respects the user's choice for dark mode
* Upgrade dependencies
- In-app browser now respects the user's choice for dark mode
- Upgrade dependencies
## [1.21.0] - 2023-02-09
### Changed
* Fix bug that caused the app to crash on launch
- Fix bug that caused the app to crash on launch
## [1.20.0] - 2023-02-09
### Changed
* Upgrade dependencies
- Upgrade dependencies
## [1.19.0] - 2023-02-01
### Changed
* Upgrade dependencies
* Optimize packaged baseline profiles
- Upgrade dependencies
- Optimize packaged baseline profiles
## [1.18.0] - 2023-01-21
### Changed
* Special-case deleted stories in comments API
* Fix regression where save button had the incorrect visual state
- Special-case deleted stories in comments API
- Fix regression where save button had the incorrect visual state
## [1.17.0] - 2023-01-12
### Added
* The app will now mark new comments as unread when returning to posts
- The app will now mark new comments as unread when returning to posts
### Changed
* Upgrade to Kotlin 1.8.0
* Revert questionable app bar scrolling behaviour change
- Upgrade to Kotlin 1.8.0
- Revert questionable app bar scrolling behaviour change
## [1.16.0] - 2022-12-24
### Changed
* Fix bug where newest posts tab actually showed hottest posts instead
- Fix bug where newest posts tab actually showed hottest posts instead
## [1.15.0] - 2022-12-20
### Changed
* Fix a case where collapsing the parent of an already collapsed comment caused it to become expanded
* Tweak progress bar UI to use a linear indicator
* Allow app bar to hide when scrolling down
* Fix bug where refreshing a list of posts caused it to jump around multiple times
- Fix a case where collapsing the parent of an already collapsed comment caused it to become expanded
- Tweak progress bar UI to use a linear indicator
- Allow app bar to hide when scrolling down
- Fix bug where refreshing a list of posts caused it to jump around multiple times
## [1.14.0] - 2022-12-12
### Changed
* Rework how often saved posts are updated
* Collapsing a comment now collapses all comments under it similar to how it works on the website
- Rework how often saved posts are updated
- Collapsing a comment now collapses all comments under it similar to how it works on the website
## [1.13.0] - 2022-12-10
### Changed
* Fix crash when viewing [jcs](https://lobste.rs/u/jcs)' comments
- Fix crash when viewing [jcs](https://lobste.rs/u/jcs)' comments
## [1.12.0] - 2022-12-09
### Changed
* Do not schedule post update job every time the app starts
* Improve favicon loading to reduce unnecessary redraws
* Fix post lists being reloaded unnecessarily
- Do not schedule post update job every time the app starts
- Improve favicon loading to reduce unnecessary redraws
- Fix post lists being reloaded unnecessarily
## [1.11.0] - 2022-12-07
### Changed
* Upgrade to Compose 2022.12.00 release
* Refresh packaged baseline profile
* Improve how saved state of posts is queried
- Upgrade to Compose 2022.12.00 release
- Refresh packaged baseline profile
- Improve how saved state of posts is queried
## [1.10.0] - 2022-11-30
### Changed
* Configure Coil image loader with better caching settings
* Refresh packaged baseline profile
- Configure Coil image loader with better caching settings
- Refresh packaged baseline profile
## [1.9.0] - 2022-11-28
### Changed
* A loading indicator is added to the bottom of the post list to identify when new posts are being fetched
- A loading indicator is added to the bottom of the post list to identify when new posts are being fetched
## [1.8.0] - 2022-11-21
### Changed
* The release pipeline now automatically generates Play Store release notes from the changelog file
- The release pipeline now automatically generates Play Store release notes from the changelog file
### Fixed
* Downgrade AGP to 8.0.0-alpha07 to fix Baseline Profiles not being packaged
- Downgrade AGP to 8.0.0-alpha07 to fix Baseline Profiles not being packaged
## [1.7.0] - 2022-11-19
### Changed
* Switch to Compose Material's swipe refresh feature
* Change metadata extractor logic to no longer prefer canonical URLs. The submitted URL will be retained as-is now.
* Remove navigation transition animations
- Switch to Compose Material's swipe refresh feature
- Change metadata extractor logic to no longer prefer canonical URLs. The submitted URL will be retained as-is now.
- Remove navigation transition animations
## [1.6.0] - 2022-11-14
### Changed
* Migrate dependency injection from Hilt to Anvil + Whetstone
- Migrate dependency injection from Hilt to Anvil + Whetstone
## [1.5.0] - 2022-11-10
### Changed
* Upgrade to Compose 2022.11.00 release
- Upgrade to Compose 2022.11.00 release
## [1.4.0] - 2022-11-02
### Changed
* Misc fixes to link metadata extractor
- Misc fixes to link metadata extractor
## [1.3.0] - 2022-10-24
### Changed
* Prevent errors during link metadata retrieval from crashing the app
* Update Jetpack libraries to 2022-10-24 release
- Prevent errors during link metadata retrieval from crashing the app
- Update Jetpack libraries to 2022-10-24 release
## [1.2.0] - 2022-10-17
### Changed
* Lazily load link metadata to improve comment page loading speed
* Upgrade to latest Compose release
* Refactor code to align with Twitter's public Compose guidelines
- Lazily load link metadata to improve comment page loading speed
- Upgrade to latest Compose release
- Refactor code to align with Twitter's public Compose guidelines
## [1.1.0] - 2022-09-30
### Added
* Add score and relative time to comments
- Add score and relative time to comments
### Changed
* Update Jetpack Compose
* Declare data backup and transfer rules
* Improve legibility of links in comments and user profiles
* Commonize and improve how network errors are displayed
- Update Jetpack Compose
- Declare data backup and transfer rules
- Improve legibility of links in comments and user profiles
- Commonize and improve how network errors are displayed
## [1.0.0] - 2022-09-20
* Initial Play Store release
[Unreleased]: https://github.com/msfjarvis/compose-lobsters/compare/v1.44.0...HEAD
- Initial Play Store release
[Unreleased]: https://github.com/msfjarvis/compose-lobsters/compare/v1.51.0...HEAD
[1.51.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.50.0...v1.51.0
[1.50.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.49.0...v1.50.0
[1.49.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.48.0...v1.49.0
[1.48.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.47.0...v1.48.0
[1.47.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.46.0...v1.47.0
[1.46.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.45.0...v1.46.0
[1.45.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.44.0...v1.45.0
[1.44.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.43.0...v1.44.0
[1.43.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.42.0...v1.43.0
[1.42.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.41.0...v1.42.0
[1.41.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.40.0...v1.41.0
[1.40.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.39.0...v1.40.0
[1.39.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.38.0...v1.39.0
[1.38.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.37.0...v1.38.0
[1.37.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.36.0...v1.37.0
[1.36.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.35.0...v1.36.0
[1.35.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.34.0...v1.35.0
[1.34.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.33.0...v1.34.0
[1.33.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.32.0...v1.33.0
[1.32.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.31.0...v1.32.0
[1.31.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.30.0...v1.31.0
[1.30.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.29.0...v1.30.0
[1.29.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.28.0...v1.29.0
[1.28.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.27.0...v1.28.0
[1.27.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.26.0...v1.27.0
[1.26.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.25.0...v1.26.0
[1.25.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.24.0...v1.25.0
[1.24.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.23.0...v1.24.0
[1.23.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.22.0...v1.23.0
[1.22.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.21.0...v1.22.0
[1.21.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.20.0...v1.21.0
[1.20.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.19.0...v1.20.0
[1.19.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.18.0...v1.19.0
[1.18.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.17.0...v1.18.0
[1.17.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.16.0...v1.17.0
[1.16.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.15.0...v1.16.0
[1.15.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.14.0...v1.15.0
[1.14.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.13.0...v1.14.0
[1.13.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.12.0...v1.13.0
[1.12.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.11.0...v1.12.0
[1.11.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.10.0...v1.11.0
[1.10.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.9.0...v1.10.0
[1.9.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.8.0...v1.9.0
[1.8.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.7.0...1.8.0
[1.7.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.6.0...v1.7.0
[1.6.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.5.0...v1.6.0
[1.5.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.4.0...v1.5.0
[1.4.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.3.0...v1.4.0
[1.3.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.2.0...v1.3.0
[1.2.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/msfjarvis/compose-lobsters/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/msfjarvis/compose-lobsters/compare/29c374859b17c5fcef03585b8a01c00070de9097...v1.0.0
+6
View File
@@ -8,6 +8,12 @@ Unofficial Android app for read-only access to [lobste.rs](https://lobste.rs), b
height="80" />
</a>
<a href="https://android.izzysoft.de/repo/apk/dev.msfjarvis.claw.android">
<img src="./.github/izzy-badge.webp"
alt="Get it on IzzyOnDroid"
height="80" />
</a>
> [!NOTE]
> Daily builds are published to the Google Play 'Open Testing' channel (if there are any changes), which can be opted into via this link: [[Android]](https://play.google.com/store/apps/details?id=dev.msfjarvis.claw.android) [[Web]](https://play.google.com/apps/testing/dev.msfjarvis.claw.android)
+31 -9
View File
@@ -16,27 +16,32 @@ plugins {
id("dev.msfjarvis.claw.sentry")
id("dev.msfjarvis.claw.versioning-plugin")
alias(libs.plugins.aboutlibraries)
alias(libs.plugins.android.junit5)
alias(libs.plugins.anvil)
alias(libs.plugins.modulegraphassert)
alias(libs.plugins.whetstone)
alias(libs.plugins.baselineprofile)
alias(libs.plugins.licensee)
alias(libs.plugins.tracelog)
alias(libs.plugins.kotlin.composeCompiler)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.navigation.safeargs)
alias(libs.plugins.screenshot)
}
android {
namespace = "dev.msfjarvis.claw.android"
defaultConfig.applicationId = "dev.msfjarvis.claw.android"
defaultConfig.testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
buildFeatures.compose = true
composeOptions {
useLiveLiterals = false
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
}
composeOptions { useLiveLiterals = false }
buildTypes.create("internal") {
matchingFallbacks += "release"
signingConfig = signingConfigs["debug"]
applicationIdSuffix = ".internal"
debuggable(true)
}
experimentalProperties["android.experimental.enableScreenshotTest"] = true
}
baselineProfile {
@@ -51,6 +56,7 @@ licensee {
ignoreDependencies("com.michael-bull.kotlin-result") { because("kotlin-result is ISC licensed") }
ignoreDependencies("org.commonmark") { because("Commonmark is BSD licensed") }
allowUrl("https://jsoup.org/license") { because("Jsoup is MIT licensed") }
allowUrl("https://opensource.org/licenses/MIT") { because("That's the MIT license text") }
}
moduleGraphAssert {
@@ -71,38 +77,54 @@ dependencies {
implementation(platform(libs.okhttp.bom))
implementation(libs.aboutLibraries.m3)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.compose.animation)
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.glance)
implementation(libs.androidx.compose.glance.m3)
implementation(libs.androidx.compose.material.icons.extended)
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.material3.window.size)
implementation(libs.androidx.compose.runtime)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.ui.text)
implementation(libs.androidx.compose.ui.util)
implementation(libs.androidx.core.splashscreen)
implementation(libs.androidx.lifecycle.compose)
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.paging.compose)
implementation(libs.androidx.profileinstaller)
implementation(libs.androidx.work.runtime)
implementation(libs.coil)
implementation(libs.copydown)
implementation(libs.dagger)
implementation(libs.jsoup)
implementation(libs.eithernet)
implementation(libs.haze)
implementation(libs.haze.materials)
implementation(libs.javax.inject)
implementation(libs.kotlinx.collections.immutable)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.material3.pulltorefresh)
implementation(libs.kotlinx.serialization.core)
implementation(libs.kotlinx.serialization.json)
implementation(libs.napier)
implementation(libs.okhttp.core)
implementation(libs.okhttp.loggingInterceptor)
implementation(libs.retrofit)
implementation(libs.sqldelight.extensions.coroutines)
implementation(libs.swipe)
implementation(libs.unfurl)
implementation(projects.api)
implementation(projects.common)
implementation(projects.core)
implementation(projects.database.core)
implementation(projects.database.impl)
implementation(projects.model)
implementation(projects.web)
kapt(libs.dagger.compiler)
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.okhttp.mockwebserver)
screenshotTestImplementation(libs.androidx.compose.ui.tooling)
addTestDependencies(project)
androidTestImplementation(libs.androidx.test.espresso.core)
androidTestImplementation(libs.androidx.test.uiautomator)
androidTestImplementation(libs.leakcanary.android.test)
}
+1 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.3.0" type="baseline" client="gradle" dependencies="true" name="AGP (8.3.0)" variant="all" version="8.3.0">
<issues format="6" by="lint 8.4.2" type="baseline" client="gradle" dependencies="true" name="AGP (8.4.2)" variant="all" version="8.4.2">
<issue
id="VectorPath"
@@ -0,0 +1,13 @@
<!--
~ Copyright © 2021-2024 Harsh Shandilya.
~ Use of this source code is governed by an MIT-style
~ license that can be found in the LICENSE file or at
~ https://opensource.org/licenses/MIT.
-->
<manifest
xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Performing the heap growth analysis in process requires more heap. -->
<application
android:largeHeap="true"/>
</manifest>
@@ -0,0 +1,59 @@
/*
* Copyright © 2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
package dev.msfjarvis.claw.android
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.By
import androidx.test.uiautomator.BySelector
import androidx.test.uiautomator.UiDevice
import androidx.test.uiautomator.UiObject2
import androidx.test.uiautomator.Until
import com.google.common.truth.Truth.assertThat
import de.mannodermaus.junit5.ActivityScenarioExtension
import leakcanary.repeatingAndroidInProcessScenario
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.RegisterExtension
import shark.HeapDiff
class HeapGrowthCheck {
@JvmField
@RegisterExtension
@Suppress("Unused")
val scenarioExtension = ActivityScenarioExtension.launch<MainActivity>()
private val detector = HeapDiff.repeatingAndroidInProcessScenario()
private lateinit var device: UiDevice
@BeforeEach
fun setUp() {
val instrumentation = InstrumentationRegistry.getInstrumentation()
device = UiDevice.getInstance(instrumentation)
}
@Test
fun verify_heap_growth() {
val heapGrowth = detector.findRepeatedlyGrowingObjects { device.exploreScreens() }
assertThat(heapGrowth.growingObjects).isEmpty()
}
private companion object {
fun UiDevice.exploreScreens() {
listOf("HOTTEST", "NEWEST", "SAVED").forEach { tag ->
waitForObject(By.res(tag)).click()
waitForIdle()
}
}
private fun UiDevice.waitForObject(selector: BySelector, timeout: Long = 10_000L): UiObject2 {
if (wait(Until.hasObject(selector), timeout)) {
return findObject(selector)
}
error("Object with selector [$selector] not found")
}
}
}
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:10defb7f6abec5d8bd07e07625e30e5b68d3a330e87f157e8138688f8d7ef0aa
size 214795
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:64dd5c002c021774469d7d9a15433678a014f720b6cde2281fbbf20daee98712
size 216093
+3 -102
View File
@@ -11,7 +11,6 @@
<application
android:name=".ClawApplication"
android:dataExtractionRules="@xml/data_extraction_rules"
android:enableOnBackInvokedCallback="true"
android:fullBackupContent="@xml/full_backup_content"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
@@ -32,108 +31,8 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="lobste.rs" />
<data android:pathPattern="/s/......" />
<data android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="lobste.rs" />
<data android:pathPattern="/s/....../" />
<data android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="lobste.rs" />
<data android:pathPattern="/s/....../...*" />
<data android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="lobste.rs" />
<data android:pathPattern="/s/......" />
<data android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="lobste.rs" />
<data android:pathPattern="/s/....../" />
<data android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="lobste.rs" />
<data android:pathPattern="/s/....../...*" />
<data android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="lobste.rs" />
<data android:pathPattern="/s/......" />
<data android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="lobste.rs" />
<data android:pathPattern="/s/....../" />
<data android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="lobste.rs" />
<data android:pathPattern="/s/....../...*" />
<data android:scheme="https" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="lobste.rs" />
<data android:pathPattern="/u/......*" />
<data android:scheme="https" />
</intent-filter>
</activity>
<activity
android:name=".SearchActivity"
android:configChanges="colorMode|density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
@@ -161,6 +60,7 @@
android:value="androidx.startup"
tools:node="remove" />
</provider>
<receiver
android:name=".glance.WidgetReceiver"
android:exported="true">
@@ -171,6 +71,7 @@
android:name="android.appwidget.provider"
android:resource="@xml/saved_posts_widget_info" />
</receiver>
<!-- Required: set your sentry.io project identifier (DSN) -->
<meta-data
android:name="io.sentry.dsn"
@@ -23,8 +23,7 @@ import javax.inject.Inject
@ContributesAppInjector(generateAppComponent = true)
class ClawApplication : Application(), ApplicationComponentOwner {
override val applicationComponent by
lazy(LazyThreadSafetyMode.NONE) { GeneratedApplicationComponent.create(this) }
override val applicationComponent = GeneratedApplicationComponent.create(this)
@Inject lateinit var plugins: Set<@JvmSuppressWildcards AppPlugin>
@@ -22,11 +22,11 @@ object MetadataExtractorModule {
fun provideUnfurlLogger(): UnfurlLogger {
return object : UnfurlLogger {
override fun log(message: String) {
Napier.d { message }
Napier.d(tag = "Unfurler") { message }
}
override fun log(e: Throwable, message: String) {
Napier.e(e) { message }
Napier.e(tag = "Unfurler", throwable = e) { message }
}
}
}
@@ -13,8 +13,7 @@ import com.slack.eithernet.ApiResult.Success
import dagger.assisted.Assisted
import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject
import dev.msfjarvis.claw.android.viewmodel.ReadPostsRepository
import dev.msfjarvis.claw.android.viewmodel.SavedPostsRepository
import dev.msfjarvis.claw.android.ui.toError
import dev.msfjarvis.claw.core.injection.IODispatcher
import dev.msfjarvis.claw.model.LobstersPost
import dev.msfjarvis.claw.model.UIPost
@@ -28,31 +27,20 @@ class LobstersPagingSource
constructor(
@Assisted private val remoteFetcher: RemoteFetcher<LobstersPost>,
@IODispatcher private val ioDispatcher: CoroutineDispatcher,
private val savedPostsRepository: SavedPostsRepository,
private val readPostsRepository: ReadPostsRepository,
) : PagingSource<Int, UIPost>() {
override suspend fun load(params: LoadParams<Int>): LoadResult<Int, UIPost> {
val page = params.key ?: STARTING_PAGE_INDEX
return when (val result = withContext(ioDispatcher) { remoteFetcher.getItemsAtPage(page) }) {
is Success ->
LoadResult.Page(
itemsBefore = (page - 1) * PAGE_SIZE,
data =
result.value.map {
it
.toUIPost()
.copy(
isSaved = savedPostsRepository.isPostSaved(it.shortId),
isRead = readPostsRepository.isPostRead(it.shortId),
)
},
data = result.value.map(LobstersPost::toUIPost),
prevKey = if (page == STARTING_PAGE_INDEX) null else page - 1,
nextKey = page + 1,
)
is Failure.NetworkFailure -> LoadResult.Error(result.error)
is Failure.UnknownFailure -> LoadResult.Error(result.error)
is Failure.HttpFailure,
is Failure.HttpFailure -> LoadResult.Error(result.toError())
is Failure.ApiFailure -> LoadResult.Error(IOException("API returned an invalid response"))
}
}
@@ -14,10 +14,10 @@ import dagger.assisted.AssistedFactory
import dagger.assisted.AssistedInject
import dev.msfjarvis.claw.android.paging.LobstersPagingSource.Companion.PAGE_SIZE
import dev.msfjarvis.claw.android.paging.LobstersPagingSource.Companion.STARTING_PAGE_INDEX
import dev.msfjarvis.claw.android.viewmodel.ReadPostsRepository
import dev.msfjarvis.claw.android.viewmodel.SavedPostsRepository
import dev.msfjarvis.claw.android.ui.toError
import dev.msfjarvis.claw.api.LobstersSearchApi
import dev.msfjarvis.claw.core.injection.IODispatcher
import dev.msfjarvis.claw.model.LobstersPost
import dev.msfjarvis.claw.model.UIPost
import dev.msfjarvis.claw.model.toUIPost
import java.io.IOException
@@ -36,15 +36,7 @@ constructor(
private val searchApi: LobstersSearchApi,
@Assisted private val queryProvider: () -> String,
@IODispatcher private val ioDispatcher: CoroutineDispatcher,
private val savedPostsRepository: SavedPostsRepository,
private val readPostsRepository: ReadPostsRepository,
) : PagingSource<Int, UIPost>() {
override fun getRefreshKey(state: PagingState<Int, UIPost>): Int? {
return state.anchorPosition?.let { anchorPosition ->
(anchorPosition / PAGE_SIZE).coerceAtLeast(STARTING_PAGE_INDEX)
}
}
override suspend fun load(params: LoadParams<Int>): LoadResult<Int, UIPost> {
val searchQuery = queryProvider()
// If there is no query, we don't need to call the API at all.
@@ -60,27 +52,25 @@ constructor(
val nextKey = if (result.value.isEmpty()) null else page + 1
LoadResult.Page(
itemsBefore = (page - 1) * PAGE_SIZE,
data =
result.value.map {
it
.toUIPost()
.copy(
isSaved = savedPostsRepository.isPostSaved(it.shortId),
isRead = readPostsRepository.isPostRead(it.shortId),
)
},
data = result.value.map(LobstersPost::toUIPost),
prevKey = if (page == STARTING_PAGE_INDEX) null else page - 1,
nextKey = nextKey,
)
}
is ApiResult.Failure.NetworkFailure -> LoadResult.Error(result.error)
is ApiResult.Failure.UnknownFailure -> LoadResult.Error(result.error)
is ApiResult.Failure.HttpFailure,
is ApiResult.Failure.HttpFailure -> LoadResult.Error(result.toError())
is ApiResult.Failure.ApiFailure ->
LoadResult.Error(IOException("API returned an invalid response"))
}
}
override fun getRefreshKey(state: PagingState<Int, UIPost>): Int? {
return state.anchorPosition?.let { anchorPosition ->
(anchorPosition / PAGE_SIZE).coerceAtLeast(STARTING_PAGE_INDEX)
}
}
@AssistedFactory
interface Factory {
fun create(queryProvider: () -> String): SearchPagingSource
@@ -0,0 +1,24 @@
/*
* Copyright © 2022-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
package dev.msfjarvis.claw.android.plugins
import android.app.Application
import com.deliveryhero.whetstone.app.ApplicationScope
import com.squareup.anvil.annotations.ContributesMultibinding
import dev.msfjarvis.claw.core.injection.AppPlugin
import io.sentry.android.core.SentryAndroid
import javax.inject.Inject
@ContributesMultibinding(ApplicationScope::class)
class SentryAndroidPlugin @Inject constructor() : AppPlugin {
override fun apply(application: Application) {
SentryAndroid.init(application) { options ->
options.experimental.sessionReplay.errorSampleRate = 1.0
options.experimental.sessionReplay.sessionSampleRate = 0.1
}
}
}
@@ -1,5 +1,5 @@
/*
* Copyright © 2022-2023 Harsh Shandilya.
* Copyright © 2022-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
@@ -13,16 +13,27 @@ import androidx.compose.animation.core.LinearOutSlowInEasing
import androidx.compose.animation.core.tween
import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutVertically
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Icon
import androidx.compose.material3.NavigationBar
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.NavigationBarItem
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.unit.dp
import androidx.navigation.NavController
import dev.msfjarvis.claw.android.ui.navigation.Destinations
import androidx.navigation.compose.currentBackStackEntryAsState
import dev.chrisbanes.haze.HazeState
import dev.chrisbanes.haze.HazeStyle
import dev.chrisbanes.haze.hazeChild
import dev.msfjarvis.claw.android.ui.navigation.Destination
import dev.msfjarvis.claw.android.ui.navigation.matches
import dev.msfjarvis.claw.common.ui.FloatingNavigationBar
import kotlinx.collections.immutable.ImmutableList
const val AnimationDuration = 100
@@ -32,6 +43,7 @@ fun ClawNavigationBar(
navController: NavController,
items: ImmutableList<NavigationItem>,
isVisible: Boolean,
hazeState: HazeState,
modifier: Modifier = Modifier,
) {
AnimatedVisibility(
@@ -48,44 +60,65 @@ fun ClawNavigationBar(
targetOffsetY = { fullHeight -> fullHeight },
animationSpec = tween(durationMillis = AnimationDuration, easing = FastOutLinearInEasing),
),
modifier = Modifier,
) {
NavigationBar(modifier = modifier) {
items.forEach { navItem ->
val isCurrentDestination = navController.currentDestination?.route == navItem.route
NavigationBarItem(
icon = {
Crossfade(isCurrentDestination, label = "nav-label") {
Icon(
imageVector = if (it) navItem.selectedIcon else navItem.icon,
contentDescription = navItem.label.replaceFirstChar(Char::uppercase),
)
}
},
label = { Text(text = navItem.label) },
selected = isCurrentDestination,
onClick = {
if (isCurrentDestination) {
navItem.listStateResetCallback()
} else {
navController.graph.startDestinationRoute?.let { startDestination ->
navController.popBackStack(startDestination, false)
label = "",
content = {
FloatingNavigationBar(
tonalElevation = 16.dp,
shape = MaterialTheme.shapes.extraLarge,
modifier =
modifier
.padding(horizontal = 16.dp)
.navigationBarsPadding()
.clip(MaterialTheme.shapes.extraLarge)
.hazeChild(
hazeState,
style =
HazeStyle(
backgroundColor = MaterialTheme.colorScheme.surface,
tints = emptyList(),
blurRadius = 24.dp,
noiseFactor = 0f,
),
),
containerColor = Color.Transparent,
) {
val navBackStackEntry = navController.currentBackStackEntryAsState().value
val currentDestination = navBackStackEntry?.destination
items.forEach { navItem ->
val isSelected = currentDestination.matches(navItem.destination)
NavigationBarItem(
icon = {
Crossfade(isSelected, label = "nav-label") {
Icon(
imageVector = if (it) navItem.selectedIcon else navItem.icon,
contentDescription = navItem.label.replaceFirstChar(Char::uppercase),
)
}
if (navItem.route != Destinations.startDestination.route) {
navController.navigate(navItem.route)
},
label = { Text(text = navItem.label) },
selected = isSelected,
onClick = {
if (isSelected) {
navItem.listStateResetCallback()
} else {
navController.navigate(navItem.destination) {
popUpTo(navController.graph.startDestinationId) { saveState = true }
launchSingleTop = true
restoreState = true
}
}
}
},
modifier = Modifier.testTag(navItem.label.uppercase()),
)
},
modifier = Modifier.testTag(navItem.label.uppercase()),
)
}
}
}
}
},
)
}
class NavigationItem(
val label: String,
val route: String,
val destination: Destination,
val icon: ImageVector,
val selectedIcon: ImageVector,
val listStateResetCallback: () -> Unit,
@@ -1,5 +1,5 @@
/*
* Copyright © 2022-2023 Harsh Shandilya.
* Copyright © 2022-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
@@ -22,7 +22,8 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.testTag
import androidx.navigation.NavController
import dev.msfjarvis.claw.android.ui.navigation.Destinations
import androidx.navigation.compose.currentBackStackEntryAsState
import dev.msfjarvis.claw.android.ui.navigation.matches
import kotlinx.collections.immutable.ImmutableList
@Composable
@@ -49,12 +50,14 @@ fun ClawNavigationRail(
modifier = Modifier,
) {
NavigationRail(modifier = modifier) {
val navBackStackEntry = navController.currentBackStackEntryAsState().value
val currentDestination = navBackStackEntry?.destination
Spacer(Modifier.weight(1f))
items.forEach { navItem ->
val isCurrentDestination = navController.currentDestination?.route == navItem.route
val isSelected = currentDestination.matches(navItem.destination)
NavigationRailItem(
icon = {
Crossfade(isCurrentDestination, label = "nav-label") {
Crossfade(isSelected, label = "nav-label") {
Icon(
imageVector = if (it) navItem.selectedIcon else navItem.icon,
contentDescription = navItem.label.replaceFirstChar(Char::uppercase),
@@ -62,16 +65,15 @@ fun ClawNavigationRail(
}
},
label = { Text(text = navItem.label) },
selected = isCurrentDestination,
selected = isSelected,
onClick = {
if (isCurrentDestination) {
if (isSelected) {
navItem.listStateResetCallback()
} else {
navController.graph.startDestinationRoute?.let { startDestination ->
navController.popBackStack(startDestination, false)
}
if (navItem.route != Destinations.startDestination.route) {
navController.navigate(navItem.route)
navController.navigate(navItem.destination) {
popUpTo(navController.graph.startDestinationId) { saveState = true }
launchSingleTop = true
restoreState = true
}
}
},
@@ -8,16 +8,20 @@ package dev.msfjarvis.claw.android.ui
import android.content.Context
import android.content.ContextWrapper
import android.content.Intent
import androidx.activity.ComponentActivity
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.navigation.NavController
import dev.msfjarvis.claw.android.ui.navigation.Destinations
import com.slack.eithernet.ApiResult
import dev.msfjarvis.claw.android.ui.navigation.Comments
import dev.msfjarvis.claw.android.viewmodel.ClawViewModel
import dev.msfjarvis.claw.common.posts.PostActions
import dev.msfjarvis.claw.common.urllauncher.UrlLauncher
import dev.msfjarvis.claw.model.LinkMetadata
import dev.msfjarvis.claw.model.UIPost
import java.io.IOException
import java.net.HttpURLConnection
fun Context.getActivity(): ComponentActivity? {
return when (this) {
@@ -29,6 +33,7 @@ fun Context.getActivity(): ComponentActivity? {
@Composable
fun rememberPostActions(
context: Context,
urlLauncher: UrlLauncher,
navController: NavController,
viewModel: ClawViewModel,
@@ -42,26 +47,33 @@ fun rememberPostActions(
override fun viewComments(postId: String) {
viewModel.markPostAsRead(postId)
val currentRoute = navController.currentDestination?.route
val newRoute =
Destinations.Comments.route.replace(Destinations.Comments.PLACEHOLDER, postId)
if (currentRoute != Destinations.Comments.route) navController.navigate(newRoute)
navController.navigate(Comments(postId))
}
override fun viewCommentsPage(commentsUrl: String) {
// Post links from lobste.rs are of the form $baseUrl/s/$postId/$postTitle
// Interestingly, lobste.rs does not actually care for the value of $postTitle, and will
// happily accept both a missing as well as a completely arbitrary $postTitle. We
// leverage this to create a new URL format which looks like
// $baseUrl/s/$postId/$postTitle/r, and does not trigger our deeplinks,
// instead opening in the custom tab as we want it to.
urlLauncher.openUri(commentsUrl.replaceAfterLast('/', "r"))
override fun viewCommentsPage(post: UIPost) {
urlLauncher.openUri(post.commentsUrl)
}
override fun toggleSave(post: UIPost) {
viewModel.toggleSave(post)
}
override fun share(post: UIPost) {
val sendIntent: Intent =
Intent().apply {
action = Intent.ACTION_SEND
putExtra(Intent.EXTRA_TEXT, post.url.ifEmpty { post.commentsUrl })
putExtra(Intent.EXTRA_TITLE, post.title)
type = "text/plain"
}
val shareIntent = Intent.createChooser(sendIntent, null)
context.startActivity(shareIntent)
}
override fun isPostRead(post: UIPost): Boolean = viewModel.isPostRead(post)
override fun isPostSaved(post: UIPost): Boolean = viewModel.isPostSaved(post)
override suspend fun getComments(postId: String): UIPost {
return viewModel.getPostComments(postId)
}
@@ -72,3 +84,17 @@ fun rememberPostActions(
}
}
}
/**
* Convert an [ApiResult.Failure.HttpFailure] to a scoped down error with a more useful user-facing
* message.
*/
@Suppress("NOTHING_TO_INLINE") // We inline this to eliminate the stacktrace frame.
inline fun <T : Any> ApiResult.Failure.HttpFailure<T>.toError(): Throwable =
when (code) {
HttpURLConnection.HTTP_NOT_FOUND -> IOException("Story was removed by moderator")
HttpURLConnection.HTTP_INTERNAL_ERROR,
HttpURLConnection.HTTP_BAD_GATEWAY,
HttpURLConnection.HTTP_UNAVAILABLE -> IOException("It appears lobste.rs is currently down")
else -> IOException("API returned an invalid response")
}
@@ -10,6 +10,7 @@ import androidx.activity.compose.ReportDrawn
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyColumn
@@ -36,6 +37,7 @@ fun DatabasePosts(
items: ImmutableMap<String, List<UIPost>>,
listState: LazyListState,
postActions: PostActions,
contentPadding: PaddingValues,
modifier: Modifier = Modifier,
) {
ReportDrawn()
@@ -50,11 +52,11 @@ fun DatabasePosts(
Text(text = "No saved posts", style = MaterialTheme.typography.headlineSmall)
}
} else {
LazyColumn(state = listState) {
LazyColumn(state = listState, contentPadding = contentPadding) {
items.forEach { (month, posts) ->
stickyHeader(contentType = "month-header") { MonthHeader(label = month) }
items(items = posts, key = { it.shortId }, contentType = { "LobstersItem" }) { item ->
LobstersListItem(item = item, refresh = {}, postActions = postActions)
LobstersListItem(item = item, postActions = postActions)
HorizontalDivider()
}
}
@@ -8,9 +8,9 @@ package dev.msfjarvis.claw.android.ui.lists
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.Reply
import androidx.compose.material.icons.filled.Share
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.rememberVectorPainter
import dev.msfjarvis.claw.common.posts.LobstersCard
@@ -20,19 +20,20 @@ import me.saket.swipe.SwipeAction
import me.saket.swipe.SwipeableActionsBox
@Composable
fun LobstersListItem(
item: UIPost,
postActions: PostActions,
refresh: () -> Unit,
modifier: Modifier = Modifier,
) {
fun LobstersListItem(item: UIPost, postActions: PostActions, modifier: Modifier = Modifier) {
val commentsAction =
SwipeAction(
icon = rememberVectorPainter(Icons.AutoMirrored.Filled.Reply),
background = MaterialTheme.colorScheme.tertiary,
onSwipe = { postActions.viewCommentsPage(item.commentsUrl) },
onSwipe = { postActions.viewCommentsPage(item) },
)
SwipeableActionsBox(endActions = listOf(commentsAction)) {
LobstersCard(post = item, postActions = postActions, refresh = refresh, modifier = modifier)
val shareAction =
SwipeAction(
icon = rememberVectorPainter(Icons.Filled.Share),
background = MaterialTheme.colorScheme.tertiary,
onSwipe = { postActions.share(item) },
)
SwipeableActionsBox(startActions = listOf(shareAction), endActions = listOf(commentsAction)) {
LobstersCard(post = item, postActions = postActions, modifier = modifier)
}
}
@@ -7,30 +7,40 @@
package dev.msfjarvis.claw.android.ui.lists
import androidx.activity.compose.ReportDrawnWhen
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentWidth
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.pulltorefresh.PullToRefreshBox
import androidx.compose.material3.pulltorefresh.PullToRefreshDefaults
import androidx.compose.material3.pulltorefresh.rememberPullToRefreshState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.paging.LoadState
import androidx.paging.PagingData
import androidx.paging.compose.LazyPagingItems
import androidx.paging.compose.collectAsLazyPagingItems
import androidx.paging.compose.itemContentType
import androidx.paging.compose.itemKey
import dev.msfjarvis.claw.common.posts.PostActions
import dev.msfjarvis.claw.common.posts.TEST_POST
import dev.msfjarvis.claw.common.posts.TEST_POST_ACTIONS
import dev.msfjarvis.claw.common.theme.LobstersTheme
import dev.msfjarvis.claw.common.ui.NetworkError
import dev.msfjarvis.claw.common.ui.ProgressBar
import dev.msfjarvis.claw.common.ui.preview.DevicePreviews
import dev.msfjarvis.claw.model.UIPost
import eu.bambooapps.material3.pullrefresh.PullRefreshIndicator
import eu.bambooapps.material3.pullrefresh.pullRefresh
import eu.bambooapps.material3.pullrefresh.rememberPullRefreshState
import kotlinx.coroutines.flow.MutableStateFlow
@OptIn(ExperimentalMaterial3Api::class)
@Composable
@@ -38,21 +48,33 @@ fun NetworkPosts(
lazyPagingItems: LazyPagingItems<UIPost>,
listState: LazyListState,
postActions: PostActions,
contentPadding: PaddingValues,
modifier: Modifier = Modifier,
) {
ReportDrawnWhen { lazyPagingItems.itemCount > 0 }
val refreshLoadState = lazyPagingItems.loadState.refresh
val isRefreshing = refreshLoadState == LoadState.Loading && lazyPagingItems.itemCount == 0
val pullRefreshState = rememberPullRefreshState(isRefreshing, lazyPagingItems::refresh)
Box(modifier = modifier.fillMaxSize().pullRefresh(pullRefreshState)) {
val refreshLoadState by rememberUpdatedState(lazyPagingItems.loadState.refresh)
val state = rememberPullToRefreshState()
PullToRefreshBox(
modifier = modifier.fillMaxSize(),
isRefreshing = refreshLoadState == LoadState.Loading,
state = state,
onRefresh = { lazyPagingItems.refresh() },
indicator = {
PullToRefreshDefaults.Indicator(
state = state,
isRefreshing = refreshLoadState == LoadState.Loading,
modifier = Modifier.align(Alignment.TopCenter).padding(contentPadding),
)
},
) {
if (lazyPagingItems.itemCount == 0 && refreshLoadState is LoadState.Error) {
NetworkError(
label = "Failed to load posts",
error = refreshLoadState.error,
error = (refreshLoadState as LoadState.Error).error,
modifier = Modifier.align(Alignment.Center),
)
} else {
LazyColumn(state = listState) {
LazyColumn(contentPadding = contentPadding, state = listState) {
items(
count = lazyPagingItems.itemCount,
key = lazyPagingItems.itemKey { it.shortId },
@@ -60,11 +82,7 @@ fun NetworkPosts(
) { index ->
val item = lazyPagingItems[index]
if (item != null) {
LobstersListItem(
item = item,
postActions = postActions,
refresh = { lazyPagingItems.refresh() },
)
LobstersListItem(item = item, postActions = postActions)
HorizontalDivider()
}
}
@@ -80,11 +98,20 @@ fun NetworkPosts(
}
}
}
PullRefreshIndicator(
refreshing = isRefreshing,
state = pullRefreshState,
modifier = Modifier.align(Alignment.TopCenter),
shadowElevation = 6.dp, // From M2 implementation
}
}
@DevicePreviews
@Composable
private fun ListPreview() {
val items = List(20) { TEST_POST.copy(shortId = "${TEST_POST.shortId}${it}") }
val flow = MutableStateFlow(PagingData.from(items))
LobstersTheme {
NetworkPosts(
lazyPagingItems = flow.collectAsLazyPagingItems(),
listState = rememberLazyListState(),
postActions = TEST_POST_ACTIONS,
contentPadding = PaddingValues(),
)
}
}
@@ -7,8 +7,10 @@
package dev.msfjarvis.claw.android.ui.lists
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
@@ -17,28 +19,29 @@ import androidx.compose.ui.semantics.isTraversalGroup
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.unit.dp
import androidx.compose.ui.zIndex
import androidx.paging.PagingData
import androidx.paging.compose.collectAsLazyPagingItems
import androidx.paging.compose.LazyPagingItems
import dev.msfjarvis.claw.common.posts.PostActions
import dev.msfjarvis.claw.common.ui.SearchBar
import dev.msfjarvis.claw.model.UIPost
import kotlinx.coroutines.flow.Flow
@Composable
fun SearchList(
items: Flow<PagingData<UIPost>>,
lazyPagingItems: LazyPagingItems<UIPost>,
listState: LazyListState,
postActions: PostActions,
searchQuery: String,
setSearchQuery: (String) -> Unit,
contentPadding: PaddingValues,
modifier: Modifier = Modifier,
) {
val lazyPagingItems = items.collectAsLazyPagingItems()
val triggerSearch = { query: String ->
setSearchQuery(query)
lazyPagingItems.refresh()
}
Column(modifier = modifier.semantics { isTraversalGroup = true }.zIndex(1f).fillMaxWidth()) {
Column(
modifier =
modifier.systemBarsPadding().semantics { isTraversalGroup = true }.zIndex(1f).fillMaxWidth()
) {
SearchBar(
value = searchQuery,
onValueChange = setSearchQuery,
@@ -49,6 +52,7 @@ fun SearchList(
lazyPagingItems = lazyPagingItems,
listState = listState,
postActions = postActions,
contentPadding = contentPadding,
)
}
}
@@ -0,0 +1,27 @@
/*
* Copyright © 2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
package dev.msfjarvis.claw.android.ui.navigation
import kotlinx.serialization.Serializable
sealed interface Destination
@Serializable data object Hottest : Destination
@Serializable data object Newest : Destination
@Serializable data object Saved : Destination
@Serializable data class Comments(val postId: String) : Destination
@Serializable data class User(val username: String) : Destination
@Serializable data object Search : Destination
@Serializable data object Settings : Destination
@Serializable data object AboutLibraries : Destination
@@ -1,50 +0,0 @@
/*
* Copyright © 2021-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
package dev.msfjarvis.claw.android.ui.navigation
sealed class Destinations {
abstract val route: String
data object Hottest : Destinations() {
override val route = "hottest"
}
data object Newest : Destinations() {
override val route = "newest"
}
data object Saved : Destinations() {
override val route = "saved"
}
data object Comments : Destinations() {
const val PLACEHOLDER = "{postId}"
override val route = "comments/$PLACEHOLDER"
}
data object User : Destinations() {
const val PLACEHOLDER = "{username}"
override val route = "user/$PLACEHOLDER"
}
data object Search : Destinations() {
override val route = "search"
}
data object Settings : Destinations() {
override val route = "settings"
}
data object AboutLibraries : Destinations() {
override val route = "about_libraries"
}
companion object {
val startDestination
get() = Hottest
}
}
@@ -0,0 +1,30 @@
/*
* Copyright © 2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
package dev.msfjarvis.claw.android.ui.navigation
import androidx.navigation.NavDestination
import androidx.navigation.NavDestination.Companion.hasRoute
import androidx.navigation.NavDestination.Companion.hierarchy
import kotlinx.collections.immutable.ImmutableList
/**
* Walk through the [NavDestination]'s [hierarchy] to see if it has any destination that matches the
* route defined by [dest].
*/
fun NavDestination?.matches(dest: Destination): Boolean {
return this?.hierarchy?.any { it.hasRoute(dest::class) } == true
}
/** Check if this [NavDestination] [matches] any of the potential navigation [destinations]. */
fun NavDestination?.any(destinations: ImmutableList<Destination>): Boolean {
return destinations.any { this?.matches(it) == true }
}
/** Check if this [NavDestination] [matches] none of the potential navigation [destinations]. */
fun NavDestination?.none(destinations: ImmutableList<Destination>): Boolean {
return destinations.none { this?.matches(it) == true }
}
@@ -11,10 +11,8 @@ import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.core.tween
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.material.icons.Icons
@@ -27,24 +25,23 @@ import androidx.compose.material.icons.filled.Whatshot
import androidx.compose.material.icons.outlined.FavoriteBorder
import androidx.compose.material.icons.outlined.NewReleases
import androidx.compose.material.icons.outlined.Whatshot
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.SnackbarHost
import androidx.compose.material3.SnackbarHostState
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.windowsizeclass.WindowSizeClass
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Alignment
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
@@ -52,16 +49,17 @@ import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.semantics.testTagsAsResourceId
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.navigation.NavType
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.currentBackStackEntryAsState
import androidx.navigation.compose.rememberNavController
import androidx.navigation.navArgument
import androidx.navigation.navDeepLink
import androidx.navigation.toRoute
import androidx.paging.compose.collectAsLazyPagingItems
import com.deliveryhero.whetstone.compose.injectedViewModel
import com.mikepenz.aboutlibraries.ui.compose.m3.LibrariesContainer
import dev.chrisbanes.haze.HazeState
import dev.chrisbanes.haze.haze
import dev.msfjarvis.claw.android.MainActivity
import dev.msfjarvis.claw.android.R
import dev.msfjarvis.claw.android.SearchActivity
@@ -71,21 +69,28 @@ import dev.msfjarvis.claw.android.ui.decorations.NavigationItem
import dev.msfjarvis.claw.android.ui.getActivity
import dev.msfjarvis.claw.android.ui.lists.DatabasePosts
import dev.msfjarvis.claw.android.ui.lists.NetworkPosts
import dev.msfjarvis.claw.android.ui.navigation.AboutLibraries
import dev.msfjarvis.claw.android.ui.navigation.ClawNavigationType
import dev.msfjarvis.claw.android.ui.navigation.Destinations
import dev.msfjarvis.claw.android.ui.navigation.Comments
import dev.msfjarvis.claw.android.ui.navigation.Hottest
import dev.msfjarvis.claw.android.ui.navigation.Newest
import dev.msfjarvis.claw.android.ui.navigation.Saved
import dev.msfjarvis.claw.android.ui.navigation.Settings
import dev.msfjarvis.claw.android.ui.navigation.User
import dev.msfjarvis.claw.android.ui.navigation.any
import dev.msfjarvis.claw.android.ui.navigation.none
import dev.msfjarvis.claw.android.ui.rememberPostActions
import dev.msfjarvis.claw.android.viewmodel.ClawViewModel
import dev.msfjarvis.claw.api.LobstersApi
import dev.msfjarvis.claw.common.comments.CommentsPage
import dev.msfjarvis.claw.common.comments.HTMLConverter
import dev.msfjarvis.claw.common.ui.decorations.ClawAppBar
import dev.msfjarvis.claw.common.urllauncher.UrlLauncher
import dev.msfjarvis.claw.common.user.UserProfile
import kotlinx.collections.immutable.persistentListOf
import kotlinx.collections.immutable.persistentMapOf
import kotlinx.collections.immutable.toPersistentList
import kotlinx.coroutines.launch
@OptIn(ExperimentalComposeUiApi::class)
@OptIn(ExperimentalComposeUiApi::class, ExperimentalMaterial3Api::class)
@Composable
fun LobstersPostsScreen(
urlLauncher: UrlLauncher,
@@ -95,29 +100,28 @@ fun LobstersPostsScreen(
modifier: Modifier = Modifier,
viewModel: ClawViewModel = injectedViewModel(),
) {
val context = LocalContext.current
val hottestListState = rememberLazyListState()
val newestListState = rememberLazyListState()
val savedListState = rememberLazyListState()
val navController = rememberNavController()
val navBackStackEntry = navController.currentBackStackEntryAsState().value
val currentDestination = navBackStackEntry?.destination
val coroutineScope = rememberCoroutineScope()
val snackbarHostState = remember { SnackbarHostState() }
val postActions = rememberPostActions(urlLauncher, navController, viewModel)
val backStackEntry by navController.currentBackStackEntryAsState()
val currentDestination = backStackEntry?.destination?.route
val context = LocalContext.current
val postActions = rememberPostActions(context, urlLauncher, navController, viewModel)
val hazeState = remember { HazeState() }
val hottestPosts = viewModel.hottestPosts.collectAsLazyPagingItems()
val newestPosts = viewModel.newestPosts.collectAsLazyPagingItems()
val savedPosts by viewModel.savedPostsByMonth.collectAsState(persistentMapOf())
val savedPosts by viewModel.savedPostsByMonth.collectAsStateWithLifecycle(persistentMapOf())
val navigationType = ClawNavigationType.fromSize(windowSizeClass.widthSizeClass)
val postIdOverride = context.getActivity()?.intent?.extras?.getString(MainActivity.NAVIGATION_KEY)
LaunchedEffect(false) {
LaunchedEffect(Unit) {
if (postIdOverride != null) {
navController.navigate(
Destinations.Comments.route.replace(Destinations.Comments.PLACEHOLDER, postIdOverride)
)
navController.navigate(Comments(postIdOverride))
}
}
@@ -125,37 +129,42 @@ fun LobstersPostsScreen(
persistentListOf(
NavigationItem(
label = "Hottest",
route = Destinations.Hottest.route,
destination = Hottest,
icon = Icons.Outlined.Whatshot,
selectedIcon = Icons.Filled.Whatshot,
) {
coroutineScope.launch { hottestListState.animateScrollToItem(index = 0) }
coroutineScope.launch {
if (hottestPosts.itemCount > 0) hottestListState.animateScrollToItem(index = 0)
}
},
NavigationItem(
label = "Newest",
route = Destinations.Newest.route,
destination = Newest,
icon = Icons.Outlined.NewReleases,
selectedIcon = Icons.Filled.NewReleases,
) {
coroutineScope.launch { newestListState.animateScrollToItem(index = 0) }
coroutineScope.launch {
if (newestPosts.itemCount > 0) newestListState.animateScrollToItem(index = 0)
}
},
NavigationItem(
label = "Saved",
route = Destinations.Saved.route,
destination = Saved,
icon = Icons.Outlined.FavoriteBorder,
selectedIcon = Icons.Filled.Favorite,
) {
coroutineScope.launch { savedListState.animateScrollToItem(index = 0) }
coroutineScope.launch { if (savedPosts.isNotEmpty()) savedListState.scrollToItem(0) }
},
)
val navDestinations = navItems.map(NavigationItem::destination).toPersistentList()
Scaffold(
topBar = {
ClawAppBar(
TopAppBar(
modifier = Modifier.shadow(8.dp),
navigationIcon = {
if (
navController.previousBackStackEntry != null &&
navItems.none { it.route == currentDestination }
navController.previousBackStackEntry != null && currentDestination.none(navDestinations)
) {
IconButton(
onClick = { if (!navController.popBackStack()) context.getActivity()?.finish() }
@@ -165,29 +174,27 @@ fun LobstersPostsScreen(
contentDescription = "Go back to previous screen",
)
}
} else {
Icon(
painter = painterResource(id = R.drawable.ic_launcher_foreground),
contentDescription = "The app icon for Claw",
modifier = Modifier.size(48.dp),
)
}
},
title = {
if (navItems.any { it.route == currentDestination }) {
Row(verticalAlignment = Alignment.CenterVertically) {
Image(
painter = painterResource(id = R.drawable.ic_launcher_foreground),
contentDescription = null,
modifier = Modifier.size(48.dp),
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSurface),
)
Text(text = stringResource(R.string.app_name), fontWeight = FontWeight.Bold)
}
if (currentDestination.any(navDestinations)) {
Text(text = stringResource(R.string.app_name), fontWeight = FontWeight.Bold)
}
},
actions = {
if (navItems.any { it.route == currentDestination }) {
if (currentDestination.any(navDestinations)) {
IconButton(
onClick = { context.startActivity(Intent(context, SearchActivity::class.java)) }
) {
Icon(imageVector = Icons.Filled.Search, contentDescription = "Search posts")
}
IconButton(onClick = { navController.navigate(Destinations.Settings.route) }) {
IconButton(onClick = { navController.navigate(Settings) }) {
Icon(imageVector = Icons.Filled.Tune, contentDescription = "Settings")
}
}
@@ -199,63 +206,60 @@ fun LobstersPostsScreen(
ClawNavigationBar(
navController = navController,
items = navItems,
isVisible = navItems.any { it.route == currentDestination },
isVisible = currentDestination.any(navDestinations),
hazeState = hazeState,
)
}
},
snackbarHost = { SnackbarHost(snackbarHostState) },
modifier = modifier.semantics { testTagsAsResourceId = true },
) { paddingValues ->
Row(modifier = Modifier.padding(paddingValues)) {
) { contentPadding ->
Row {
AnimatedVisibility(visible = navigationType == ClawNavigationType.NAVIGATION_RAIL) {
ClawNavigationRail(
navController = navController,
items = navItems,
isVisible = navItems.any { it.route == currentDestination },
isVisible = currentDestination.any(navDestinations),
)
}
NavHost(
navController = navController,
startDestination = Destinations.startDestination.route,
startDestination = Hottest,
// Make animations 2x faster than default specs
enterTransition = { fadeIn(animationSpec = tween(350)) },
exitTransition = { fadeOut(animationSpec = tween(350)) },
modifier = Modifier.haze(hazeState),
) {
val uri = LobstersApi.BASE_URL
composable(route = Destinations.Hottest.route) {
composable<Hottest> {
setWebUri("https://lobste.rs/")
NetworkPosts(
lazyPagingItems = hottestPosts,
listState = hottestListState,
postActions = postActions,
contentPadding = contentPadding,
)
}
composable(route = Destinations.Newest.route) {
composable<Newest> {
setWebUri("https://lobste.rs/")
NetworkPosts(
lazyPagingItems = newestPosts,
listState = newestListState,
postActions = postActions,
contentPadding = contentPadding,
)
}
composable(route = Destinations.Saved.route) {
composable<Saved> {
setWebUri(null)
DatabasePosts(items = savedPosts, listState = savedListState, postActions = postActions)
DatabasePosts(
items = savedPosts,
listState = savedListState,
postActions = postActions,
contentPadding = contentPadding,
)
}
composable(
route = Destinations.Comments.route,
arguments = listOf(navArgument("postId") { type = NavType.StringType }),
deepLinks =
listOf(
navDeepLink { uriPattern = "$uri/s/${Destinations.Comments.PLACEHOLDER}/.*" },
navDeepLink { uriPattern = "$uri/s/${Destinations.Comments.PLACEHOLDER}" },
),
) { backStackEntry ->
val postId =
requireNotNull(backStackEntry.arguments?.getString("postId")) {
"Navigating to ${Destinations.Comments.route} without necessary 'postId' argument"
}
composable<Comments> { backStackEntry ->
val postId = backStackEntry.toRoute<Comments>().postId
setWebUri("https://lobste.rs/s/$postId")
CommentsPage(
postId = postId,
@@ -263,32 +267,35 @@ fun LobstersPostsScreen(
htmlConverter = htmlConverter,
getSeenComments = viewModel::getSeenComments,
markSeenComments = viewModel::markSeenComments,
contentPadding = contentPadding,
openUserProfile = { navController.navigate(User(it)) },
)
}
composable(
route = Destinations.User.route,
arguments = listOf(navArgument("username") { type = NavType.StringType }),
deepLinks = listOf(navDeepLink { uriPattern = "$uri/u/${Destinations.User.PLACEHOLDER}" }),
) { backStackEntry ->
val username =
requireNotNull(backStackEntry.arguments?.getString("username")) {
"Navigating to ${Destinations.User.route} without necessary 'username' argument"
}
composable<User> { backStackEntry ->
val username = backStackEntry.toRoute<User>().username
setWebUri("https://lobste.rs/u/$username")
UserProfile(username = username, getProfile = viewModel::getUserProfile)
UserProfile(
username = username,
getProfile = viewModel::getUserProfile,
contentPadding = contentPadding,
openUserProfile = { navController.navigate(User(it)) },
)
}
composable(route = Destinations.Settings.route) {
composable<Settings> {
SettingsScreen(
context = context,
openLibrariesScreen = { navController.navigate(Destinations.AboutLibraries.route) },
openInputStream = context.contentResolver::openInputStream,
openOutputStream = context.contentResolver::openOutputStream,
openLibrariesScreen = { navController.navigate(AboutLibraries) },
importPosts = viewModel::importPosts,
exportPostsAsJson = viewModel::exportPostsAsJson,
exportPostsAsHtml = viewModel::exportPostsAsHtml,
snackbarHostState = snackbarHostState,
contentPadding = contentPadding,
modifier = Modifier.fillMaxSize(),
)
}
composable(route = Destinations.AboutLibraries.route) {
LibrariesContainer(modifier = Modifier.fillMaxSize())
composable<AboutLibraries> {
LibrariesContainer(contentPadding = contentPadding, modifier = Modifier.fillMaxSize())
}
}
}
@@ -6,24 +6,27 @@
*/
package dev.msfjarvis.claw.android.ui.screens
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.material3.Scaffold
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.navigation.NavType
import androidx.compose.ui.platform.LocalContext
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import androidx.navigation.navArgument
import androidx.navigation.toRoute
import androidx.paging.compose.collectAsLazyPagingItems
import com.deliveryhero.whetstone.compose.injectedViewModel
import dev.msfjarvis.claw.android.ui.lists.SearchList
import dev.msfjarvis.claw.android.ui.navigation.Destinations
import dev.msfjarvis.claw.android.ui.navigation.Comments
import dev.msfjarvis.claw.android.ui.navigation.Search
import dev.msfjarvis.claw.android.ui.navigation.User
import dev.msfjarvis.claw.android.ui.rememberPostActions
import dev.msfjarvis.claw.android.viewmodel.ClawViewModel
import dev.msfjarvis.claw.common.comments.CommentsPage
import dev.msfjarvis.claw.common.comments.HTMLConverter
import dev.msfjarvis.claw.common.urllauncher.UrlLauncher
import dev.msfjarvis.claw.common.user.UserProfile
@Composable
fun SearchScreen(
@@ -34,32 +37,24 @@ fun SearchScreen(
viewModel: ClawViewModel = injectedViewModel(),
) {
val navController = rememberNavController()
val postActions = rememberPostActions(urlLauncher, navController, viewModel)
val postActions = rememberPostActions(LocalContext.current, urlLauncher, navController, viewModel)
val listState = rememberLazyListState()
Scaffold(modifier = modifier) { paddingValues ->
NavHost(
navController = navController,
startDestination = Destinations.Search.route,
modifier = Modifier.padding(paddingValues),
) {
composable(route = Destinations.Search.route) {
val searchResults = viewModel.searchResults.collectAsLazyPagingItems()
Scaffold(modifier = modifier) { contentPadding ->
NavHost(navController = navController, startDestination = Search) {
composable<Search> {
setWebUri("https://lobste.rs/search")
SearchList(
items = viewModel.searchResults,
lazyPagingItems = searchResults,
listState = listState,
postActions = postActions,
searchQuery = viewModel.searchQuery,
contentPadding = contentPadding,
setSearchQuery = { query -> viewModel.searchQuery = query },
)
}
composable(
route = Destinations.Comments.route,
arguments = listOf(navArgument("postId") { type = NavType.StringType }),
) { backStackEntry ->
val postId =
requireNotNull(backStackEntry.arguments?.getString("postId")) {
"Navigating to ${Destinations.Comments.route} without necessary 'postId' argument"
}
composable<Comments> { backStackEntry ->
val postId = backStackEntry.toRoute<Comments>().postId
setWebUri("https://lobste.rs/s/$postId")
CommentsPage(
postId = postId,
@@ -67,6 +62,18 @@ fun SearchScreen(
htmlConverter = htmlConverter,
getSeenComments = viewModel::getSeenComments,
markSeenComments = viewModel::markSeenComments,
openUserProfile = { navController.navigate(User(it)) },
contentPadding = contentPadding,
)
}
composable<User> { backStackEntry ->
val username = backStackEntry.toRoute<User>().username
setWebUri("https://lobste.rs/u/$username")
UserProfile(
username = username,
getProfile = viewModel::getUserProfile,
openUserProfile = { navController.navigate(User(it)) },
contentPadding = contentPadding,
)
}
}
@@ -6,18 +6,19 @@
*/
package dev.msfjarvis.claw.android.ui.screens
import android.content.Context
import android.net.Uri
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.LibraryBooks
import androidx.compose.material.icons.filled.Bookmarks
@@ -39,6 +40,8 @@ import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import dev.msfjarvis.claw.common.theme.LobstersTheme
import dev.msfjarvis.claw.common.ui.preview.ThemePreviews
import java.io.InputStream
import java.io.OutputStream
import kotlinx.coroutines.CoroutineScope
@@ -49,28 +52,19 @@ private const val HTML_MIME_TYPE = "application/html"
@Composable
fun SettingsScreen(
context: Context,
openLibrariesScreen: () -> Unit,
snackbarHostState: SnackbarHostState,
openInputStream: (Uri) -> InputStream?,
openOutputStream: (Uri) -> OutputStream?,
importPosts: suspend (InputStream) -> Unit,
exportPostsAsJson: suspend (OutputStream) -> Unit,
exportPostsAsHtml: suspend (OutputStream) -> Unit,
contentPadding: PaddingValues,
modifier: Modifier = Modifier,
) {
val coroutineScope = rememberCoroutineScope()
Box(modifier = modifier.fillMaxSize()) {
Box(modifier = modifier.padding(contentPadding)) {
Column {
ListItem(
headlineContent = { Text("Libraries") },
leadingContent = {
Icon(
imageVector = Icons.AutoMirrored.Filled.LibraryBooks,
contentDescription = null,
modifier = Modifier.height(32.dp),
)
},
modifier = Modifier.clickable(onClick = openLibrariesScreen),
)
ListItem(
headlineContent = { Text("Data transfer") },
leadingContent = {
@@ -85,24 +79,35 @@ fun SettingsScreen(
horizontalArrangement = Arrangement.spacedBy(32.dp),
modifier = Modifier.fillMaxWidth(),
) {
ImportPosts(context, coroutineScope, snackbarHostState, importPosts)
ImportPosts(openInputStream, coroutineScope, snackbarHostState, importPosts)
ExportPosts(
context,
coroutineScope,
snackbarHostState,
openOutputStream,
exportPostsAsJson,
exportPostsAsHtml,
)
}
},
)
ListItem(
headlineContent = { Text("Libraries") },
leadingContent = {
Icon(
imageVector = Icons.AutoMirrored.Filled.LibraryBooks,
contentDescription = null,
modifier = Modifier.height(32.dp),
)
},
modifier = Modifier.clickable(onClick = openLibrariesScreen),
)
}
}
}
@Composable
private fun RowScope.ImportPosts(
context: Context,
openInputStream: (Uri) -> InputStream?,
coroutineScope: CoroutineScope,
snackbarHostState: SnackbarHostState,
importPosts: suspend (InputStream) -> Unit,
@@ -115,7 +120,7 @@ private fun RowScope.ImportPosts(
return@rememberLauncherForActivityResult
}
coroutineScope.launch {
context.contentResolver.openInputStream(uri)?.use { stream ->
openInputStream(uri)?.use { stream ->
importPosts(stream)
snackbarHostState.showSnackbarDismissing("Successfully imported posts")
}
@@ -132,9 +137,9 @@ private fun RowScope.ImportPosts(
@Composable
private fun RowScope.ExportPosts(
context: Context,
coroutineScope: CoroutineScope,
snackbarHostState: SnackbarHostState,
openOutputStream: (Uri) -> OutputStream?,
exportPostsAsJson: suspend (OutputStream) -> Unit,
exportPostsAsHtml: suspend (OutputStream) -> Unit,
modifier: Modifier = Modifier,
@@ -147,7 +152,7 @@ private fun RowScope.ExportPosts(
return@rememberLauncherForActivityResult
}
coroutineScope.launch {
context.contentResolver.openOutputStream(uri)?.use { stream ->
openOutputStream(uri)?.use { stream ->
exportPostsAsJson(stream)
snackbarHostState.showSnackbarDismissing("Successfully exported posts")
}
@@ -161,7 +166,7 @@ private fun RowScope.ExportPosts(
return@rememberLauncherForActivityResult
}
coroutineScope.launch {
context.contentResolver.openOutputStream(uri)?.use { stream ->
openOutputStream(uri)?.use { stream ->
exportPostsAsHtml(stream)
snackbarHostState.showSnackbarDismissing("Successfully exported posts")
}
@@ -207,3 +212,11 @@ private suspend fun SnackbarHostState.showSnackbarDismissing(text: String) {
currentSnackbarData?.dismiss()
showSnackbar(text)
}
@ThemePreviews
@Composable
private fun SettingsScreenPreview() {
LobstersTheme {
SettingsScreen({}, SnackbarHostState(), { null }, { null }, {}, {}, {}, PaddingValues())
}
}
@@ -29,6 +29,7 @@ import dev.msfjarvis.claw.android.paging.LobstersPagingSource
import dev.msfjarvis.claw.android.paging.LobstersPagingSource.Companion.PAGE_SIZE
import dev.msfjarvis.claw.android.paging.LobstersPagingSource.Companion.STARTING_PAGE_INDEX
import dev.msfjarvis.claw.android.paging.SearchPagingSource
import dev.msfjarvis.claw.android.ui.toError
import dev.msfjarvis.claw.api.LobstersApi
import dev.msfjarvis.claw.core.injection.IODispatcher
import dev.msfjarvis.claw.core.injection.MainDispatcher
@@ -39,7 +40,6 @@ import dev.msfjarvis.claw.model.toUIPost
import java.io.IOException
import java.io.InputStream
import java.io.OutputStream
import java.net.HttpURLConnection
import java.time.LocalDateTime
import java.time.ZoneId
import java.time.format.DateTimeFormatter
@@ -133,19 +133,21 @@ constructor(
}
}
fun isPostRead(post: UIPost): Boolean {
return _readPosts.contains(post.shortId)
}
fun isPostSaved(post: UIPost): Boolean {
return _savedPosts.contains(post.shortId)
}
suspend fun getPostComments(postId: String) =
withContext(ioDispatcher) {
when (val result = api.getPostDetails(postId)) {
is Success -> result.value.toUIPost()
is Failure.NetworkFailure -> throw result.error
is Failure.UnknownFailure -> throw result.error
is Failure.HttpFailure -> {
if (result.code == HttpURLConnection.HTTP_NOT_FOUND) {
throw IOException("Story was removed by moderator")
} else {
throw IOException("API returned an invalid response")
}
}
is Failure.HttpFailure -> throw result.toError()
is Failure.ApiFailure -> throw IOException("API returned an invalid response")
}
}
@@ -165,7 +167,7 @@ constructor(
is Success -> result.value
is Failure.NetworkFailure -> throw result.error
is Failure.UnknownFailure -> throw result.error
is Failure.HttpFailure,
is Failure.HttpFailure -> throw result.toError()
is Failure.ApiFailure -> throw IOException("API returned an invalid response")
}
}
@@ -1,5 +1,5 @@
/*
* Copyright © 2021-2023 Harsh Shandilya.
* Copyright © 2021-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
@@ -25,8 +25,4 @@ constructor(
suspend fun markRead(postId: String) {
withContext(dbDispatcher) { readPostsQueries.markRead(postId) }
}
suspend fun isPostRead(shortId: String): Boolean {
return withContext(dbDispatcher) { readPostsQueries.isPostRead(shortId).executeAsOne() }
}
}
@@ -16,6 +16,7 @@ import dev.msfjarvis.claw.model.toSavedPost
import io.github.aakira.napier.Napier
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.flow.firstOrNull
import kotlinx.coroutines.withContext
class SavedPostsRepository
@@ -27,7 +28,7 @@ constructor(
val savedPosts = savedPostQueries.selectAllPosts().asFlow().mapToList(dbDispatcher)
suspend fun toggleSave(post: UIPost) {
if (post.isSaved) {
if (savedPosts.firstOrNull().orEmpty().any { it.shortId == post.shortId }) {
Napier.d(tag = TAG) { "Removing post: ${post.shortId}" }
withContext(dbDispatcher) { savedPostQueries.deletePost(post.shortId) }
} else {
@@ -45,10 +46,6 @@ constructor(
}
}
suspend fun isPostSaved(postId: String): Boolean {
return withContext(dbDispatcher) { savedPostQueries.isPostSaved(postId).executeAsOne() }
}
private companion object {
private const val TAG = "SavedPostsRepository"
}
@@ -0,0 +1,37 @@
/*
* Copyright © 2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
package dev.msfjarvis.claw.android.ui.lists
import android.annotation.SuppressLint
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.runtime.Composable
import androidx.paging.PagingData
import androidx.paging.compose.collectAsLazyPagingItems
import dev.msfjarvis.claw.common.posts.TEST_POST
import dev.msfjarvis.claw.common.posts.TEST_POST_ACTIONS
import dev.msfjarvis.claw.common.theme.LobstersTheme
import dev.msfjarvis.claw.common.ui.preview.ThemePreviews
import kotlinx.coroutines.flow.MutableStateFlow
@SuppressLint("ComposePreviewPublic", "ComposeUnstableReceiver")
class NetworkPostsTest {
@ThemePreviews
@Composable
fun DefaultPreview() {
val items = List(20) { TEST_POST.copy(shortId = "${TEST_POST.shortId}${it}") }
val flow = MutableStateFlow(PagingData.from(items))
LobstersTheme {
NetworkPosts(
lazyPagingItems = flow.collectAsLazyPagingItems(),
listState = rememberLazyListState(),
postActions = TEST_POST_ACTIONS,
contentPadding = PaddingValues(),
)
}
}
}
+2 -2
View File
@@ -1,5 +1,5 @@
#
# This file was automatically generated by 'versioning-plugin'. DO NOT EDIT MANUALLY.
#
versioning-plugin.versionCode=14400
versioning-plugin.versionName=1.44.0
versioning-plugin.versionCode=15100
versioning-plugin.versionName=1.51.0
+6 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright © 2021-2023 Harsh Shandilya.
* Copyright © 2021-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
@@ -18,17 +18,18 @@ android { namespace = "dev.msfjarvis.claw.api" }
anvil { generateDaggerFactories.set(true) }
dependencies {
api(libs.eithernet)
api(libs.dagger)
api(libs.javax.inject)
api(libs.okhttp.core)
api(libs.retrofit)
api(projects.model)
implementation(libs.dagger)
implementation(libs.javax.inject)
implementation(libs.eithernet)
implementation(libs.jsoup)
testImplementation(testFixtures(libs.eithernet))
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.kotlinx.serialization.core)
testImplementation(libs.kotlinx.serialization.json)
testImplementation(libs.retrofit.kotlinxSerializationConverter)
addTestDependencies(project)
}
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.3.0" type="baseline" client="gradle" dependencies="true" name="AGP (8.3.0)" variant="all" version="8.3.0">
<issues format="6" by="lint 8.4.2" type="baseline" client="gradle" dependencies="true" name="AGP (8.4.2)" variant="all" version="8.4.2">
</issues>
@@ -32,6 +32,11 @@ object SearchConverter : Converter<ResponseBody, List<LobstersPost>> {
val tags = elem.select("span.tags > a").map(Element::text)
val (commentCount, commentsUrl) = getCommentsData(elem.select("span.comments_label"))
val submitter = elem.select("div.byline > a.u-author").text()
val userIsAuthor =
(elem.select("div.byline > span").first()?.text() ?: "").contains(
"authored",
ignoreCase = true,
)
return LobstersPost(
shortId = shortId,
title = title,
@@ -43,6 +48,7 @@ object SearchConverter : Converter<ResponseBody, List<LobstersPost>> {
// The value of these fields is irrelevant for our use case
createdAt = "",
description = "",
userIsAuthor = userIsAuthor,
)
}
@@ -40,6 +40,7 @@ class SearchApiTest {
submitter = "xenodium",
tags = listOf("ai", "emacs"),
description = "",
userIsAuthor = true,
),
LobstersPost(
shortId = "astcqf",
@@ -52,6 +53,7 @@ class SearchApiTest {
submitter = "asteroid",
tags = listOf("ai"),
description = "",
userIsAuthor = false,
),
)
}
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.3.0" type="baseline" client="gradle" dependencies="false" name="AGP (8.3.0)" variant="all" version="8.3.0">
<issues format="6" by="lint 8.4.2" type="baseline" client="gradle" dependencies="false" name="AGP (8.4.2)" variant="all" version="8.4.2">
</issues>
+1 -1
View File
@@ -27,8 +27,8 @@ pluginManagement {
forRepository { google() }
filter {
includeGroup("androidx.databinding")
includeGroupByRegex("com.android.*")
includeGroup("com.google.testing.platform")
includeGroupAndSubgroups("com.android")
}
}
mavenCentral { mavenContent { releasesOnly() } }
@@ -1,5 +1,5 @@
/*
* Copyright © 2022-2023 Harsh Shandilya.
* Copyright © 2022-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
@@ -25,21 +25,14 @@ import org.gradle.kotlin.dsl.findByType
class AndroidCommonPlugin : Plugin<Project> {
private companion object {
const val COMPILE_SDK = 34
const val MIN_SDK = 26
const val TARGET_SDK = 34
const val SLIM_TESTS_PROPERTY = "slimTests"
}
override fun apply(project: Project) {
project.configureSlimTests()
project.pluginManager.apply(AndroidCacheFixPlugin::class)
project.extensions.configure<BaseExtension> {
compileSdkVersion(COMPILE_SDK)
compileSdkVersion(35)
defaultConfig {
minSdk = MIN_SDK
targetSdk = TARGET_SDK
minSdk = 26
targetSdk = 35
}
packagingOptions {
@@ -64,7 +57,7 @@ class AndroidCommonPlugin : Plugin<Project> {
}
private fun Project.configureSlimTests() {
if (!providers.gradleProperty(SLIM_TESTS_PROPERTY).isPresent) {
if (!providers.gradleProperty("slimTests").isPresent) {
return
}
// Disable unit test tasks on the release build type for Android Library projects
@@ -1,5 +1,5 @@
/*
* Copyright © 2022-2023 Harsh Shandilya.
* Copyright © 2022-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
@@ -7,15 +7,12 @@
package dev.msfjarvis.claw.gradle
import dev.msfjarvis.claw.gradle.KotlinCommonPlugin.Companion.JVM_TOOLCHAIN_ACTION
import org.gradle.accessors.dm.LibrariesForLibs
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.getByType
import org.gradle.kotlin.dsl.withType
import org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension
import org.jetbrains.kotlin.gradle.plugin.KotlinAndroidPluginWrapper
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@Suppress("Unused")
class KotlinAndroidPlugin : Plugin<Project> {
@@ -26,25 +23,5 @@ class KotlinAndroidPlugin : Plugin<Project> {
apply(KotlinCommonPlugin::class)
}
project.extensions.getByType<KotlinProjectExtension>().jvmToolchain(JVM_TOOLCHAIN_ACTION)
val libs = project.extensions.getByName("libs") as LibrariesForLibs
val composeCompilerVersion = libs.versions.composeCompiler.get()
val kotlinVersion = libs.versions.kotlin.get()
val matches = COMPOSE_COMPILER_VERSION_REGEX.find(composeCompilerVersion)
if (matches != null) {
val (compilerKotlinVersion) = matches.destructured
if (compilerKotlinVersion != kotlinVersion) {
project.tasks.withType<KotlinCompile>().configureEach {
compilerOptions.freeCompilerArgs.addAll(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=$kotlinVersion",
)
}
}
}
}
private companion object {
// Matches against 1.5.0-dev-k1.9.0-6a60475e07f
val COMPOSE_COMPILER_VERSION_REGEX = "\\d.\\d.\\d-dev-k(\\d.\\d.\\d+)-[a-z0-9]+".toRegex()
}
}
@@ -29,7 +29,7 @@ class KotlinCommonPlugin : Plugin<Project> {
project.tasks.run {
withType<KotlinCompile>().configureEach {
compilerOptions {
allWarningsAsErrors.set(true)
allWarningsAsErrors.set(project.providers.environmentVariable("CI").isPresent)
freeCompilerArgs.addAll(ADDITIONAL_COMPILER_ARGS)
languageVersion.set(KotlinVersion.KOTLIN_1_9)
}
@@ -32,7 +32,7 @@ class KotlinKaptPlugin : Plugin<Project> {
// https://github.com/google/dagger/commit/0d2505a727b54f47b8677f42dd4fc5c1924e37f5
option("-Adagger.experimentalDaggerErrorMessages=enabled")
// KAPT nests errors causing real issues to be suppressed in CI logs
option("-Xmaxerrs", 500)
option("-Xmaxerrs", "500")
// Enables per-module validation for faster error detection
// https://github.com/google/dagger/commit/325b516ac6a53d3fc973d247b5231fafda9870a2
option("-Adagger.moduleBindingValidation=ERROR")
@@ -55,6 +55,6 @@ class SpotlessPlugin : Plugin<Project> {
}
private companion object {
private const val KTFMT_VERSION = "0.47"
private const val KTFMT_VERSION = "0.52"
}
}
@@ -1,5 +1,5 @@
/*
* Copyright © 2023 Harsh Shandilya.
* Copyright © 2023-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
@@ -16,19 +16,23 @@ import org.gradle.kotlin.dsl.exclude
/** Extension function to configure JUnit5 dependencies with the Truth assertion library. */
fun DependencyHandlerScope.addTestDependencies(project: Project) {
val libs = project.extensions.getByName("libs") as LibrariesForLibs
addProvider("testImplementation", libs.junit.jupiter.api)
addProvider<MinimalExternalModuleDependency, ExternalModuleDependency>(
"testImplementation",
libs.truth,
) {
exclude(group = "junit", module = "junit")
}
addProvider("testRuntimeOnly", libs.junit.jupiter.engine)
addProvider<MinimalExternalModuleDependency, ExternalModuleDependency>(
"testRuntimeOnly",
libs.junit.legacy,
) {
// See https://github.com/google/truth/issues/333
because("Truth needs it")
}
arrayOf("test", "androidTest", "screenshotTest")
.filter { sourceSet -> project.configurations.findByName("${sourceSet}Implementation") != null }
.forEach { sourceSet ->
addProvider("${sourceSet}Implementation", libs.junit.jupiter.api)
addProvider<MinimalExternalModuleDependency, ExternalModuleDependency>(
"${sourceSet}Implementation",
libs.truth,
) {
exclude(group = "junit", module = "junit")
}
addProvider("${sourceSet}RuntimeOnly", libs.junit.jupiter.engine)
addProvider<MinimalExternalModuleDependency, ExternalModuleDependency>(
"${sourceSet}RuntimeOnly",
libs.junit.legacy,
) {
// See https://github.com/google/truth/issues/333
because("Truth needs it")
}
}
}
+2
View File
@@ -8,4 +8,6 @@ plugins {
id("dev.msfjarvis.claw.spotless")
id("dev.msfjarvis.claw.versions")
id("dev.msfjarvis.claw.kotlin-common")
alias(libs.plugins.dependencyAnalysis)
alias(libs.plugins.invert)
}
+16 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright © 2021-2023 Harsh Shandilya.
* Copyright © 2021-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
@@ -7,12 +7,15 @@
@file:Suppress("UnstableApiUsage")
import com.android.build.api.variant.HasUnitTestBuilder
import dev.msfjarvis.claw.gradle.addTestDependencies
plugins {
id("dev.msfjarvis.claw.android-library")
id("dev.msfjarvis.claw.kotlin-android")
alias(libs.plugins.anvil)
alias(libs.plugins.whetstone)
alias(libs.plugins.kotlin.composeCompiler)
alias(libs.plugins.screenshot)
}
android {
@@ -20,11 +23,9 @@ android {
androidResources = true
compose = true
}
composeOptions {
useLiveLiterals = false
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
}
composeOptions { useLiveLiterals = false }
namespace = "dev.msfjarvis.claw.common"
experimentalProperties["android.experimental.enableScreenshotTest"] = true
}
androidComponents { beforeVariants { (it as HasUnitTestBuilder).enableUnitTest = false } }
@@ -32,6 +33,9 @@ androidComponents { beforeVariants { (it as HasUnitTestBuilder).enableUnitTest =
anvil { generateDaggerFactories.set(true) }
dependencies {
api(libs.androidx.compose.ui)
api(libs.dagger)
api(libs.javax.inject)
api(projects.core)
api(projects.database.core)
api(projects.model)
@@ -44,16 +48,23 @@ dependencies {
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.runtime)
implementation(libs.androidx.compose.ui.text)
implementation(libs.androidx.core)
implementation(libs.coil)
implementation(libs.coil.compose)
implementation(libs.compose.richtext.markdown)
implementation(libs.compose.richtext.material3)
implementation(libs.compose.richtext.ui)
implementation(libs.kotlinx.collections.immutable)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinResult)
implementation(libs.kotlinResult.coroutines)
implementation(libs.napier)
screenshotTestImplementation(libs.androidx.compose.ui.tooling)
compileOnly(libs.androidx.compose.ui.tooling.preview)
runtimeOnly(libs.androidx.compose.ui.tooling)
addTestDependencies(project)
}
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.3.0" type="baseline" client="gradle" dependencies="true" name="AGP (8.3.0)" variant="all" version="8.3.0">
<issues format="6" by="lint 8.4.2" type="baseline" client="gradle" dependencies="true" name="AGP (8.4.2)" variant="all" version="8.4.2">
</issues>
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9d9d4a162b7ba995f625b4feb683879de46ad1c583a37c5cc721030521cece11
size 6633
@@ -6,7 +6,6 @@
*/
package dev.msfjarvis.claw.common.comments
import android.text.format.DateUtils
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
@@ -27,15 +26,9 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.produceState
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.text.withStyle
import androidx.compose.ui.unit.dp
import com.github.michaelbull.result.coroutines.runSuspendCatching
import com.github.michaelbull.result.onSuccess
@@ -47,8 +40,6 @@ import dev.msfjarvis.claw.common.ui.NetworkImage
import dev.msfjarvis.claw.common.ui.ThemedRichText
import dev.msfjarvis.claw.model.LinkMetadata
import dev.msfjarvis.claw.model.UIPost
import java.time.Instant
import java.time.temporal.TemporalAccessor
import kotlinx.collections.immutable.toImmutableList
@Composable
@@ -56,9 +47,9 @@ internal fun CommentsHeader(
post: UIPost,
postActions: PostActions,
htmlConverter: HTMLConverter,
openUserProfile: (String) -> Unit,
modifier: Modifier = Modifier,
) {
val uriHandler = LocalUriHandler.current
val linkMetadata by
produceState(initialValue = LinkMetadata(post.url, null)) {
runSuspendCatching { postActions.getLinkMetadata(post.url) }
@@ -70,7 +61,7 @@ internal fun CommentsHeader(
modifier = Modifier.padding(16.dp).fillMaxWidth(),
verticalArrangement = Arrangement.spacedBy(8.dp),
) {
PostTitle(title = post.title, isRead = false)
PostTitle(title = post.title, isRead = false, singleLineTitle = false)
TagRow(tags = post.tags.toImmutableList())
Spacer(Modifier.height(4.dp))
@@ -93,8 +84,7 @@ internal fun CommentsHeader(
text = AnnotatedString("Submitted by ${post.submitter}"),
avatarUrl = "https://lobste.rs/avatars/${post.submitter}-100.png",
contentDescription = "User avatar for ${post.submitter}",
modifier =
Modifier.clickable { uriHandler.openUri("https://lobste.rs/u/${post.submitter}") },
modifier = Modifier.clickable { openUserProfile(post.submitter) },
)
}
}
@@ -125,105 +115,3 @@ private fun PostLink(linkMetadata: LinkMetadata, modifier: Modifier = Modifier)
}
}
}
private val CommentEntryPadding = 16f.dp
@Composable
internal fun CommentEntry(
commentNode: CommentNode,
htmlConverter: HTMLConverter,
toggleExpanded: (CommentNode) -> Unit,
modifier: Modifier = Modifier,
) {
val uriHandler = LocalUriHandler.current
val comment = commentNode.comment
Box(
modifier =
modifier
.fillMaxWidth()
.clickable { toggleExpanded(commentNode) }
.background(MaterialTheme.colorScheme.background)
.padding(
start = CommentEntryPadding * commentNode.indentLevel,
end = CommentEntryPadding,
top = CommentEntryPadding,
bottom = CommentEntryPadding,
)
) {
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
Submitter(
text =
buildCommenterString(
commenterName = comment.user,
score = comment.score,
isUnread = commentNode.isUnread,
createdAt = comment.createdAt,
updatedAt = comment.updatedAt,
),
avatarUrl = "https://lobste.rs/avatars/${comment.user}-100.png",
contentDescription = "User avatar for ${comment.user}",
modifier = Modifier.clickable { uriHandler.openUri("https://lobste.rs/u/${comment.user}") },
)
if (commentNode.isExpanded) {
ThemedRichText(
text = htmlConverter.convertHTMLToMarkdown(comment.comment),
modifier = Modifier.padding(top = 8.dp),
)
}
}
}
}
@Composable
fun buildCommenterString(
commenterName: String,
score: Int,
isUnread: Boolean,
createdAt: TemporalAccessor,
updatedAt: TemporalAccessor,
): AnnotatedString {
val now = System.currentTimeMillis()
val createdRelative =
remember(createdAt) {
DateUtils.getRelativeTimeSpanString(
Instant.from(createdAt).toEpochMilli(),
now,
DateUtils.MINUTE_IN_MILLIS,
)
}
val updatedRelative =
remember(updatedAt) {
DateUtils.getRelativeTimeSpanString(
Instant.from(updatedAt).toEpochMilli(),
now,
DateUtils.MINUTE_IN_MILLIS,
)
}
return buildAnnotatedString {
append(commenterName)
append(' ')
append('•')
append(' ')
append("$score points")
append(' ')
append('•')
append(' ')
append(createdRelative.toString())
if (updatedRelative != createdRelative) {
append(' ')
append('(')
append("Updated")
append(' ')
append(updatedRelative.toString())
append(')')
}
if (isUnread) {
append(' ')
withStyle(
style = SpanStyle(fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.error)
) {
append("(unread)")
}
}
}
}
@@ -6,28 +6,61 @@
*/
package dev.msfjarvis.claw.common.comments
import androidx.compose.foundation.lazy.LazyListScope
import androidx.compose.material3.HorizontalDivider
import dev.msfjarvis.claw.database.local.PostComments
import dev.msfjarvis.claw.model.Comment
internal data class CommentNode(
internal class CommentNode(
val comment: Comment,
var parent: CommentNode? = null,
private var parent: CommentNode? = null,
val children: MutableList<CommentNode> = mutableListOf(),
val isUnread: Boolean = false,
var isExpanded: Boolean = true,
var indentLevel: Int,
val indentLevel: Int,
) {
fun addChild(child: CommentNode) {
if (comment.shortId == child.comment.parentComment) {
children.add(child)
child.parent = this
} else {
child.indentLevel += 1
children.lastOrNull()?.addChild(child)
children
.lastOrNull()
?.addChild(
CommentNode(
comment = child.comment,
parent = child.parent,
isUnread = child.isUnread,
indentLevel = child.indentLevel + 1,
)
)
}
}
/**
* [CommentNode.equals] and [CommentNode.hashCode] are hand-rolled to drop the
* [CommentNode.parent] field from the comparison since it's possible for there to be cycles in
* this comparison check. For our purposes we're fine with foregoing the field.
*/
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as CommentNode
if (comment != other.comment) return false
if (children != other.children) return false
if (isUnread != other.isUnread) return false
if (indentLevel != other.indentLevel) return false
return true
}
override fun hashCode(): Int {
var result = comment.hashCode()
result = 31 * result + children.hashCode()
result = 31 * result + isUnread.hashCode()
result = 31 * result + indentLevel
return result
}
}
internal fun createListNode(
@@ -47,63 +80,16 @@ internal fun createListNode(
)
)
} else {
commentNodes.lastOrNull()?.let {
it.addChild(
commentNodes.lastOrNull()?.let { commentNode ->
commentNode.addChild(
CommentNode(
comment = comments[i],
isUnread = isUnread(comments[i].shortId),
indentLevel = it.indentLevel + 1,
indentLevel = commentNode.indentLevel + 1,
)
)
}
}
}
return commentNodes
}
internal fun setExpanded(commentNode: CommentNode, expanded: Boolean): CommentNode {
commentNode.isExpanded = expanded
if (commentNode.children.isNotEmpty()) {
commentNode.children.forEach { setExpanded(it, expanded) }
}
return commentNode
}
internal fun findTopMostParent(node: CommentNode): CommentNode {
val parent = node.parent
return if (parent != null) {
findTopMostParent(parent)
} else {
node
}
}
internal fun LazyListScope.nodes(
nodes: List<CommentNode>,
htmlConverter: HTMLConverter,
toggleExpanded: (CommentNode) -> Unit,
) {
nodes.forEach { node ->
node(node = node, htmlConverter = htmlConverter, toggleExpanded = toggleExpanded)
}
}
private fun LazyListScope.node(
node: CommentNode,
htmlConverter: HTMLConverter,
toggleExpanded: (CommentNode) -> Unit,
) {
// Skip the node if neither the node nor its parent is expanded
if (!node.isExpanded && node.parent?.isExpanded == false) {
return
}
item {
CommentEntry(commentNode = node, htmlConverter = htmlConverter, toggleExpanded = toggleExpanded)
HorizontalDivider()
}
if (node.children.isNotEmpty()) {
nodes(node.children, htmlConverter = htmlConverter, toggleExpanded = toggleExpanded)
}
}
@@ -9,22 +9,11 @@ package dev.msfjarvis.claw.common.comments
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.produceState
import androidx.compose.runtime.toMutableStateList
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import com.github.michaelbull.result.coroutines.runSuspendCatching
import com.github.michaelbull.result.fold
import dev.msfjarvis.claw.common.NetworkState
@@ -38,64 +27,7 @@ import dev.msfjarvis.claw.database.local.PostComments
import dev.msfjarvis.claw.model.Comment
import dev.msfjarvis.claw.model.UIPost
@Suppress("LongParameterList")
@Composable
private fun CommentsPageInternal(
details: UIPost,
postActions: PostActions,
htmlConverter: HTMLConverter,
commentState: PostComments?,
markSeenComments: (String, List<Comment>) -> Unit,
modifier: Modifier = Modifier,
) {
val commentNodes = createListNode(details.comments, commentState).toMutableStateList()
LaunchedEffect(key1 = commentNodes) { markSeenComments(details.shortId, details.comments) }
Surface(color = MaterialTheme.colorScheme.surfaceVariant) {
LazyColumn(modifier = modifier, contentPadding = PaddingValues(bottom = 24.dp)) {
item {
CommentsHeader(post = details, postActions = postActions, htmlConverter = htmlConverter)
}
if (commentNodes.isNotEmpty()) {
item {
Text(
text = "Comments",
style = MaterialTheme.typography.labelLarge,
modifier = Modifier.padding(horizontal = 16.dp, vertical = 12.dp),
)
}
nodes(
nodes = commentNodes,
htmlConverter = htmlConverter,
toggleExpanded = { node ->
val newNode = setExpanded(node, !node.isExpanded)
val parent = findTopMostParent(newNode)
val index =
commentNodes.indexOf(commentNodes.find { it.comment.url == parent.comment.url })
if (index != -1) {
commentNodes.removeAt(index)
commentNodes.add(index, parent)
}
},
)
} else {
item {
Text(
text = "No Comments",
style = MaterialTheme.typography.bodyLarge,
modifier = Modifier.fillMaxWidth().padding(16.dp),
fontWeight = FontWeight.Bold,
textAlign = TextAlign.Center,
)
}
}
}
}
}
@Suppress("UNCHECKED_CAST", "LongParameterList")
@Suppress("UNCHECKED_CAST")
@Composable
fun CommentsPage(
postId: String,
@@ -103,7 +35,9 @@ fun CommentsPage(
htmlConverter: HTMLConverter,
getSeenComments: suspend (String) -> PostComments?,
markSeenComments: (String, List<Comment>) -> Unit,
contentPadding: PaddingValues,
modifier: Modifier = Modifier,
openUserProfile: (String) -> Unit,
) {
val postDetails by
produceState<NetworkState>(Loading) {
@@ -124,6 +58,8 @@ fun CommentsPage(
htmlConverter = htmlConverter,
commentState = commentState,
markSeenComments = markSeenComments,
openUserProfile = openUserProfile,
contentPadding = contentPadding,
modifier = modifier.fillMaxSize(),
)
}
@@ -0,0 +1,250 @@
/*
* Copyright © 2021-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
package dev.msfjarvis.claw.common.comments
import android.text.format.DateUtils
import android.widget.Toast
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBars
import androidx.compose.foundation.layout.windowInsetsBottomHeight
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import dev.msfjarvis.claw.common.posts.PostActions
import dev.msfjarvis.claw.common.posts.Submitter
import dev.msfjarvis.claw.common.ui.ThemedRichText
import dev.msfjarvis.claw.database.local.PostComments
import dev.msfjarvis.claw.model.Comment
import dev.msfjarvis.claw.model.UIPost
import java.time.Instant
import java.time.temporal.TemporalAccessor
@Composable
internal fun CommentsPageInternal(
details: UIPost,
postActions: PostActions,
htmlConverter: HTMLConverter,
commentState: PostComments?,
markSeenComments: (String, List<Comment>) -> Unit,
openUserProfile: (String) -> Unit,
contentPadding: PaddingValues,
modifier: Modifier = Modifier,
) {
val context = LocalContext.current
val commentNodes = createListNode(details.comments, commentState)
LaunchedEffect(key1 = commentNodes) {
if (details.comments.isNotEmpty() && !commentState?.commentIds.isNullOrEmpty()) {
val unreadCount = details.comments.size - (commentState?.commentIds?.size ?: 0)
if (unreadCount > 0) {
val text =
when (unreadCount) {
1 -> "$unreadCount unread comment"
else -> "$unreadCount unread comments"
}
Toast.makeText(context, text, Toast.LENGTH_SHORT).show()
}
}
markSeenComments(details.shortId, details.comments)
}
Surface(color = MaterialTheme.colorScheme.surfaceVariant) {
LazyColumn(modifier = modifier, contentPadding = contentPadding) {
item {
CommentsHeader(
post = details,
postActions = postActions,
htmlConverter = htmlConverter,
openUserProfile = openUserProfile,
)
}
if (commentNodes.isNotEmpty()) {
item(key = "comments_header") {
Text(
text = "Comments",
style = MaterialTheme.typography.labelLarge,
modifier = Modifier.padding(horizontal = 16.dp, vertical = 12.dp),
)
}
commentNodes.forEach { node ->
item(key = node.comment.shortId) { Node(node, htmlConverter, openUserProfile) }
}
item(key = "bottom_spacer") {
Spacer(modifier = Modifier.windowInsetsBottomHeight(WindowInsets.systemBars))
}
} else {
item {
Text(
text = "No Comments",
style = MaterialTheme.typography.bodyLarge,
modifier = Modifier.fillMaxWidth().padding(16.dp),
fontWeight = FontWeight.Bold,
textAlign = TextAlign.Center,
)
}
}
}
}
}
/**
* Simple tree view implementation by Anton Shilov who was smarter in 2020 than I am today
* https://gist.github.com/antonshilov/ef8cd0a360a5cc0f823b2a4e85084720
*/
@Composable
private fun Node(
node: CommentNode,
htmlConverter: HTMLConverter,
openUserProfile: (String) -> Unit,
modifier: Modifier = Modifier,
) {
Column(horizontalAlignment = Alignment.CenterHorizontally) {
var isChildrenShown by remember { mutableStateOf(true) }
NodeBox(
node = node,
isExpanded = isChildrenShown,
htmlConverter = htmlConverter,
openUserProfile,
modifier = modifier.clickable(onClick = { isChildrenShown = !isChildrenShown }),
)
if (isChildrenShown) {
Column(modifier = modifier, horizontalAlignment = Alignment.CenterHorizontally) {
node.children.forEach { model -> Node(model, htmlConverter, openUserProfile) }
}
}
}
}
@Composable
private fun NodeBox(
node: CommentNode,
isExpanded: Boolean,
htmlConverter: HTMLConverter,
openUserProfile: (String) -> Unit,
modifier: Modifier = Modifier,
) {
CommentEntry(isExpanded, node, htmlConverter, openUserProfile, modifier)
HorizontalDivider()
}
private val CommentEntryPadding = 16f.dp
@Composable
private fun CommentEntry(
isExpanded: Boolean,
commentNode: CommentNode,
htmlConverter: HTMLConverter,
openUserProfile: (String) -> Unit,
modifier: Modifier = Modifier,
) {
val comment = commentNode.comment
Box(
modifier =
modifier
.fillMaxWidth()
.background(
if (commentNode.isUnread) MaterialTheme.colorScheme.surfaceContainerHigh
else MaterialTheme.colorScheme.background
)
.padding(
start = CommentEntryPadding * commentNode.indentLevel,
end = CommentEntryPadding,
top = CommentEntryPadding,
bottom = CommentEntryPadding,
)
) {
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
Submitter(
text =
buildCommenterString(
commenterName = comment.user,
score = comment.score,
createdAt = comment.createdAt,
updatedAt = comment.updatedAt,
),
avatarUrl = "https://lobste.rs/avatars/${comment.user}-100.png",
contentDescription = "User avatar for ${comment.user}",
modifier = Modifier.clickable { openUserProfile(comment.user) },
)
if (isExpanded) {
ThemedRichText(
text = htmlConverter.convertHTMLToMarkdown(comment.comment),
modifier = Modifier.padding(top = 8.dp),
)
}
}
}
}
private fun buildCommenterString(
commenterName: String,
score: Int,
createdAt: TemporalAccessor,
updatedAt: TemporalAccessor,
): AnnotatedString {
val now = System.currentTimeMillis()
val createdRelative =
DateUtils.getRelativeTimeSpanString(
Instant.from(createdAt).toEpochMilli(),
now,
DateUtils.MINUTE_IN_MILLIS,
)
val updatedRelative =
DateUtils.getRelativeTimeSpanString(
Instant.from(updatedAt).toEpochMilli(),
now,
DateUtils.MINUTE_IN_MILLIS,
)
return buildAnnotatedString {
append(commenterName)
append(' ')
append('•')
append(' ')
append("$score points")
append(' ')
append('•')
append(' ')
append(createdRelative.toString())
if (updatedRelative != createdRelative) {
append(' ')
append('(')
append("Updated")
append(' ')
append(updatedRelative.toString())
append(')')
}
}
}
@@ -6,6 +6,7 @@
*/
package dev.msfjarvis.claw.common.posts
import androidx.annotation.VisibleForTesting
import androidx.compose.animation.Crossfade
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
@@ -35,7 +36,9 @@ import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.minimumInteractiveComponentSize
import androidx.compose.runtime.Composable
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
@@ -47,6 +50,7 @@ import androidx.compose.ui.platform.testTag
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import dev.msfjarvis.claw.common.theme.LobstersTheme
import dev.msfjarvis.claw.common.ui.NetworkImage
@@ -57,56 +61,39 @@ import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.toImmutableList
@Composable
fun LobstersCard(
post: UIPost,
postActions: PostActions,
refresh: () -> Unit,
modifier: Modifier = Modifier,
) {
var localReadState by remember(post) { mutableStateOf(post.isRead) }
var localSavedState by remember(post) { mutableStateOf(post.isSaved) }
fun LobstersCard(post: UIPost, postActions: PostActions, modifier: Modifier = Modifier) {
val readState by remember(post.shortId) { derivedStateOf { postActions.isPostRead(post) } }
val savedState by remember(post.shortId) { derivedStateOf { postActions.isPostSaved(post) } }
Box(
modifier =
modifier
.fillMaxWidth()
.clickable {
postActions.viewPost(post.shortId, post.url, post.commentsUrl)
localReadState = true
refresh()
}
.clickable { postActions.viewPost(post.shortId, post.url, post.commentsUrl) }
.background(MaterialTheme.colorScheme.background)
.padding(start = 16.dp, top = 16.dp, end = 4.dp, bottom = 16.dp)
.padding(start = 8.dp, top = 4.dp, bottom = 4.dp)
) {
Row(
horizontalArrangement = Arrangement.spacedBy(8.dp),
verticalAlignment = Alignment.CenterVertically,
) {
PostDetails(post = post, isRead = localReadState, modifier = Modifier.weight(1f))
PostDetails(
post = post,
isRead = { readState },
singleLineTitle = true,
modifier = Modifier.weight(1f),
)
Column(
modifier = Modifier.wrapContentHeight(),
verticalArrangement = Arrangement.spacedBy(8.dp),
horizontalAlignment = Alignment.CenterHorizontally,
) {
SaveButton(
isSaved = localSavedState,
modifier =
Modifier.clickable(role = Role.Button) {
localSavedState = !localSavedState
postActions.toggleSave(post)
refresh()
},
)
SaveButton(isSaved = { savedState }, onClick = { postActions.toggleSave(post) })
HorizontalDivider(modifier = Modifier.width(48.dp))
CommentsButton(
commentCount = post.commentCount,
modifier =
Modifier.clickable(
role = Role.Button,
onClick = {
postActions.viewComments(post.shortId)
localReadState = true
refresh()
},
onClick = { postActions.viewComments(post.shortId) },
),
)
}
@@ -115,13 +102,21 @@ fun LobstersCard(
}
@Composable
fun PostDetails(post: UIPost, isRead: Boolean, modifier: Modifier = Modifier) {
fun PostDetails(
post: UIPost,
isRead: () -> Boolean,
singleLineTitle: Boolean,
modifier: Modifier = Modifier,
) {
Column(modifier = modifier, verticalArrangement = Arrangement.spacedBy(8.dp)) {
PostTitle(title = post.title, isRead = isRead)
PostTitle(title = post.title, isRead = isRead(), singleLineTitle = singleLineTitle)
TagRow(tags = post.tags.toImmutableList())
Spacer(Modifier.height(4.dp))
Submitter(
text = AnnotatedString("Submitted by ${post.submitter}"),
text =
AnnotatedString(
"${if (post.userIsAuthor) "Authored" else "Submitted"} by ${post.submitter}"
),
avatarUrl = "https://lobste.rs/avatars/${post.submitter}-100.png",
contentDescription = "User avatar for ${post.submitter}",
)
@@ -129,13 +124,20 @@ fun PostDetails(post: UIPost, isRead: Boolean, modifier: Modifier = Modifier) {
}
@Composable
internal fun PostTitle(title: String, isRead: Boolean, modifier: Modifier = Modifier) {
internal fun PostTitle(
title: String,
isRead: Boolean,
singleLineTitle: Boolean,
modifier: Modifier = Modifier,
) {
Text(
text = title,
modifier = modifier,
style = MaterialTheme.typography.titleMedium,
fontWeight = if (isRead) FontWeight.Normal else FontWeight.Bold,
color = MaterialTheme.colorScheme.onBackground,
maxLines = if (singleLineTitle) 1 else Int.MAX_VALUE,
overflow = TextOverflow.Ellipsis,
)
}
@@ -168,36 +170,38 @@ internal fun Submitter(
}
@Composable
private fun SaveButton(isSaved: Boolean, modifier: Modifier = Modifier) {
Crossfade(targetState = isSaved, label = "save-button") { saved ->
Box(modifier = modifier.padding(12.dp)) {
private fun SaveButton(isSaved: () -> Boolean, onClick: () -> Unit, modifier: Modifier = Modifier) {
var localSavedState by remember { mutableStateOf(isSaved()) }
Crossfade(targetState = localSavedState, label = "save-button") { saved ->
Box(modifier = modifier.minimumInteractiveComponentSize()) {
Icon(
imageVector = if (saved) Icons.Filled.Favorite else Icons.Filled.FavoriteBorder,
tint = MaterialTheme.colorScheme.secondary,
contentDescription = if (saved) "Remove from saved posts" else "Add to saved posts",
modifier = Modifier.align(Alignment.Center).testTag("save_button"),
modifier =
Modifier.align(Alignment.Center).testTag("save_button").clickable(role = Role.Button) {
onClick()
localSavedState = !localSavedState
},
)
}
}
}
@Composable
private fun CommentsButton(commentCount: Int?, modifier: Modifier = Modifier) {
private fun CommentsButton(commentCount: Int, modifier: Modifier = Modifier) {
BadgedBox(
modifier = modifier.padding(12.dp),
modifier = modifier.minimumInteractiveComponentSize(),
badge = {
if (commentCount != null) {
Badge(
containerColor = MaterialTheme.colorScheme.tertiaryContainer,
// Required to make the badge label look visually okay
modifier = Modifier.absoluteOffset(y = (-8).dp),
) {
Text(
text = commentCount.toString(),
color = MaterialTheme.colorScheme.onTertiaryContainer,
style = MaterialTheme.typography.labelMedium,
)
}
Badge(
containerColor = MaterialTheme.colorScheme.tertiaryContainer,
modifier = Modifier.absoluteOffset(y = (-8).dp),
) {
Text(
text = commentCount.toString(),
color = MaterialTheme.colorScheme.onTertiaryContainer,
style = MaterialTheme.typography.labelMedium,
)
}
},
) {
@@ -235,55 +239,63 @@ private fun TagText(tag: String, modifier: Modifier = Modifier) {
)
}
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
val TEST_POST_ACTIONS =
object : PostActions {
override fun viewPost(postId: String, postUrl: String, commentsUrl: String) {}
override fun viewComments(postId: String) {}
override fun viewCommentsPage(post: UIPost) {}
override fun toggleSave(post: UIPost) {}
override fun share(post: UIPost) {}
override fun isPostRead(post: UIPost): Boolean {
return true
}
override fun isPostSaved(post: UIPost): Boolean {
return true
}
override suspend fun getComments(postId: String): UIPost {
return UIPost(
shortId = "ooga",
title = "Simple Anomaly Detection Using Plain SQL",
url = "https://hakibenita.com/sql-anomaly-detection",
createdAt = "2020-09-21T08:04:24.000-05:00",
commentCount = 1,
commentsUrl = "https://lobste.rs/s/q1hh1g/simple_anomaly_detection_using_plain_sql",
tags = listOf("databases", "apis"),
description = "",
submitter = "Haki",
comments = emptyList(),
)
}
override suspend fun getLinkMetadata(url: String): LinkMetadata {
return LinkMetadata("", "")
}
}
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
val TEST_POST =
UIPost(
shortId = "ooga",
title = "Simple Anomaly Detection Using Plain SQL",
url = "https://hakibenita.com/sql-anomaly-detection",
createdAt = "2020-09-21T08:04:24.000-05:00",
commentCount = 1,
commentsUrl = "https://lobste.rs/s/q1hh1g/simple_anomaly_detection_using_plain_sql",
submitter = "Haki",
tags = listOf("databases", "apis"),
description = "",
)
@ThemePreviews
@Composable
private fun LobstersCardPreview() {
LobstersTheme {
LobstersCard(
post =
UIPost(
shortId = "ooga",
title = "Simple Anomaly Detection Using Plain SQL",
url = "https://hakibenita.com/sql-anomaly-detection",
createdAt = "2020-09-21T08:04:24.000-05:00",
commentCount = 1,
commentsUrl = "https://lobste.rs/s/q1hh1g/simple_anomaly_detection_using_plain_sql",
submitter = "Haki",
tags = listOf("databases", "apis"),
description = "",
isSaved = true,
isRead = true,
),
postActions =
object : PostActions {
override fun viewPost(postId: String, postUrl: String, commentsUrl: String) {}
override fun viewComments(postId: String) {}
override fun viewCommentsPage(commentsUrl: String) {}
override fun toggleSave(post: UIPost) {}
override suspend fun getComments(postId: String): UIPost {
return UIPost(
shortId = "ooga",
title = "Simple Anomaly Detection Using Plain SQL",
url = "https://hakibenita.com/sql-anomaly-detection",
createdAt = "2020-09-21T08:04:24.000-05:00",
commentCount = 1,
commentsUrl = "https://lobste.rs/s/q1hh1g/simple_anomaly_detection_using_plain_sql",
tags = listOf("databases", "apis"),
description = "",
submitter = "Haki",
comments = emptyList(),
)
}
override suspend fun getLinkMetadata(url: String): LinkMetadata {
return LinkMetadata("", "")
}
},
refresh = {},
)
}
LobstersTheme { LobstersCard(post = TEST_POST, postActions = TEST_POST_ACTIONS) }
}
@@ -16,10 +16,16 @@ interface PostActions {
fun viewComments(postId: String)
fun viewCommentsPage(commentsUrl: String)
fun viewCommentsPage(post: UIPost)
fun toggleSave(post: UIPost)
fun share(post: UIPost)
fun isPostRead(post: UIPost): Boolean
fun isPostSaved(post: UIPost): Boolean
suspend fun getComments(postId: String): UIPost
suspend fun getLinkMetadata(url: String): LinkMetadata
@@ -18,8 +18,6 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.ProvidedValue
import androidx.compose.runtime.SideEffect
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalView
import androidx.core.view.WindowCompat
@@ -106,7 +104,6 @@ fun LobstersTheme(
if (!view.isInEditMode) {
SideEffect {
val window = (view.context as Activity).window
window.statusBarColor = Color.Transparent.toArgb()
WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme
}
}
@@ -0,0 +1,94 @@
/*
* Copyright © 2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
package dev.msfjarvis.claw.common.ui
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.selection.selectableGroup
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.BarChart
import androidx.compose.material.icons.filled.BrokenImage
import androidx.compose.material.icons.filled.HeartBroken
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.NavigationBarDefaults
import androidx.compose.material3.NavigationBarItem
import androidx.compose.material3.Surface
import androidx.compose.material3.contentColorFor
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Brush
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
// Taken from Chris Banes' amazing app Tivi
// https://github.com/chrisbanes/tivi/blob/836d596d74959f4235ca2395b5bbfdd6fd9c9a9e/ui/root/src/commonMain/kotlin/app/tivi/home/Home.kt#L173
@Composable
fun FloatingNavigationBar(
modifier: Modifier = Modifier,
shape: Shape = MaterialTheme.shapes.extraLarge,
containerColor: Color = NavigationBarDefaults.containerColor,
contentColor: Color = MaterialTheme.colorScheme.contentColorFor(containerColor),
tonalElevation: Dp = NavigationBarDefaults.Elevation,
content: @Composable RowScope.() -> Unit,
) {
Surface(
color = containerColor,
contentColor = contentColor,
tonalElevation = tonalElevation,
shape = shape,
border =
BorderStroke(
width = 0.5.dp,
brush =
Brush.verticalGradient(
colors =
listOf(
MaterialTheme.colorScheme.surfaceVariant,
MaterialTheme.colorScheme.surfaceVariant.copy(alpha = 0.3f),
)
),
),
modifier = modifier,
) {
Row(
modifier = Modifier.padding(horizontal = 8.dp).fillMaxWidth().height(80.dp).selectableGroup(),
horizontalArrangement = Arrangement.spacedBy(8.dp),
content = content,
)
}
}
@Preview
@Composable
private fun FloatingNavigationBarPreview() {
FloatingNavigationBar {
NavigationBarItem(
selected = true,
onClick = {},
icon = { Icon(imageVector = Icons.Filled.HeartBroken, contentDescription = "Home") },
)
NavigationBarItem(
selected = true,
onClick = {},
icon = { Icon(imageVector = Icons.Filled.BarChart, contentDescription = "Home") },
)
NavigationBarItem(
selected = true,
onClick = {},
icon = { Icon(imageVector = Icons.Filled.BrokenImage, contentDescription = "Home") },
)
}
}
@@ -30,7 +30,7 @@ import io.github.aakira.napier.Napier
@Composable
fun NetworkError(label: String, error: Throwable, modifier: Modifier = Modifier) {
LaunchedEffect(true) { Napier.e(error, "NetworkError") { "Failed to load posts" } }
LaunchedEffect(Unit) { Napier.e(error, "NetworkError") { "Failed to load posts" } }
var showDialog by remember { mutableStateOf(false) }
Column(verticalArrangement = Arrangement.spacedBy(4.dp), modifier = modifier) {
Text(
@@ -1,43 +0,0 @@
/*
* Copyright © 2021-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
package dev.msfjarvis.claw.common.ui.decorations
import androidx.compose.foundation.layout.RowScope
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import dev.msfjarvis.claw.common.theme.LobstersTheme
import dev.msfjarvis.claw.common.ui.preview.DevicePreviews
import dev.msfjarvis.claw.common.ui.preview.ThemePreviews
@Composable
@OptIn(ExperimentalMaterial3Api::class)
fun ClawAppBar(
modifier: Modifier = Modifier,
navigationIcon: @Composable () -> Unit = {},
title: @Composable () -> Unit = {},
actions: @Composable RowScope.() -> Unit = {},
) {
TopAppBar(
title = title,
modifier = modifier.shadow(8.dp),
navigationIcon = navigationIcon,
actions = actions,
)
}
@DevicePreviews
@ThemePreviews
@Composable
private fun ClawAppBarPreview() {
LobstersTheme { ClawAppBar(title = { Text("Claw", fontWeight = FontWeight.Bold) }) }
}
@@ -9,6 +9,7 @@ package dev.msfjarvis.claw.common.user
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.requiredSize
@@ -24,6 +25,8 @@ import androidx.compose.runtime.produceState
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.text.LinkAnnotation
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.unit.dp
import com.github.michaelbull.result.coroutines.runSuspendCatching
import com.github.michaelbull.result.fold
@@ -42,6 +45,8 @@ import dev.msfjarvis.claw.model.User
fun UserProfile(
username: String,
getProfile: suspend (username: String) -> User,
openUserProfile: (String) -> Unit,
contentPadding: PaddingValues,
modifier: Modifier = Modifier,
) {
val user by
@@ -56,11 +61,15 @@ fun UserProfile(
}
when (user) {
is Success<*> -> {
UserProfileInternal(user = (user as Success<User>).data, modifier = modifier)
UserProfileInternal(
user = (user as Success<User>).data,
openUserProfile = openUserProfile,
modifier = modifier.padding(contentPadding),
)
}
is Error -> {
val error = user as Error
Box(modifier = Modifier.fillMaxSize()) {
Box(modifier = Modifier.padding(contentPadding).fillMaxSize()) {
NetworkError(
label = error.description,
error = error.error,
@@ -69,7 +78,7 @@ fun UserProfile(
}
}
Loading -> {
Box(modifier = Modifier.fillMaxSize()) {
Box(modifier = Modifier.fillMaxSize().padding(contentPadding)) {
ProgressBar(modifier = Modifier.align(Alignment.Center))
}
}
@@ -77,7 +86,11 @@ fun UserProfile(
}
@Composable
private fun UserProfileInternal(user: User, modifier: Modifier = Modifier) {
private fun UserProfileInternal(
user: User,
openUserProfile: (String) -> Unit,
modifier: Modifier = Modifier,
) {
Surface(modifier = modifier) {
Column(
horizontalAlignment = Alignment.CenterHorizontally,
@@ -93,7 +106,19 @@ private fun UserProfileInternal(user: User, modifier: Modifier = Modifier) {
Text(text = user.username, style = MaterialTheme.typography.displaySmall)
ThemedRichText(text = user.about)
user.invitedBy?.let { invitedBy ->
ThemedRichText(text = "Invited by [${invitedBy}](https://lobste.rs/u/${user.invitedBy})")
Text(
text =
buildAnnotatedString {
append("Invited by ")
pushLink(
LinkAnnotation.Clickable(
tag = "username",
linkInteractionListener = { openUserProfile(invitedBy) },
)
)
append(invitedBy)
}
)
}
}
}
@@ -0,0 +1,21 @@
/*
* Copyright © 2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
package dev.msfjarvis.claw.common.ui.decorations
import android.annotation.SuppressLint
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import dev.msfjarvis.claw.common.theme.LobstersTheme
@SuppressLint("ComposePreviewPublic", "ComposeUnstableReceiver")
class MonthHeaderTest {
@Preview(showBackground = true)
@Composable
fun DefaultPreview() {
LobstersTheme { MonthHeader(label = "April 2023") }
}
}
+6 -5
View File
@@ -1,5 +1,5 @@
/*
* Copyright © 2022-2023 Harsh Shandilya.
* Copyright © 2022-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
@@ -16,16 +16,17 @@ android { namespace = "dev.msfjarvis.claw.core" }
anvil { generateDaggerFactories.set(true) }
dependencies {
api(libs.dagger)
api(libs.javax.inject)
api(libs.kotlinx.coroutines.core)
api(libs.kotlinx.serialization.json)
api(libs.okhttp.loggingInterceptor)
api(libs.napier)
api(libs.okhttp.core)
api(libs.retrofit)
implementation(platform(libs.okhttp.bom))
implementation(platform(libs.sentry.bom))
implementation(libs.dagger)
implementation(libs.napier)
implementation(libs.okhttp.core)
implementation(libs.kotlinx.serialization.core)
implementation(libs.retrofit.kotlinxSerializationConverter)
implementation(libs.sentry.okhttp)
}
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.3.0" type="baseline" client="gradle" dependencies="true" name="AGP (8.3.0)" variant="all" version="8.3.0">
<issues format="6" by="lint 8.4.2" type="baseline" client="gradle" dependencies="true" name="AGP (8.4.2)" variant="all" version="8.4.2">
</issues>
@@ -1,5 +1,5 @@
/*
* Copyright © 2022-2023 Harsh Shandilya.
* Copyright © 2022-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
@@ -11,10 +11,8 @@ package dev.msfjarvis.claw.core.coroutines
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
/** Interface to allow abstracting individual [CoroutineDispatcher]s out of class dependencies. */
@OptIn(ExperimentalCoroutinesApi::class)
interface DispatcherProvider {
fun main(): CoroutineDispatcher = Dispatchers.Main
@@ -23,7 +21,8 @@ interface DispatcherProvider {
fun io(): CoroutineDispatcher = Dispatchers.IO
fun database(): CoroutineDispatcher = Dispatchers.IO.limitedParallelism(1)
fun database(): CoroutineDispatcher =
Dispatchers.IO.limitedParallelism(1, name = "DatabaseDispatcher")
}
/** Concrete type for [DispatcherProvider] with all the defaults from the class. */
@@ -18,7 +18,6 @@ import dagger.multibindings.IntoSet
import dev.msfjarvis.claw.core.network.DelegatingSocketFactory
import dev.msfjarvis.claw.core.network.NapierLogger
import dev.msfjarvis.claw.core.network.UserAgentInterceptor
import io.sentry.okhttp.SentryOkHttpInterceptor
import java.net.Socket
import javax.net.SocketFactory
import okhttp3.Cache
@@ -88,13 +87,5 @@ interface OkHttpModule {
fun provideHttpLoggingInterceptor(logger: HttpLoggingInterceptor.Logger): Interceptor {
return HttpLoggingInterceptor(logger).setLevel(HttpLoggingInterceptor.Level.BASIC)
}
@Provides
@IntoSet
fun provideSentryInterceptor(): Interceptor {
// Disable capturing of failed requests since there is no real upstream for this app,
// if something is going wrong it is almost always someone else's problem.
return SentryOkHttpInterceptor(captureFailedRequests = false)
}
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.3.0" type="baseline" client="gradle" dependencies="true" name="AGP (8.3.0)" variant="all" version="8.3.0">
<issues format="6" by="lint 8.4.2" type="baseline" client="gradle" dependencies="true" name="AGP (8.4.2)" variant="all" version="8.4.2">
</issues>
@@ -2,13 +2,6 @@ CREATE TABLE IF NOT EXISTS ReadPosts(
id TEXT NOT NULL PRIMARY KEY
);
isPostRead:
SELECT EXISTS(
SELECT 1
FROM ReadPosts
WHERE id = ?
) AS isRead;
selectAllPosts:
SELECT *
FROM ReadPosts;
@@ -14,13 +14,6 @@ CREATE TABLE IF NOT EXISTS SavedPost(
description TEXT NOT NULL DEFAULT ""
);
isPostSaved:
SELECT EXISTS(
SELECT 1
FROM SavedPost
WHERE shortId = ?
) AS isSaved;
insertOrReplacePost:
INSERT OR REPLACE
INTO SavedPost
+3 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright © 2021-2023 Harsh Shandilya.
* Copyright © 2021-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
@@ -18,6 +18,8 @@ android { namespace = "dev.msfjarvis.claw.database" }
anvil { generateDaggerFactories.set(true) }
dependencies {
api(libs.dagger)
api(libs.javax.inject)
api(projects.database.core)
implementation(libs.napier)
implementation(libs.dagger)
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.3.0" type="baseline" client="gradle" dependencies="true" name="AGP (8.3.0)" variant="all" version="8.3.0">
<issues format="6" by="lint 8.4.2" type="baseline" client="gradle" dependencies="true" name="AGP (8.4.2)" variant="all" version="8.4.2">
</issues>
@@ -1,5 +1,5 @@
/*
* Copyright © 2021-2023 Harsh Shandilya.
* Copyright © 2021-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
@@ -13,6 +13,7 @@ import app.cash.sqldelight.logs.LogSqliteDriver
import com.deliveryhero.whetstone.app.ApplicationScope
import com.squareup.anvil.annotations.ContributesTo
import com.squareup.anvil.annotations.optional.ForScope
import com.squareup.anvil.annotations.optional.SingleIn
import dagger.Module
import dagger.Provides
import dev.msfjarvis.claw.database.LobstersDatabase
@@ -28,7 +29,9 @@ object DatabaseModule {
private const val LOBSTERS_DATABASE_NAME = "SavedPosts.db"
@[Provides InternalDatabaseApi]
@Provides
@InternalDatabaseApi
@SingleIn(ApplicationScope::class)
fun provideDatabase(@ForScope(ApplicationScope::class) context: Context): LobstersDatabase {
val driver =
LogSqliteDriver(
+7 -3
View File
@@ -13,8 +13,8 @@ org.gradle.configuration-cache=true
org.gradle.configuration-cache.problems=warn
org.gradle.configuration-cache.max-problems=2
# Set JVM heap size to 4G
org.gradle.jvmargs=-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# Set JVM heap size to 3G
org.gradle.jvmargs=-Xmx3072m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options=-Xmx1500m,Xms500m
# Enable Kotlin incremental compilation
kotlin.incremental=true
@@ -49,7 +49,11 @@ android.dependencyResolutionAtConfigurationTime.disallow=true
android.disableEarlyManifestParsing=true
# Disable warnings about unsupported features
android.suppressUnsupportedOptionWarnings=android.dependencyResolutionAtConfigurationTime.disallow,android.disableEarlyManifestParsing,android.suppressUnsupportedOptionWarnings
android.suppressUnsupportedOptionWarnings=android.dependencyResolutionAtConfigurationTime.disallow,android.disableEarlyManifestParsing,android.experimental.enableScreenshotTest,android.suppressUnsupportedOptionWarnings
android.suppressUnsupportedCompileSdk=35
# Enable screenshot tests
android.experimental.enableScreenshotTest=true
# Make Spotless default to keeping license headers years in sync
spotlessSetLicenseHeaderYearsFromGitHistory=true
+60 -48
View File
@@ -1,33 +1,36 @@
[versions]
aboutLibraries = "11.1.0"
agp = "8.3.1"
benchmark = "1.3.0-alpha01"
coil = "2.6.0"
# @keep used for kotlinCompilerExtensionVersion
composeCompiler = "1.5.11-dev-k1.9.23-96ef9dc6af1"
coroutines = "1.8.0"
dagger = "2.51"
aboutLibraries = "11.2.3"
agp = "8.6.1"
android-junit5 = "1.11.0.0"
benchmark = "1.3.1"
coil = "2.7.0"
coroutines = "1.9.0"
dagger = "2.52"
glance = "1.0.0"
junit = "5.10.2"
konvert = "3.0.1"
kotlin = "1.9.23"
haze = "0.9.0-beta01"
junit = "5.11.0"
konvert = "3.2.2"
kotlin = "2.0.20"
kotlinResult = "2.0.0"
lifecycle = "2.7.0"
retrofit = "2.10.0"
leakcanary = "3.0-alpha-8"
lifecycle = "2.8.6"
navigation = "2.8.1"
retrofit = "2.11.0"
richtext = "1.0.0-alpha01"
sentry-sdk = "7.6.0"
serialization = "1.6.3"
sqldelight = "2.0.1"
whetstone = "0.9.0-beta01"
workmanager = "2.10.0-alpha01"
sentry-sdk = "7.14.0"
serialization = "1.7.3"
store = "5.1.0-alpha04"
sqldelight = "2.0.2"
whetstone = "0.9.0-beta02"
workmanager = "2.10.0-alpha04"
[libraries]
aboutLibraries-m3 = { module = "com.mikepenz:aboutlibraries-compose-m3", version.ref = "aboutLibraries" }
androidx-activity-compose = "androidx.activity:activity-compose:1.9.0-alpha03"
androidx-activity-compose = "androidx.activity:activity-compose:1.9.2"
androidx-benchmark-macro-junit4 = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "benchmark" }
androidx-browser = "androidx.browser:browser:1.8.0"
androidx-compose-animation = { module = "androidx.compose.animation:animation" }
androidx-compose-bom = "dev.chrisbanes.compose:compose-bom:2024.03.00-alpha01"
androidx-compose-bom = "androidx.compose:compose-bom:2024.09.00-alpha"
androidx-compose-foundation = { module = "androidx.compose.foundation:foundation" }
androidx-compose-glance = { module = "androidx.glance:glance-appwidget", version.ref = "glance" }
androidx-compose-glance-m3 = { module = "androidx.glance:glance-material3", version.ref = "glance" }
@@ -39,28 +42,28 @@ androidx-compose-ui = { module = "androidx.compose.ui:ui" }
androidx-compose-ui-text = { module = "androidx.compose.ui:ui-text" }
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
androidx-compose-ui-unit = { module = "androidx.compose.ui:ui-unit" }
androidx-compose-ui-util = { module = "androidx.compose.ui:ui-util" }
androidx-core-splashscreen = "androidx.core:core-splashscreen:1.1.0-alpha02"
androidx-lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", version.ref = "lifecycle" }
androidx-core = "androidx.core:core:1.13.1"
androidx-core-splashscreen = "androidx.core:core-splashscreen:1.2.0-alpha02"
androidx-lifecycle-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycle" }
androidx-lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime", version.ref = "lifecycle" }
androidx-lint = "androidx.lint:lint-gradle:1.0.0-alpha01"
androidx-navigation-compose = "androidx.navigation:navigation-compose:2.8.0-alpha04"
androidx-paging-compose = "androidx.paging:paging-compose:3.3.0-alpha04"
androidx-profileinstaller = "androidx.profileinstaller:profileinstaller:1.4.0-alpha01"
androidx-test-core = "androidx.test:core:1.6.0-alpha05"
androidx-test-espresso-core = "androidx.test.espresso:espresso-core:3.6.0-alpha03"
androidx-test-ext-junit = "androidx.test.ext:junit:1.2.0-alpha03"
androidx-test-rules = "androidx.test:rules:1.6.0-alpha03"
androidx-test-runner = "androidx.test:runner:1.6.0-alpha06"
androidx-lint = "androidx.lint:lint-gradle:1.0.0-alpha02"
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigation" }
androidx-paging-compose = "androidx.paging:paging-compose:3.3.2"
androidx-profileinstaller = "androidx.profileinstaller:profileinstaller:1.4.0"
androidx-test-core = "androidx.test:core:1.6.1"
androidx-test-espresso-core = "androidx.test.espresso:espresso-core:3.6.1"
androidx-test-ext-junit = "androidx.test.ext:junit:1.2.1"
androidx-test-rules = "androidx.test:rules:1.6.1"
androidx-test-runner = "androidx.test:runner:1.6.2"
androidx-test-uiautomator = "androidx.test.uiautomator:uiautomator:2.3.0"
androidx-work-runtime = { module = "androidx.work:work-runtime", version.ref = "workmanager" }
build-agp = { module = "com.android.tools.build:gradle", version.ref = "agp" }
build-cachefix = "org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin:3.0.1"
build-kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
build-semver = "com.github.zafarkhaja:java-semver:0.10.2"
build-sentry = "io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin:4.3.1"
build-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.25.0"
build-sentry = "io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin:4.11.0"
build-spotless = "com.diffplug.spotless:spotless-plugin-gradle:7.0.0.BETA2"
build-vcu = "nl.littlerobots.version-catalog-update:nl.littlerobots.version-catalog-update.gradle.plugin:0.8.4"
coil = { module = "io.coil-kt:coil", version.ref = "coil" }
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
@@ -70,55 +73,64 @@ compose-richtext-ui = { module = "com.halilibo.compose-richtext:richtext-ui", ve
copydown = "io.github.furstenheim:copy_down:1.1"
dagger = { module = "com.google.dagger:dagger", version.ref = "dagger" }
dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "dagger" }
eithernet = "com.slack.eithernet:eithernet:1.8.1"
eithernet = "com.slack.eithernet:eithernet:1.9.0"
haze = { module = "dev.chrisbanes.haze:haze", version.ref = "haze" }
haze-materials = { module = "dev.chrisbanes.haze:haze-materials", version.ref = "haze" }
javax-inject = "javax.inject:javax.inject:1"
jsoup = "org.jsoup:jsoup:1.17.2"
jsoup = "org.jsoup:jsoup:1.18.1"
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" }
junit-legacy = "junit:junit:4.13.2"
konvert-annotations = { module = "io.mcarle:konvert-annotations", version.ref = "konvert" }
konvert-api = { module = "io.mcarle:konvert-api", version.ref = "konvert" }
konvert-processor = { module = "io.mcarle:konvert", version.ref = "konvert" }
kotlinResult = { module = "com.michael-bull.kotlin-result:kotlin-result", version.ref = "kotlinResult" }
kotlinResult-coroutines = { module = "com.michael-bull.kotlin-result:kotlin-result-coroutines", version.ref = "kotlinResult" }
kotlinx-collections-immutable = "org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7"
kotlinx-collections-immutable = "org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.8"
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "serialization" }
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" }
material3-pulltorefresh = "eu.bambooapps:compose-material3-pullrefresh:1.1.1"
leakcanary-android-test = { module = "com.squareup.leakcanary:leakcanary-android-test", version.ref = "leakcanary" }
napier = "io.github.aakira:napier:2.7.1"
okhttp-bom = "com.squareup.okhttp3:okhttp-bom:4.12.0"
okhttp-core = { module = "com.squareup.okhttp3:okhttp" }
okhttp-loggingInterceptor = { module = "com.squareup.okhttp3:logging-interceptor" }
okhttp-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver" }
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
retrofit-kotlinxSerializationConverter = { module = "com.squareup.retrofit2:converter-kotlinx-serialization", version.ref = "retrofit" }
sentry-android = { module = "io.sentry:sentry-android", version.ref = "sentry-sdk" }
sentry-bom = { module = "io.sentry:sentry-bom", version.ref = "sentry-sdk" }
sentry-okhttp = { module = "io.sentry:sentry-okhttp", version.ref = "sentry-sdk" }
slack-compose-lints = "com.slack.lint.compose:compose-lint-checks:1.3.1"
slack-lints = "com.slack.lint:slack-lint-checks:0.7.0"
slack-lints = "com.slack.lint:slack-lint-checks:0.7.4"
sqldelight-androidDriver = { module = "app.cash.sqldelight:android-driver", version.ref = "sqldelight" }
sqldelight-dialect338 = { module = "app.cash.sqldelight:sqlite-3-38-dialect", version.ref = "sqldelight" }
sqldelight-extensions-coroutines = { module = "app.cash.sqldelight:coroutines-extensions-jvm", version.ref = "sqldelight" }
sqldelight-jvmDriver = { module = "app.cash.sqldelight:sqlite-driver", version.ref = "sqldelight" }
sqldelight-primitiveAdapters = { module = "app.cash.sqldelight:primitive-adapters", version.ref = "sqldelight" }
sqlite-android = "com.github.requery:sqlite-android:3.45.0"
store = { module = "org.mobilenativefoundation.store:store5", version.ref = "store" }
swipe = "me.saket.swipe:swipe:1.3.0"
truth = "com.google.truth:truth:1.4.2"
unfurl = "me.saket.unfurl:unfurl:1.7.0"
truth = "com.google.truth:truth:1.4.4"
unfurl = "me.saket.unfurl:unfurl:2.2.0"
[plugins]
aboutlibraries = { id = "com.mikepenz.aboutlibraries.plugin", version.ref = "aboutLibraries" }
android-lint = { id = "com.android.lint", version.ref = "agp" }
android-junit5 = { id = "de.mannodermaus.android-junit5", version.ref = "android-junit5" }
android-test = { id = "com.android.test", version.ref = "agp" }
anvil = "com.squareup.anvil:2.5.0-beta04"
anvil = "com.squareup.anvil:2.5.0-beta11"
baselineprofile = { id = "androidx.baselineprofile", version.ref = "benchmark" }
dependencyAnalysis = "com.autonomousapps.dependency-analysis:2.0.2"
invert = "com.squareup.invert:0.0.1-dev"
kotlin-composeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
ksp = "com.google.devtools.ksp:1.9.23-1.0.19"
licensee = "app.cash.licensee:1.9.1"
modulegraphassert = "com.jraska.module.graph.assertion:2.5.0"
poko = "dev.drewhamilton.poko:0.15.2"
ksp = "com.google.devtools.ksp:2.0.20-1.0.25"
licensee = "app.cash.licensee:1.11.0"
modulegraphassert = "com.jraska.module.graph.assertion:2.7.1"
navigation-safeargs = { id = "androidx.navigation.safeargs.kotlin", version.ref = "navigation" }
poko = "dev.drewhamilton.poko:0.17.1"
screenshot = "com.android.compose.screenshot:0.0.1-alpha07"
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
tracelog = "dev.msfjarvis.tracelog:0.1.3"
whetstone = { id = "dev.msfjarvis.whetstone", version.ref = "whetstone" }
Binary file not shown.
+2 -2
View File
@@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=9631d53cf3e74bfa726893aee1f8994fee4e060c401335946dba2156f440f24c
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionSha256Sum=1541fa36599e12857140465f3c91a97409b4512501c26f9631fb113e392c5bd1
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+5 -2
View File
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Vendored
+2
View File
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
+3 -1
View File
@@ -12,12 +12,14 @@ appId: dev.msfjarvis.claw.android
- waitForAnimationToEnd
- takeScreenshot: "SavedPosts"
- tapOn: "Search posts"
- inputText: "Nix"
- inputText: "Rust"
- pressKey: Enter
- hideKeyboard
- waitForAnimationToEnd
- takeScreenshot: "SearchPage"
- back
# TODO: figure out why do I need to press back twice
- back
- tapOn: "Settings"
- tapOn: "Export"
- takeScreenshot: "SettingsPage"
+4 -3
View File
@@ -1,5 +1,5 @@
/*
* Copyright © 2021-2023 Harsh Shandilya.
* Copyright © 2021-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
@@ -12,9 +12,10 @@ plugins {
}
dependencies {
implementation(libs.kotlinx.serialization.core)
compileOnly(libs.konvert.annotations)
api(projects.database.core)
implementation(libs.konvert.api)
implementation(projects.database.core)
implementation(libs.kotlinx.serialization.core)
ksp(libs.konvert.processor)
}
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.3.0" type="baseline" client="gradle" dependencies="true" name="AGP (8.3.0)" variant="all" version="8.3.0">
<issues format="6" by="lint 8.4.2" type="baseline" client="gradle" dependencies="true" name="AGP (8.4.2)" variant="all" version="8.4.2">
</issues>
@@ -29,5 +29,6 @@ class LobstersPost(
val commentCount: Int,
val commentsUrl: String,
@SerialName("submitter_user") val submitter: String,
@SerialName("user_is_author") val userIsAuthor: Boolean,
val tags: List<String>,
)
@@ -27,8 +27,7 @@ data class UIPost(
@SerialName("submitter_user") val submitter: String,
val tags: List<String>,
val comments: List<Comment> = emptyList(),
val isSaved: Boolean = false,
val isRead: Boolean = false,
val userIsAuthor: Boolean = false,
) {
@KonvertFrom(
value = SavedPost::class,
@@ -36,7 +35,6 @@ data class UIPost(
[
Mapping(target = "submitter", expression = "it.submitterName"),
Mapping(target = "commentCount", expression = "it.commentCount ?: 0"),
Mapping(target = "isSaved", expression = "true"),
],
)
companion object
+19 -10
View File
@@ -14,8 +14,9 @@ pluginManagement {
includeGroup("androidx.baselineprofile")
includeGroup("androidx.benchmark")
includeGroup("androidx.databinding")
includeGroupByRegex("com.android.*")
includeGroupAndSubgroups("androidx.navigation")
includeGroup("com.google.testing.platform")
includeGroupAndSubgroups("com.android")
}
}
exclusiveContent {
@@ -35,8 +36,8 @@ pluginManagement {
"com.jraska.module.graph.assertion",
"com.jraska.module.graph.assertion.gradle.plugin",
)
includeModule("com.gradle", "gradle-enterprise-gradle-plugin")
includeModule("com.gradle.enterprise", "com.gradle.enterprise.gradle.plugin")
includeModule("com.gradle", "develocity-gradle-plugin")
includeModule("com.gradle.develocity", "com.gradle.develocity.gradle.plugin")
includeModule("com.jraska.module.graph.assertion", "plugin")
includeModule(
"org.gradle.toolchains.foojay-resolver-convention",
@@ -49,6 +50,12 @@ pluginManagement {
maven("https://oss.sonatype.org/content/repositories/snapshots/") {
name = "Sonatype Snapshots"
content { includeGroup("dev.msfjarvis.whetstone") }
content { includeGroup("dev.drewhamilton.poko") }
mavenContent { snapshotsOnly() }
}
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
name = "Sonatype S01 Snapshots"
content { includeGroup("com.squareup.invert") }
mavenContent { snapshotsOnly() }
}
mavenCentral { mavenContent { releasesOnly() } }
@@ -57,14 +64,14 @@ pluginManagement {
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
id("com.gradle.enterprise") version "3.16.2"
id("com.gradle.develocity") version "3.18.1"
}
gradleEnterprise {
develocity {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = if (System.getenv("GITHUB_WORKFLOW").isNullOrEmpty()) "no" else "yes"
publishOnFailureIf(!System.getenv("GITHUB_WORKFLOW").isNullOrEmpty())
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
termsOfUseAgree = if (System.getenv("GITHUB_WORKFLOW").isNullOrEmpty()) "no" else "yes"
publishing.onlyIf { !System.getenv("GITHUB_WORKFLOW").isNullOrEmpty() }
}
}
@@ -73,8 +80,8 @@ dependencyResolutionManagement {
repositories {
google {
content {
includeGroupByRegex("androidx.*")
includeGroupByRegex("com.android.*")
includeGroupAndSubgroups("androidx")
includeGroupAndSubgroups("com.android")
includeGroup("com.google.android.gms")
includeModule("com.google.android.material", "material")
includeGroup("com.google.testing.platform")
@@ -91,6 +98,7 @@ dependencyResolutionManagement {
maven("https://oss.sonatype.org/content/repositories/snapshots/") {
name = "Sonatype Snapshots"
content { includeGroup("dev.msfjarvis.whetstone") }
content { includeGroup("dev.drewhamilton.poko") }
mavenContent { snapshotsOnly() }
}
mavenCentral { mavenContent { releasesOnly() } }
@@ -110,5 +118,6 @@ include(
"database:core",
"database:impl",
"model",
"store",
"web",
)
+24
View File
@@ -0,0 +1,24 @@
/*
* Copyright © 2021-2024 Harsh Shandilya.
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
import dev.msfjarvis.claw.gradle.addTestDependencies
plugins {
id("dev.msfjarvis.claw.android-library")
id("dev.msfjarvis.claw.kotlin-android")
alias(libs.plugins.anvil)
alias(libs.plugins.whetstone)
}
android { namespace = "dev.msfjarvis.claw.data.store" }
anvil { generateDaggerFactories.set(true) }
dependencies {
implementation(libs.store)
addTestDependencies(project)
}
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.4.2" type="baseline" client="gradle" dependencies="true" name="AGP (8.4.2)" variant="all" version="8.4.2">
</issues>
+8 -5
View File
@@ -9,23 +9,26 @@
plugins {
id("dev.msfjarvis.claw.android-library")
id("dev.msfjarvis.claw.kotlin-android")
alias(libs.plugins.kotlin.composeCompiler)
}
android {
namespace = "com.google.accompanist.web"
buildFeatures.compose = true
composeOptions.kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
kotlin.explicitApi()
// Don't quite care
lint.disable += "DeprecatedCall"
}
dependencies {
implementation(projects.core)
api(libs.androidx.compose.runtime)
api(libs.androidx.compose.ui)
api(libs.kotlinx.coroutines.core)
api(projects.core)
implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.ui.util)
implementation(libs.androidx.lifecycle.runtime)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.compose.foundation)
implementation(libs.androidx.compose.ui.unit)
implementation(libs.kotlinx.collections.immutable)
}
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.3.0" type="baseline" client="gradle" dependencies="true" name="AGP (8.3.0)" variant="all" version="8.3.0">
<issues format="6" by="lint 8.4.2" type="baseline" client="gradle" dependencies="true" name="AGP (8.4.2)" variant="all" version="8.4.2">
</issues>