Compare commits

...
700 Commits
Author SHA1 Message Date
GitHub Actions 6c5b54587e feat(release): bump version 2024-03-16 06:04:08 +00:00
Harsh Shandilya e318ea3a35 fix(ci): drop release snapshots 2024-03-16 11:28:04 +05:30
Harsh Shandilya 5ba0c9a544 refactor(build): always enable Sentry and set environment
Thx Static-Var my beloved
2024-03-16 10:14:57 +05:30
Harsh Shandilya 85fc5cac21 fix: adjust for new API changes 2024-03-16 09:48:08 +05:30
Harsh Shandilya 86a40d2e84 fix(deps): upgrade dev.msfjarvis.whetstone to 0.9.0-beta01 2024-03-15 13:21:02 +05:30
renovate[bot]andGitHub 557407347b chore(deps): update plugin anvil to v2.5.0-beta04 2024-03-14 23:08:38 +00:00
renovate[bot]andGitHub b0467aa36c chore(deps): update actions/setup-java action to v4.2.1 2024-03-14 17:04:59 +00:00
renovate[bot]andGitHub d29b4e2ee2 chore(deps): update actions/setup-java action to v4.2.0 2024-03-13 14:30:50 +00:00
renovate[bot]andGitHub 64fb1235d5 chore(deps): update github/codeql-action action to v3.24.7 2024-03-12 19:00:05 +00:00
Harsh Shandilya d46993aaf6 fix(deps): bump Compose Compiler to 1.5.11-dev-k1.9.23-96ef9dc6af1 2024-03-12 18:59:05 +05:30
renovate[bot]andGitHub 310db93ff0 chore(deps): update kotlin and compose 2024-03-12 13:27:21 +00:00
Harsh Shandilya f07a5682a1 Revert "fix(renovate): temporarily disable Kotlin group"
This reverts commit f54d790da4.
2024-03-12 18:56:23 +05:30
Harsh Shandilya bcde4b9719 fix(ci): build internal flavor for CodeQL 2024-03-11 07:46:01 +05:30
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
e2e2f4f574 chore(deps): update mindsers/changelog-reader-action action to v2.2.3 (#482)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[mindsers/changelog-reader-action](https://togithub.com/mindsers/changelog-reader-action)
| action | patch | `v2.2.2` -> `v2.2.3` |

---

### Release Notes

<details>
<summary>mindsers/changelog-reader-action
(mindsers/changelog-reader-action)</summary>

###
[`v2.2.3`](https://togithub.com/mindsers/changelog-reader-action/releases/tag/v2.2.3)

[Compare
Source](https://togithub.com/mindsers/changelog-reader-action/compare/v2.2.2...v2.2.3)

##### Fixed

-   Upgrade dependencies to solve deprecation issues.
-   Use node v20
-   Remove useless empty line between links in the body of a version

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIzMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-11 00:47:49 +00:00
Harsh Shandilya a42139ae1e fix(ci): upload Sentry mappings from Tramline releases 2024-03-08 22:57:41 +05:30
Harsh Shandilya 5d0e56f115 fix(build): catch up on SentryExtension changes 2024-03-08 22:57:41 +05:30
renovate[bot]andGitHub fa31e300e9 fix(deps): update sentry to v7.6.0 2024-03-08 14:31:16 +00:00
Harsh Shandilya f54d790da4 fix(renovate): temporarily disable Kotlin group 2024-03-08 17:22:02 +05:30
GitHub Actions 96c8a0450e feat(release): start next development iteration 2024-03-07 19:47:35 +00:00
GitHub Actions 886cd65a32 feat(release): bump version 2024-03-07 19:44:46 +00:00
Harsh Shandilya 8c8dd93136 chore: update changelog 2024-03-08 00:59:37 +05:30
Harsh Shandilya 9110244236 fix(deps): downgrade androidx.lifecycle back to stable
For inexplicable reasons the latest Lifecycle libraries request storage access and phone state permissions

Fixes #475
2024-03-08 00:57:34 +05:30
GitHub Actions 56f0ceddb6 feat(release): start next development iteration 2024-03-07 08:06:37 +00:00
GitHub Actions c07752df4a feat(release): bump version 2024-03-07 08:02:41 +00:00
Harsh Shandilya 3f18160dd0 fix(android): ensure import flow updates saved posts list 2024-03-07 12:49:03 +05:30
Harsh Shandilya 0c3dc00137 chore: update changelog 2024-03-07 11:53:17 +05:30
Harsh Shandilya 4fb66975fb fix(common): adopt new elevation guidelines 2024-03-07 11:41:44 +05:30
Harsh Shandilya dc584a300d fix(deps): bump dev.chrisbanes.compose:compose-bom to 2024.03.00-alpha01 2024-03-07 11:27:48 +05:30
renovate[bot]andGitHub 30121d6d88 fix(deps): update androidx 2024-03-06 19:00:23 +00:00
renovate[bot]andGitHub 2a97576e37 fix(deps): update dependency eu.bambooapps:compose-material3-pullrefresh to v1.1.1 2024-03-06 14:30:43 +00:00
Harsh Shandilya 32a59d0104 refactor(build): remove uses of internal AGP APIs 2024-03-05 22:45:46 +05:30
Harsh Shandilya a161769cbd chore: refresh Lint baselines 2024-03-05 19:12:58 +05:30
Harsh Shandilya 9a6d7d267a feat(build): add androidx.lint checks to build-logic 2024-03-05 19:12:58 +05:30
renovate[bot]andGitHub 9298fa9ea0 fix(deps): update dependency com.michael-bull.kotlin-result:kotlin-result-coroutines to v1.1.20 2024-03-04 00:35:51 +00:00
renovate[bot]andGitHub f0bd943607 fix(deps): update dependency com.michael-bull.kotlin-result:kotlin-result-coroutines to v1.1.19 2024-03-03 03:53:58 +00:00
Harsh Shandilya 30474377fc Revert "chore(build): move Tramline releases to Buildkansen"
This reverts commit 17c7313f41.
2024-03-01 19:55:41 +05:30
renovate[bot]andGitHub 6d04230dc6 fix(deps): update sentry to v7.5.0 2024-03-01 13:23:18 +00:00
renovate[bot]andGitHub 19f408b6cd fix(deps): update dependency com.google.truth:truth to v1.4.2 2024-03-01 00:30:53 +00:00
renovate[bot]andGitHub ad528792fa chore(deps): update agp to v8.3.0 2024-02-29 20:05:01 +00:00
renovate[bot]andGitHub 78e34a0042 chore(deps): update github/codeql-action action to v3.24.6 2024-02-29 14:30:53 +00:00
Harsh Shandilya 83ba17dea3 fix(ci): rework job conditions 2024-02-29 19:18:54 +05:30
Harsh Shandilya fcca85c51a fix(ci): move all workflows to macOS 14 runners
Just for keks™️
2024-02-29 18:45:25 +05:30
Harsh Shandilya 17c7313f41 chore(build): move Tramline releases to Buildkansen
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2024-02-29 18:01:35 +05:30
Harsh Shandilya 97126da808 fix(deps): upgrade richtext to 1.0.0-alpha01 2024-02-29 18:01:35 +05:30
Harsh Shandilya fdf891c8eb fix(build): disable ObsoleteLintCustomCheck lint
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2024-02-29 18:01:35 +05:30
Harsh Shandilya af7c54203f Merge remote-tracking branches 'origin/renovate/sentry' and 'origin/renovate/kotlin-and-compose'
* origin/renovate/sentry:
  fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.3.1

* origin/renovate/kotlin-and-compose:
  chore(deps): update plugin ksp to v1.9.22-1.0.18
2024-02-29 10:44:20 +05:30
renovate[bot]andGitHub 334cf11b82 chore(deps): update plugin ksp to v1.9.22-1.0.18 2024-02-29 03:53:22 +00:00
renovate[bot]andGitHub a9ba948d12 fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.3.1 2024-02-28 14:30:34 +00:00
Harsh Shandilya 1e29a866a0 fix(deps): bump anvil to 2.5.0-beta03 2024-02-28 15:41:26 +05:30
renovate[bot]andGitHub 693713eb8d chore(deps): update aboutlibraries to v11.1.0 2024-02-28 09:36:36 +00:00
renovate[bot]andGitHub 1b6c6af3c4 chore(deps): update actions/setup-java action to v4.1.0 2024-02-28 06:34:02 +00:00
renovate[bot]andGitHub 61b0ac83f0 fix(deps): update dagger to v2.51 2024-02-27 19:47:02 +00:00
renovate[bot]andGitHub bce435e3d2 fix(deps): update konvert to v3.0.1 2024-02-26 11:13:45 +00:00
renovate[bot]andGitHub 833b3cd927 fix(deps): update coil to v2.6.0 2024-02-23 22:28:55 +00:00
renovate[bot]andGitHub a6a3b2a0e4 chore(deps): update github/codeql-action action to v3.24.5 2024-02-23 13:50:20 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
73e0b4927f chore(deps): update github/codeql-action action to v3.24.4 (#461)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-22 22:38:33 +05:30
Harsh Shandilya b68d58c19d fix(gradle): force use of new resolver for VCU 2024-02-22 13:47:04 +05:30
Harsh Shandilya 3bccc8748d feat(build): add internal build type
Allows testing release builds in parallel with Play Store
2024-02-22 13:47:04 +05:30
Harsh Shandilya f115fd8dda fix(build): remove obsolete workaround 2024-02-22 13:34:29 +05:30
Harsh Shandilya 954ef90d99 chore(deps): update androidx 2024-02-22 13:30:33 +05:30
Harsh Shandilya 65f7013e78 chore: refresh lint baseline 2024-02-22 11:13:57 +05:30
renovate[bot]andGitHub af799e0165 fix(deps): update dependency dev.chrisbanes.compose:compose-bom to v2024.02.00-alpha02 2024-02-22 01:22:02 +00:00
renovate[bot]andGitHub c4fb53e09d fix(deps): update sentry to v7.4.0 2024-02-21 14:30:37 +00:00
renovate[bot]andGitHub 982497a83f chore(deps): update actions/dependency-review-action digest to 9129d7d 2024-02-20 19:25:55 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
165c0eaaed chore(deps): update aboutlibraries to v11.1.0-b03 (#455)
[![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-b01` -> `11.1.0-b03` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.mikepenz.aboutlibraries.plugin/11.1.0-b03?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.mikepenz.aboutlibraries.plugin/11.1.0-b03?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-b01/11.1.0-b03?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-b01/11.1.0-b03?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[com.mikepenz:aboutlibraries-compose-m3](https://togithub.com/mikepenz/AboutLibraries)
| `11.1.0-b01` -> `11.1.0-b03` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.mikepenz:aboutlibraries-compose-m3/11.1.0-b03?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.0-b03?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-b01/11.1.0-b03?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-b01/11.1.0-b03?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

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

#### 💬 Other

-   Fix CI for releases on macOS-14 runner
- PR:
[#&#8203;960](https://togithub.com/mikepenz/AboutLibraries/issues/960)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOTEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-20 10:10:11 +00:00
renovate[bot]andGitHub 2c62515746 chore(deps): update actions/dependency-review-action digest to be8bc50 2024-02-19 19:24:01 +00:00
renovate[bot]andGitHub 376c2f138c chore(deps): update actions/dependency-review-action digest to fd07d42 2024-02-19 09:27:26 +00:00
renovate[bot]andGitHub d271dd3733 fix(deps): update serialization to v1.6.3 2024-02-16 21:41:06 +00:00
renovate[bot]andGitHub 0c36875502 fix(deps): update dependency com.google.truth:truth to v1.4.1 2024-02-16 18:45:08 +00:00
renovate[bot]andGitHub b31521affa fix(deps): update coroutines to v1.8.0 2024-02-15 16:46:08 +00:00
renovate[bot]andGitHub 488880ee35 chore(deps): update github/codeql-action action to v3.24.3 2024-02-15 12:56:12 +00:00
renovate[bot]andGitHub f2065d897b chore(deps): update actions/dependency-review-action digest to 80f10bf 2024-02-14 11:01:51 +00:00
renovate[bot]andGitHub e83b87be6c chore(deps): update agp to v8.3.0-rc02 2024-02-14 01:35:23 +00:00
renovate[bot]andGitHub 993b45034e chore(deps): update gradle/actions digest to 417ae3c 2024-02-13 23:02:17 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
9d6d497185 chore(deps): update github/codeql-action action to v3.24.1 (#451)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github/codeql-action](https://togithub.com/github/codeql-action) |
action | patch | `v3.24.0` -> `v3.24.1` |

---

### Release Notes

<details>
<summary>github/codeql-action (github/codeql-action)</summary>

###
[`v3.24.1`](https://togithub.com/github/codeql-action/compare/v3.24.0...v3.24.1)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v3.24.0...v3.24.1)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-13 16:38:34 +00:00
Harsh Shandilya 719d317263 fix(gradle): downgrade Glance back to v1.0.0
This is resulting in some weird miscompilation that results
in release builds having an unitialized `viewModel` field in
`WidgetReceiver` which indicates a miscompilation of the
Whetstone code surrounding it.
2024-02-13 22:01:14 +05:30
Harsh Shandilya 8d78e1910a refactor(android): centralize widget display logic 2024-02-13 22:01:14 +05:30
renovate[bot]andGitHub 62f643135b chore(deps): update plugin licensee to v1.9.1 2024-02-12 16:56:19 +00:00
renovate[bot]andGitHub 595a8f7dfe fix(deps): update dependency com.slack.eithernet:eithernet to v1.8.1 2024-02-12 04:03:03 +00:00
renovate[bot]andGitHub 1d7be62857 fix(deps): update dependency org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin to v3.0.1 2024-02-09 22:23:02 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
f86cdb0e62 fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.3.0 (#446)
[![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.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin](https://togithub.com/getsentry/sentry-android-gradle-plugin)
| `4.2.0` -> `4.3.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin/4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin/4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin/4.2.0/4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin/4.2.0/4.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>getsentry/sentry-android-gradle-plugin
(io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin)</summary>

###
[`v4.3.0`](https://togithub.com/getsentry/sentry-android-gradle-plugin/blob/HEAD/CHANGELOG.md#430)

[Compare
Source](https://togithub.com/getsentry/sentry-android-gradle-plugin/compare/4.2.0...4.3.0)

##### Fixes

- Bundle ASM version within the plugin and bump it to `9.4`
([#&#8203;637](https://togithub.com/getsentry/sentry-android-gradle-plugin/pull/637))
- This should fix the `java.lang.AssertionError: Class with incorrect id
found` exception when using `kotlinx.serialization`
- Fall back to `findTask` if `assembleProvider` of AndroidVariant is
null when hooking source bundle and native symbols upload tasks
([#&#8203;639](https://togithub.com/getsentry/sentry-android-gradle-plugin/pull/639))
- Hook source context tasks to also run after `install{Variant}` tasks
([#&#8203;643](https://togithub.com/getsentry/sentry-android-gradle-plugin/pull/643))
- Do not run sentry-cli commands if telemetry is disabled
([#&#8203;648](https://togithub.com/getsentry/sentry-android-gradle-plugin/pull/648))
- Proguard and source context tasks don't run on every build
([#&#8203;634](https://togithub.com/getsentry/sentry-android-gradle-plugin/pull/634))
- Proguard UUID task now depends on the proguard mapping file. I.e. it
will only run if the mapping file has changed
- Source context tasks now depend on source file changes, if there are
no source changes, the tasks won't run

##### Dependencies

- Bump CLI from v2.25.0 to v2.28.0
([#&#8203;638](https://togithub.com/getsentry/sentry-android-gradle-plugin/pull/638),
[#&#8203;640](https://togithub.com/getsentry/sentry-android-gradle-plugin/pull/640),
[#&#8203;642](https://togithub.com/getsentry/sentry-android-gradle-plugin/pull/642),
[#&#8203;647](https://togithub.com/getsentry/sentry-android-gradle-plugin/pull/647),
[#&#8203;652](https://togithub.com/getsentry/sentry-android-gradle-plugin/pull/652))
-
[changelog](https://togithub.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2280)
-
[diff](https://togithub.com/getsentry/sentry-cli/compare/2.25.0...2.28.0)
Bump Android SDK from v7.2.0 to v7.3.0
([#&#8203;646](https://togithub.com/getsentry/sentry-android-gradle-plugin/pull/646))

[changelog](https://togithub.com/getsentry/sentry-java/blob/main/CHANGELOG.md#730)

[diff](https://togithub.com/getsentry/sentry-java/compare/7.2.0...7.3.0)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNzMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE3My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-09 22:13:39 +00:00
renovate[bot]andGitHub ffc525a1ad chore(deps): update r0adkll/upload-google-play action to v1.1.3 2024-02-09 12:48:52 +00:00
renovate[bot]andGitHub de6b13fbfc fix(deps): update dependency eu.bambooapps:compose-material3-pullrefresh to v1.1.0 2024-02-08 18:09:12 +00:00
Harsh Shandilya e949ee0bb6 fix(deps): bump glance and profileinstaller 2024-02-08 11:29:51 +05:30
Harsh Shandilya 9f4caa7f62 Revert "refactor: remove unused versions plugin"
This reverts commit 9fb8e17cf6.
2024-02-08 11:29:51 +05:30
Harsh Shandilya a334eebe74 fix(deps): update dev.chrisbanes.compose:compose-bom to 2024.02.00-alpha01 2024-02-08 11:13:58 +05:30
renovate[bot]andGitHub fd30320ed6 chore(deps): update androidx 2024-02-07 18:58:49 +00:00
Harsh Shandilya c293fced8a fix(android): relax constraints on post update worker 2024-02-07 00:24:35 +05:30
Harsh Shandilya fa57bc9695 refactor(android): consistently use repository layer 2024-02-07 00:16:06 +05:30
renovate[bot]andGitHub 1d1c7a36b6 chore(deps): update actions/upload-artifact action to v4.3.1 2024-02-05 22:52:07 +00:00
renovate[bot]andGitHub 682377f6c5 chore(deps): update dependency com.android.test to v8.3.0-rc01 2024-02-05 18:09:44 +00:00
Harsh Shandilya a8d637e589 chore: update changelog 2024-02-05 17:03:21 +05:30
Harsh Shandilya 9e2564f352 chore: refresh baseline profiles 2024-02-04 16:02:20 +05:30
renovate[bot]andGitHub eb17c20be8 fix(deps): update junit5 monorepo to v5.10.2 2024-02-04 09:56:24 +00:00
renovate[bot]andGitHub e878699e2a fix(deps): update dependency me.saket.swipe:swipe to v1.3.0 2024-02-04 08:14:47 +00:00
renovate[bot]andGitHub 9dc0b5cd13 fix(deps): update dependency com.google.truth:truth to v1.4.0 2024-02-02 23:18:34 +00:00
renovate[bot]andGitHub 875453cce5 chore(deps): update github/codeql-action action to v3.24.0 2024-02-02 18:40:55 +00:00
Harsh Shandilya 82a1ba9ac3 fix(build): use new Gradle API for task matching 2024-02-02 23:55:40 +05:30
Harsh Shandilya ff4a09e41b fix(deps): update Gradle to 8.6 2024-02-02 23:51:49 +05:30
renovate[bot]andGitHub 6b670ad3e5 chore(deps): pin gradle/actions action to ec92e82 2024-01-31 15:54:35 +00:00
Harsh Shandilya 2bf7ccc952 chore(deps): upgrade gradle/actions/setup-gradle to v3 2024-01-31 21:22:08 +05:30
renovate[bot]andGitHub d25476be11 fix(deps): update sentry to v7.3.0 2024-01-30 10:46:26 +00:00
Harsh Shandilya 6d7e2bc7aa fix(ci): bump setup-gradle action 2024-01-30 16:15:11 +05:30
Harsh Shandilya b1148679e3 refactor: workaround poor read/saved state management
I need a fresh set of eyes on this absolute mess
2024-01-30 01:36:00 +05:30
Harsh Shandilya 6a9cd40eaf fix(deps): update androidx.test and Licensee 2024-01-30 00:47:07 +05:30
Harsh Shandilya bd16709a81 chore: add Google Play Open Testing channel to README 2024-01-30 00:04:32 +05:30
Harsh Shandilya cbd7f2fca4 refactor: improve read posts search performance 2024-01-29 18:20:27 +05:30
Harsh Shandilya 89b821ebf1 fix(ci): rename snapshot tag back to latest
The 'nightly' name is being used by the Tramline branch now
2024-01-28 14:06:09 +05:30
Harsh Shandilya 3fc0f891d4 fix(ci): setup signing secrets in Tramline workflow 2024-01-28 14:04:03 +05:30
Harsh Shandilya 74a7835a53 refactor(android): switch over to PagingData transformations 2024-01-27 19:55:03 +05:30
Harsh Shandilya 051b7ab2bb chore(ci): migrate to new Gradle actions 2024-01-27 16:27:12 +05:30
Harsh Shandilya 38f71460f0 refactor(build): defer semver parsing to task execution 2024-01-27 15:02:15 +05:30
Harsh Shandilya 1ab1520c60 feat(build): add support for Tramline builds 2024-01-27 14:03:58 +05:30
Harsh Shandilya 0e5caf591a refactor: replace semver4j with jsemver 2024-01-27 13:18:32 +05:30
Harsh Shandilya ad2582a28e fix(build): bump About Libraries, Coroutines and WorkManager 2024-01-26 21:26:29 +05:30
renovate[bot]andGitHub c9d89f493d chore(deps): update github/codeql-action action to v3.23.2 2024-01-26 15:07:32 +00:00
renovate[bot]andGitHub 8669e3f780 chore(deps): update plugin com.gradle.enterprise to v3.16.2 2024-01-26 13:49:40 +00:00
Harsh Shandilya e7d5676cb5 refactor: address issues from compose-lint 1.3.x 2024-01-26 14:54:21 +05:30
renovate[bot]andGitHub 800bffbf24 fix(deps): update dependency com.slack.lint.compose:compose-lint-checks to v1.3.1 2024-01-26 01:18:23 +00:00
renovate[bot]andGitHub 17c02c2a25 fix(deps): update dependency com.slack.lint.compose:compose-lint-checks to v1.3.0 2024-01-25 20:33:42 +00:00
renovate[bot]andGitHub 89db5e3b3f chore(deps): update gradle/gradle-build-action action to v2.12.0 2024-01-25 01:36:13 +00:00
Harsh Shandilya 1524eb23d4 chore: refresh baseline profiles 2024-01-25 01:41:57 +05:30
Harsh Shandilya d7dd2eb611 feat(benchmark): use real devices baseline profile generation
Emulators are pretty unstable for this
2024-01-25 01:41:57 +05:30
Harsh Shandilya a3e150fdd9 fix(build): add missing inclusion for baseline profile generation 2024-01-25 01:32:12 +05:30
Harsh Shandilya fa2868edd6 fix(deps): update all AndroidX libraries to latest unstable 2024-01-25 01:19:05 +05:30
renovate[bot]andGitHub e3e62b62ad chore(deps): update androidx to v1.2.3 2024-01-24 18:26:53 +00:00
renovate[bot]andGitHub a071a65ecc chore(deps): update actions/upload-artifact action to v4.3.0 2024-01-23 19:48:31 +00:00
GitHub Actions 65e033cc80 feat(release): start next development iteration 2024-01-23 17:23:09 +00:00
GitHub Actions ffe63bbce0 feat(release): bump version 2024-01-23 17:20:09 +00:00
Harsh ShandilyaandGitHub 75d8a2dd2b chore: update changelog
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2024-01-23 21:59:14 +05:30
Harsh Shandilya 2c0c97d6cc chore: refresh feature graphic 2024-01-23 20:22:58 +05:30
renovate[bot]andGitHub 61307bdf03 fix(deps): update dependency com.diffplug.spotless:spotless-plugin-gradle to v6.25.0 2024-01-23 11:09:56 +00:00
renovate[bot]andGitHub 2ec8fb03aa fix(deps): update dependency com.github.requery:sqlite-android to v3.45.0 2024-01-22 14:30:21 +00:00
renovate[bot]andGitHub f8611efdc7 fix(deps): update dependency com.google.truth:truth to v1.3.0 2024-01-19 22:13:10 +00:00
Harsh Shandilya ae06a768fe maestro: add settings page to feature graphic 2024-01-19 17:49:44 +05:30
Harsh Shandilya feed18c33e scripts: fix feature graphic flow 2024-01-19 17:27:31 +05:30
Harsh Shandilya 8340228637 scripts: reformat 2024-01-19 17:27:31 +05:30
Harsh Shandilya c5117e8669 refactor(android): the redesigns will continue until the morale improves 2024-01-19 17:17:44 +05:30
Harsh Shandilya 9fb8e17cf6 refactor: remove unused versions plugin
We fully rely on Renovate for this
2024-01-19 16:40:58 +05:30
renovate[bot]andGitHub d5a1413799 chore(deps): update plugin ksp to v1.9.22-1.0.17 2024-01-19 00:50:37 +00:00
renovate[bot]andGitHub a7f6658b85 chore(deps): update actions/upload-artifact action to v4.2.0 2024-01-18 21:52:56 +00:00
Harsh Shandilya 1885859d2f refactor(android): further simplify settings page navigation 2024-01-18 21:45:33 +05:30
renovate[bot]andGitHub 988cf117c2 chore(deps): update actions/dependency-review-action action to v4 2024-01-18 14:32:05 +00:00
Harsh Shandilya d4a6009b92 feat(android): add libraries attribution page 2024-01-18 04:07:30 +05:30
renovate[bot]andHarsh Shandilya a187752659 chore(deps): update dependency com.facebook:ktfmt to v0.47
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2024-01-18 01:55:45 +05:30
Harsh Shandilya 050007ff1b fix(build): configure plugin repositories for build-logic 2024-01-18 01:52:26 +05:30
renovate[bot]andGitHub 1441804e70 chore(deps): update github/codeql-action action to v3.23.1 2024-01-17 17:49:10 +00:00
Harsh ShandilyaandGitHub 990c293ac2 fix(android): make widget items more 'boxy' 2024-01-17 19:49:10 +05:30
Harsh Shandilya de1bda0034 fix(android): improve widget layout 2024-01-17 17:32:12 +05:30
renovate[bot]andGitHub 949df2c71f fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.2.0 2024-01-16 16:34:59 +00:00
renovate[bot]andGitHub 012376d2aa fix(deps): update dependency com.diffplug.spotless:spotless-plugin-gradle to v6.24.0 2024-01-15 04:07:47 +00:00
Harsh Shandilya 88224b765a Merge remote-tracking branches 'origin/renovate/actions-upload-artifact-4.x' and 'origin/renovate/org.gradle.toolchains.foojay-resolver-convention-0.x'
* origin/renovate/actions-upload-artifact-4.x:
  chore(deps): update actions/upload-artifact action to v4.1.0

* origin/renovate/org.gradle.toolchains.foojay-resolver-convention-0.x:
  chore(deps): update plugin org.gradle.toolchains.foojay-resolver-convention to v0.8.0
2024-01-13 00:08:13 +05:30
renovate[bot]andGitHub 3cfa48835c chore(deps): update plugin org.gradle.toolchains.foojay-resolver-convention to v0.8.0 2024-01-12 17:33:24 +00:00
renovate[bot]andGitHub 54a6c9767c chore(deps): update actions/upload-artifact action to v4.1.0 2024-01-12 17:33:21 +00:00
renovate[bot]andGitHub 05c7a32532 fix(deps): update sentry to v7.2.0 2024-01-12 14:27:17 +00:00
Harsh Shandilya c5a3562608 refactor(android): rework sorting mechanism and saved posts month header 2024-01-11 01:54:39 +05:30
Harsh Shandilya a23037ce70 fix(build): add missing plugin 2024-01-11 01:54:07 +05:30
Harsh Shandilya f4469c8393 Merge remote-tracking branches 'origin/renovate/agp', 'origin/renovate/androidx' and 'origin/renovate/major-konvert'
* origin/renovate/agp:
  chore(deps): update agp to v8.3.0-beta02

* origin/renovate/androidx:
  fix(deps): update androidx to v2.7.0

* origin/renovate/major-konvert:
  fix(deps): update konvert to v3
2024-01-11 00:50:55 +05:30
renovate[bot]andGitHub d27474e910 fix(deps): update konvert to v3 2024-01-10 18:58:04 +00:00
renovate[bot]andGitHub 7399dc9939 fix(deps): update androidx to v2.7.0 2024-01-10 18:54:17 +00:00
renovate[bot]andGitHub 352f028659 chore(deps): update agp to v8.3.0-beta02 2024-01-10 18:54:14 +00:00
Harsh Shandilya 966749d172 fix(deps): update androidx.compose.compiler to 1.5.8 2024-01-11 00:23:43 +05:30
Harsh Shandilya 653dbf736e fix(ci): allow canceling existing jobs 2024-01-10 17:51:25 +05:30
Harsh Shandilya 80be2aac8d fix(web): prevent access to content:// URIs 2024-01-10 17:50:30 +05:30
Harsh Shandilya 6c3d21a5f4 fix(android): prevent StrandHogg 2.0 task hijacking vulnerability 2024-01-10 17:50:30 +05:30
renovate[bot]andGitHub c8f5ec5120 chore(deps): update mobsf/mobsfscan digest to e29e85c 2024-01-10 01:50:17 +00:00
renovate[bot]andGitHub e171154a79 chore(deps): update github/codeql-action action to v3.23.0 2024-01-08 13:49:19 +00:00
Harsh Shandilya 5217eb411d fix(renovate): allow Anvil to auto-update
With a blocklist on k1.8 builds
2024-01-07 03:31:05 +05:30
Harsh Shandilya 3112dc7c95 fix(deps): update anvil to 2.4.9 2024-01-06 19:41:10 +05:30
Harsh Shandilya 3e23ef40aa fix(common): adjust for richtext 0.20.0 2024-01-06 19:22:03 +05:30
renovate[bot]andGitHub 1b1aaf1032 fix(deps): update richtext to v0.20.0 2024-01-06 05:27:45 +00:00
renovate[bot]andGitHub 39707842b1 chore(deps): update mobsf/mobsfscan digest to 511429c 2024-01-06 02:15:25 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2a0ec3d47e fix(deps): update dependency io.github.aakira:napier to v2.7.1 (#427)
[![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.github.aakira:napier](https://togithub.com/aakira/Napier) |
`2.7.0` -> `2.7.1` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.github.aakira:napier/2.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.github.aakira:napier/2.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.github.aakira:napier/2.7.0/2.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.github.aakira:napier/2.7.0/2.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>aakira/Napier (io.github.aakira:napier)</summary>

### [`v2.7.1`](https://togithub.com/AAkira/Napier/releases/tag/2.7.1)

[Compare
Source](https://togithub.com/aakira/Napier/compare/2.7.0...2.7.1)

-   Fix ios artifacts(Add Arm)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-04 20:01:54 +00:00
Harsh Shandilya 3c2022315e fix: switch to compose compiler devel build 2024-01-05 01:20:28 +05:30
renovate[bot]andGitHub 9a63ff2809 chore(deps): update kotlin and compose 2024-01-04 19:19:32 +00:00
renovate[bot]andGitHub ee3b0edcf5 chore(deps): update actions/dependency-review-action digest to cc4f653 2024-01-04 17:36:16 +00:00
Harsh Shandilya 940ff167bf refactor(android): extract shared activity logic to BaseActivity 2024-01-01 17:10:20 +05:30
Harsh Shandilya 9a300aaf21 fix(android): pass in ViewModel from activity 2023-12-31 21:21:44 +05:30
Harsh Shandilya 4924e3eebe Revert "fix(build): temporarily disable AGP updates"
This reverts commit 37869e52b6.
2023-12-30 22:35:32 +05:30
Harsh Shandilya a49c7136cd Revert "fix(build): downgrade back to AGP 8.2.0"
Also upgrade to 8.3.0-beta01 that contains the fix for the issue.

This reverts commit 11be868d43.
2023-12-30 14:23:31 +05:30
renovate[bot]andGitHub bc433bde83 fix(deps): update dependency io.github.aakira:napier to v2.7.0 2023-12-30 03:59:59 +00:00
renovate[bot]andGitHub bc19205e0a fix(deps): update dependency org.jsoup:jsoup to v1.17.2 2023-12-29 04:52:22 +00:00
renovate[bot]andGitHub 10f802c4aa fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.1.1 2023-12-28 12:10:44 +00:00
Harsh Shandilya b5b8a864cd refactor(build): simplify repository declaration and support build scans 2023-12-27 18:29:00 +05:30
Harsh Shandilya 11be868d43 fix(build): downgrade back to AGP 8.2.0
Canaries are broken right now
2023-12-27 17:03:04 +05:30
renovate[bot]andGitHub 0c63920cdf fix(deps): update dependency nl.littlerobots.version-catalog-update:nl.littlerobots.version-catalog-update.gradle.plugin to v0.8.3 2023-12-24 21:12:24 +00:00
renovate[bot]andGitHub 882c2a36b3 fix(deps): update dependency nl.littlerobots.version-catalog-update:nl.littlerobots.version-catalog-update.gradle.plugin to v0.8.2 2023-12-22 13:28:10 +00:00
renovate[bot]andGitHub 8270d5c05d chore(deps): update github/codeql-action action to v3.22.12 2023-12-22 00:49:36 +00:00
renovate[bot]andGitHub 9f6c7a3e7b chore(deps): update gradle/gradle-build-action action to v2.11.1 2023-12-20 04:30:58 +00:00
renovate[bot]andGitHub 55231eaf08 fix(deps): update dagger to v2.50 2023-12-20 00:37:44 +00:00
renovate[bot]andGitHub 1af4c237ad fix(deps): update dependency com.google.truth:truth to v1.2.0 2023-12-19 21:22:21 +00:00
renovate[bot]andGitHub b5d2636cbf chore(deps): update dependency androidx.compose.compiler:compiler to v1.5.7 2023-12-19 18:41:47 +00:00
renovate[bot]andGitHub a4d9bf87ef fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4.1.0 2023-12-19 10:49:13 +00:00
renovate[bot]andGitHub 697eb1f639 fix(deps): update sentry to v7.1.0 2023-12-18 17:03:03 +00:00
renovate[bot]andGitHub 0c9b823273 fix(deps): update dependency org.jetbrains.kotlinx:kotlinx-collections-immutable to v0.3.7 2023-12-16 10:21:28 +00:00
Harsh Shandilya 06d45d6b29 fix(build): more annoying lints 2023-12-15 00:31:24 +05:30
Harsh Shandilya 37869e52b6 fix(build): temporarily disable AGP updates 2023-12-15 00:31:24 +05:30
Harsh Shandilya 6169311561 Revert "chore(deps): update agp to v8.3.0-alpha17"
This reverts commit c91315ea01.
2023-12-15 00:21:31 +05:30
Harsh Shandilya 3e58d46c98 Revert "chore(deps): update agp to v8.3.0-alpha18"
This reverts commit c3810de709.
2023-12-15 00:21:30 +05:30
Harsh Shandilya 48601a6508 Merge remote-tracking branches 'origin/renovate/actions-upload-artifact-4.x' and 'origin/renovate/dev.chrisbanes.compose-compose-bom-2023.x'
* origin/renovate/actions-upload-artifact-4.x:
  chore(deps): update actions/upload-artifact action to v4

* origin/renovate/dev.chrisbanes.compose-compose-bom-2023.x:
  fix(deps): update dependency dev.chrisbanes.compose:compose-bom to v2023.12.00-alpha04
2023-12-15 00:14:33 +05:30
renovate[bot]andGitHub 5fc4d8495e chore(deps): update actions/upload-artifact action to v4 2023-12-14 18:44:04 +00:00
renovate[bot]andGitHub 3f45d588e3 fix(deps): update dependency dev.chrisbanes.compose:compose-bom to v2023.12.00-alpha04 2023-12-14 18:44:00 +00:00
renovate[bot]andGitHub 7bfc16ae22 chore(deps): update plugin ksp to v1.9.21-1.0.16 2023-12-14 18:35:17 +00:00
renovate[bot]andGitHub 1d31c10625 fix(deps): update dependency androidx.test.uiautomator:uiautomator to v2.3.0-beta01 2023-12-13 23:24:51 +00:00
renovate[bot]andGitHub 00af2995e0 chore(deps): update github/codeql-action action to v3 2023-12-13 18:18:18 +00:00
renovate[bot]andGitHub fd042460ee fix(deps): update androidx 2023-12-13 18:09:12 +00:00
renovate[bot]andGitHub c3810de709 chore(deps): update agp to v8.3.0-alpha18 2023-12-13 16:39:08 +00:00
renovate[bot]andGitHub b39d705ea5 chore(deps): update github/codeql-action action to v2.22.10 2023-12-12 18:24:37 +00:00
renovate[bot]andGitHub 91a13a400c chore(deps): update gradle/gradle-build-action action to v2.11.0 2023-12-12 16:39:01 +00:00
renovate[bot]andGitHub b9003f8280 chore(deps): update mobsf/mobsfscan digest to 0f50f4e 2023-12-10 04:09:00 +00:00
renovate[bot]andGitHub c91315ea01 chore(deps): update agp to v8.3.0-alpha17 2023-12-08 00:18:14 +00:00
Harsh Shandilya 03f8f7d64f Revert "fix(build): upgrade to JDK 21"
Seems to break things lolsob

This reverts commit 8e47906bbe.
2023-12-07 19:50:43 +05:30
Harsh Shandilya 3a43996939 fix(ci): use full version consistently 2023-12-07 18:22:15 +05:30
Harsh Shandilya 2b12ab1501 Merge remote-tracking branches 'origin/renovate/github-codeql-action-2.x' and 'origin/renovate/github-codeql-action-digest'
* origin/renovate/github-codeql-action-2.x:
  chore(deps): update github/codeql-action action to v2.22.9

* origin/renovate/github-codeql-action-digest:
  chore(deps): update github/codeql-action digest to c0d1daa
2023-12-07 18:21:24 +05:30
renovate[bot]andGitHub 6221419af6 chore(deps): update github/codeql-action action to v2.22.9 2023-12-07 12:04:15 +00:00
renovate[bot]andGitHub 05735ef769 chore(deps): update github/codeql-action digest to c0d1daa 2023-12-07 12:04:12 +00:00
Harsh Shandilya 8e47906bbe fix(build): upgrade to JDK 21 2023-12-07 11:08:59 +05:30
Harsh Shandilya 53f0656353 chore: migrate to data object 2023-12-07 01:22:39 +05:30
renovate[bot]andGitHub 8e50cb3e77 chore(deps): update dependency androidx.compose.compiler:compiler to v1.5.6 2023-12-06 18:45:55 +00:00
renovate[bot]andGitHub 35fc839573 chore(deps): update actions/setup-python action to v5 2023-12-06 13:37:33 +00:00
Harsh Shandilya 9039a2de58 fix(android): clarify what format is valid for imports 2023-12-06 07:44:26 +05:30
renovate[bot]andGitHub 8263d1c34e fix(deps): update dependency androidx.test:core to v1.6.0-alpha04 2023-12-05 19:20:45 +00:00
Harsh Shandilya 338ad07db7 feat(android): add the ability to export posts as browser bookmarks 2023-12-05 12:43:47 +05:30
renovate[bot]andGitHub 311f7c0574 fix(deps): update dependency com.diffplug.spotless:spotless-plugin-gradle to v6.23.3 2023-12-04 09:22:40 +00:00
Harsh Shandilya ca91918707 feat(android): add a WebView for login purposes 2023-12-03 23:22:29 +05:30
Harsh Shandilya 5bcfe0a85c feat(web): init 2023-12-03 23:22:29 +05:30
Harsh Shandilya 6084e5bb30 refactor: remove all Shiori code
Their API is Terrible, Horrible, No Good, Very Bad[1][2]

1: It's _fine_ but I want more
2: https://en.wikipedia.org/wiki/Alexander_and_the_Terrible,_Horrible,_No_Good,_Very_Bad_Day
2023-12-03 21:52:38 +05:30
renovate[bot]andGitHub 1d5302f26c fix(deps): update dependency com.github.ben-manes:gradle-versions-plugin to v0.50.0 2023-12-03 13:03:51 +00:00
renovate[bot]andGitHub 1221daa780 fix(deps): update dagger to v2.49 2023-12-02 19:10:09 +00:00
renovate[bot]andGitHub b7d79fcb5f chore(deps): update sqldelight to v2.0.1 2023-12-01 20:32:59 +00:00
renovate[bot]andGitHub b466579c22 chore(deps): update androidx to v1.2.2 2023-12-01 18:56:23 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>Harsh Shandilya
ed8353664b fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v4 (#424)
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin](https://togithub.com/getsentry/sentry-android-gradle-plugin)
| `3.14.0` -> `4.0.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin/3.14.0/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin/3.14.0/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>getsentry/sentry-android-gradle-plugin
(io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin)</summary>

###
[`v4.0.0`](https://togithub.com/getsentry/sentry-android-gradle-plugin/blob/HEAD/CHANGELOG.md#400)

[Compare
Source](https://togithub.com/getsentry/sentry-android-gradle-plugin/compare/3.14.0...4.0.0)

Version 4 of the Sentry Android Gradle plugin brings a variety of
features and fixes. The most notable changes are:

- Bump Sentry Android SDK to `7.0.0`. Please, refer to the
[changelog](https://togithub.com/getsentry/sentry-java/blob/main/CHANGELOG.md#700)
of the SDK for more details
-   Rename `experimentalGuardsquareSupport` flag to `dexguardEnabled`
- Add new `excludes` option to allow excluding certain classes from
instrumentation. It's available under the
`sentry.tracingInstrumentation` extension

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2023-12-01 15:52:41 +00:00
renovate[bot]andGitHub 25609d9fd4 chore(deps): update agp to v8.3.0-alpha16 2023-12-01 00:09:16 +00:00
Harsh Shandilya cf3859b591 fix(build): remove obsolete Spotless workaround 2023-11-30 23:41:24 +05:30
Harsh Shandilya 8be80fde71 Merge remote-tracking branches 'origin/renovate/com.diffplug.spotless-spotless-plugin-gradle-6.x' and 'origin/renovate/serialization'
* origin/renovate/com.diffplug.spotless-spotless-plugin-gradle-6.x:
  fix(deps): update dependency com.diffplug.spotless:spotless-plugin-gradle to v6.23.2

* origin/renovate/serialization:
  fix(deps): update serialization to v1.6.2
2023-11-30 23:40:43 +05:30
renovate[bot]andGitHub 336de41849 fix(deps): update serialization to v1.6.2 2023-11-30 18:06:15 +00:00
renovate[bot]andGitHub 306236b6e3 fix(deps): update dependency com.diffplug.spotless:spotless-plugin-gradle to v6.23.2 2023-11-30 18:06:11 +00:00
renovate[bot]andHarsh Shandilya 416ef47fb1 fix(deps): update sentry to v7 2023-11-30 23:35:22 +05:30
renovate[bot]andGitHub c9ff083c0a fix(deps): update dependency dev.chrisbanes.compose:compose-bom to v2023.12.00-alpha03 2023-11-30 09:20:37 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
66c22aa3b8 fix(deps): update androidx (#423)
[![Mend Renovate logo
banner](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-alpha04` -> `1.6.0-alpha05` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.test:runner/1.6.0-alpha05?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.test:runner/1.6.0-alpha05?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.test:runner/1.6.0-alpha04/1.6.0-alpha05?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.test:runner/1.6.0-alpha04/1.6.0-alpha05?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [androidx.test:rules](https://developer.android.com/testing) |
`1.6.0-alpha01` -> `1.6.0-alpha02` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.test:rules/1.6.0-alpha02?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.test:rules/1.6.0-alpha02?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.test:rules/1.6.0-alpha01/1.6.0-alpha02?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.test:rules/1.6.0-alpha01/1.6.0-alpha02?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [androidx.test.ext:junit](https://developer.android.com/testing) |
`1.2.0-alpha01` -> `1.2.0-alpha02` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.test.ext:junit/1.2.0-alpha02?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-alpha02?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-alpha01/1.2.0-alpha02?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-alpha01/1.2.0-alpha02?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[androidx.test.espresso:espresso-core](https://developer.android.com/testing)
| `3.6.0-alpha01` -> `3.6.0-alpha02` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.test.espresso:espresso-core/3.6.0-alpha02?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-alpha02?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-alpha01/3.6.0-alpha02?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-alpha01/3.6.0-alpha02?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [androidx.test:core](https://developer.android.com/testing) |
`1.6.0-alpha02` -> `1.6.0-alpha03` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/androidx.test:core/1.6.0-alpha03?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/androidx.test:core/1.6.0-alpha03?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/androidx.test:core/1.6.0-alpha02/1.6.0-alpha03?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/androidx.test:core/1.6.0-alpha02/1.6.0-alpha03?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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-30 07:40:37 +00:00
Harsh Shandilya b2a942c179 chore(deps): upgrade Compose Compiler to 1.5.5-dev-k1.9.21-163bb051fe5 2023-11-30 13:07:07 +05:30
renovate[bot]andGitHub e9cbe3cdcb fix(deps): update dependency androidx.work:work-runtime to v2.9.0 2023-11-29 18:05:49 +00:00
Harsh Shandilya 0000db67c4 Merge remote-tracking branches 'origin/renovate/actions-setup-java-4.x' and 'origin/renovate/gradle-8.x'
* origin/renovate/actions-setup-java-4.x:
  chore(deps): update actions/setup-java action to v4

* origin/renovate/gradle-8.x:
  chore(deps): update dependency gradle to v8.5
2023-11-29 23:35:04 +05:30
renovate[bot]andGitHub 89827405d7 chore(deps): update actions/setup-java action to v4 2023-11-29 15:19:35 +00:00
renovate[bot]andGitHub e6914ac018 chore(deps): update dependency gradle to v8.5 2023-11-29 15:19:32 +00:00
renovate[bot]andGitHub e162120943 chore(deps): update agp to v8.3.0-alpha15 2023-11-28 18:16:26 +00:00
renovate[bot]andGitHub 333fb2aa7e chore(deps): update actions/dependency-review-action digest to 01bc870 2023-11-28 10:49:22 +00:00
Harsh Shandilya 84ee08e75c fix(build): automatically configure Compose Compiler workaround 2023-11-28 11:37:15 +05:30
renovate[bot]andHarsh Shandilya f682d12bd0 chore(deps): update kotlin and compose 2023-11-28 11:37:15 +05:30
renovate[bot]andGitHub 10adef15a8 chore(deps): update gradle/gradle-build-action action to v2.10.0 2023-11-27 07:53:33 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>Harsh Shandilya
fc769349d5 fix(deps): update dependency com.diffplug.spotless:spotless-plugin-gradle to v6.23.0 (#419)
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[com.diffplug.spotless:spotless-plugin-gradle](https://togithub.com/diffplug/spotless)
| `6.22.0` -> `6.23.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.diffplug.spotless:spotless-plugin-gradle/6.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.diffplug.spotless:spotless-plugin-gradle/6.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.diffplug.spotless:spotless-plugin-gradle/6.22.0/6.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.diffplug.spotless:spotless-plugin-gradle/6.22.0/6.23.0?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 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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2023-11-27 07:44:58 +00:00
renovate[bot]andGitHub 5152a9054b fix(deps): update dependency org.jsoup:jsoup to v1.17.1 2023-11-27 03:21:59 +00:00
Harsh Shandilya 783d830c68 fix(ci): remove redundant header from release notes 2023-11-27 02:13:59 +05:30
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
c25dfabdbf chore(deps): update dependency gradle to v8.5-rc-4 (#416)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-24 18:08:05 +05:30
renovate[bot]andGitHub c7e94db3d2 chore(deps): update github/codeql-action action to v2.22.8 2023-11-23 12:33:42 +00:00
renovate[bot]andGitHub 2f0be7a8a6 chore(deps): update github/codeql-action digest to 407ffaf 2023-11-23 12:30:29 +00:00
renovate[bot]andGitHub 22e55b142c fix(deps): update dependency dev.chrisbanes.compose:compose-bom to v2023.12.00-alpha02 2023-11-23 10:27:28 +00:00
renovate[bot]andGitHub 6dda2f5917 fix(deps): update dependency org.testcontainers:testcontainers to v1.19.3 2023-11-21 16:54:20 +00:00
renovate[bot]andGitHub 838c86d1f8 fix(deps): update sentry to v6.34.0 2023-11-20 14:15:32 +00:00
GitHub Actions a1a9e712b8 feat(release): start next development iteration 2023-11-20 07:36:16 +00:00
GitHub Actions 35469825c7 feat(release): bump version 2023-11-20 07:33:30 +00:00
Harsh Shandilya f565bc41d7 chore: refresh feature graphic 2023-11-20 12:42:48 +05:30
Harsh Shandilya 9446f09f22 chore: adjust changelog to be under 500 chars 2023-11-20 12:39:03 +05:30
Harsh Shandilya 925158b149 feat(build): remove modulegraph plugin
I don't care
2023-11-20 12:32:51 +05:30
Harsh Shandilya 6f1c1b3629 fix(maestro): update flow for new search screen 2023-11-20 12:31:18 +05:30
Harsh Shandilya cb6e71c8bf fix(build): add minify switch 2023-11-20 12:31:18 +05:30
Harsh Shandilya 17258ea4d7 feat(android): refresh baseline profiles 2023-11-20 12:31:18 +05:30
Harsh Shandilya 035d33fcea chore(android): remove obsolete workaround 2023-11-20 00:55:18 +05:30
Harsh Shandilya de46f1b159 fix(gradle): remove unnecessary jvmargs setup 2023-11-19 21:12:07 +05:30
Harsh Shandilya 4b4d133e8b fix(build): target Kotlin 1.9 2023-11-19 21:12:07 +05:30
Harsh Shandilya 5a1cdc73c5 fix(android): refresh icon asset
dzuk said the asset had export errors.
2023-11-19 19:23:15 +05:30
Harsh Shandilya c5fe4f5325 fix(ci): add job to validate changelog 2023-11-18 16:25:05 +05:30
Harsh Shandilya e2fa605db6 Merge remote-tracking branches 'origin/renovate/actions-setup-python-4.x' and 'origin/renovate/pin-dependencies'
* origin/renovate/actions-setup-python-4.x:
  chore(deps): update actions/setup-python action to v4

* origin/renovate/pin-dependencies:
  chore(deps): pin dependencies
2023-11-18 15:37:19 +05:30
renovate[bot]andGitHub 55580bc51c chore(deps): update actions/setup-python action to v4 2023-11-18 10:02:51 +00:00
renovate[bot]andGitHub fe78f97f6a chore(deps): pin dependencies 2023-11-18 10:02:48 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
9d46e6f460 chore(deps): update mobsf/mobsfscan digest to b8503e0 (#417)
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| MobSF/mobsfscan | action | digest | `a60d10a` -> `b8503e0` |

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-18 09:59:28 +00:00
Harsh Shandilya 21f9f6f476 feat(ci): add MobSF code quality job 2023-11-18 15:26:19 +05:30
Harsh Shandilya 2ba8eb9430 chore: rejig changelog
Add missing stuff and move more interesting stuff higher up
2023-11-18 15:05:03 +05:30
Harsh Shandilya 6ea194dd0e Revert "fix(android): allow configuration changes to go through"
I don't think I want the behavior this creates.

This reverts commit 4218beac9d.
2023-11-18 15:05:03 +05:30
Harsh Shandilya 1d3d4f7455 fix(android): avoid two unnecessary API calls in search 2023-11-18 15:00:06 +05:30
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
fdb79d4a6d chore(deps): update dependency gradle to v8.5-rc-3 (#415)
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [gradle](https://gradle.org)
([source](https://togithub.com/gradle/gradle)) | patch | `8.5-rc-2` ->
`8.5-rc-3` |

---

### Release Notes

<details>
<summary>gradle/gradle (gradle)</summary>

###
[`v8.5-rc-3`](https://togithub.com/gradle/gradle/compare/v8.5.0-RC2...v8.5.0-RC3)

[Compare
Source](https://togithub.com/gradle/gradle/compare/v8.5.0-RC2...v8.5.0-RC3)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-17 14:37:46 +00:00
Harsh Shandilya 89fce2010c feat(common): add PasswordField 2023-11-17 19:56:25 +05:30
Harsh Shandilya fb878824e8 fix(build): address enableAndroidTest deprecation 2023-11-17 19:56:25 +05:30
renovate[bot]andGitHub aff5af4771 chore(deps): update agp to v8.3.0-alpha14 2023-11-17 01:26:14 +00:00
Harsh Shandilya dd06c93935 fix(api): migrate to new pagination API
The older one is supposedly performing very poorly on the lobsters
side and has been modified to serve only cached content for unauthenticated
users. Unfortunately the configuration for this caching behaviour has
a bug that ignores query parameters and thus every page returns
the same set of 20 posts. Cut us over to this new API path that
hopefully does not generate too much load for the service.

See: https://github.com/lobsters/lobsters/issues/1219
2023-11-16 22:42:23 +05:30
renovate[bot]andGitHub d9e664c440 chore(deps): update github/codeql-action action to v2.22.7 2023-11-16 13:29:24 +00:00
Harsh Shandilya 0a492a169e Merge remote-tracking branch 'origin/renovate/androidx'
* origin/renovate/androidx:
  fix(deps): update androidx
2023-11-16 03:03:19 +05:30
Harsh Shandilya 6ae71adbca feat(android): add app icon to top bar
I love it too much
2023-11-16 03:02:40 +05:30
Harsh Shandilya cbaa098005 fix(deps): upgrade compose-bom 2023-11-16 02:42:01 +05:30
Harsh Shandilya 741e82a425 fix(build): remove use of custom R8 build
In AGP we trust...?
2023-11-16 01:04:25 +05:30
renovate[bot]andGitHub c694b57e08 fix(deps): update androidx 2023-11-15 19:17:32 +00:00
renovate[bot]andGitHub 2c7bc2d668 fix(deps): update serialization to v1.6.1 2023-11-15 16:37:19 +00:00
renovate[bot]andGitHub 765f83a2ae fix(deps): update dependency org.testcontainers:testcontainers to v1.19.2 2023-11-15 04:12:08 +00:00
Harsh Shandilya 58f6607404 feat(android): add new icon by dzuk 2023-11-15 09:34:06 +05:30
Harsh Shandilya 9b27783886 fix(build): recognise vector as an XML tag 2023-11-15 09:10:57 +05:30
renovate[bot]andGitHub c6de087615 chore(deps): update dependency gradle to v8.5-rc-2 2023-11-14 16:25:51 +00:00
renovate[bot]andGitHub 86f7b54b87 chore(deps): update github/codeql-action action to v2.22.6 2023-11-14 13:24:37 +00:00
renovate[bot]andGitHub defe305ad7 chore(deps): update actions/dependency-review-action digest to 7bbfa03 2023-11-13 20:32:44 +00:00
Harsh Shandilya cc210a3597 chore(common): rename ext.kt -> Color.ext.kt 2023-11-11 23:40:11 +05:30
renovate[bot]andGitHub f7c7bb293b chore(deps): update agp to v8.3.0-alpha13 2023-11-09 22:57:33 +00:00
Harsh Shandilya ab1db27dc7 feat(common): request focus when search screen is opened 2023-11-08 18:06:57 +05:30
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
71a86fa9aa chore(deps): update actions/dependency-review-action digest to fde92ac (#411)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[actions/dependency-review-action](https://togithub.com/actions/dependency-review-action)
| action | digest | `9f45b24` -> `fde92ac` |

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzNy40Ni4wIiwidXBkYXRlZEluVmVyIjoiMzcuNDYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-08 11:49:31 +00:00
Harsh Shandilya fcc20d2f1e refactor(build): use a hack to expose catalog type-safe API 2023-11-08 17:04:35 +05:30
Harsh Shandilya 8922142ade Revert "feat(common): add swipe action for saving posts"
The post update flow is not synced enough for this to work.

This reverts commit 7a648a77b0.
2023-11-08 01:34:13 +05:30
Harsh Shandilya eb28fe0120 chore(build): upgrade to Gradle 8.5 RC1 2023-11-08 00:55:58 +05:30
renovate[bot]andGitHub d73a755cf2 fix(deps): update sentry to v6.33.1 2023-11-07 11:51:22 +00:00
Harsh Shandilya 7a648a77b0 feat(common): add swipe action for saving posts 2023-11-07 13:09:15 +05:30
Harsh Shandilya c721b8b1da fix(android): adjust default theme 2023-11-07 12:51:40 +05:30
Harsh Shandilya ce62671276 fix(common): use multipreview for SearchBar 2023-11-06 17:36:51 +05:30
Harsh Shandilya ba4cd1b0c6 fix(android): simplify SearchList component 2023-11-06 17:32:37 +05:30
renovate[bot]andGitHub a18ee3d6e5 chore(deps): update actions/dependency-review-action digest to 9f45b24 2023-11-06 08:39:10 +00:00
renovate[bot]andGitHub 15fa833d8e fix(deps): update junit5 monorepo to v5.10.1 2023-11-05 18:06:10 +00:00
Harsh Shandilya 06edbeb903 feat(android): fully flesh out search screen 2023-11-04 21:55:20 +05:30
Harsh Shandilya 082dc9cc82 refactor(android): LobstersApp -> LobstersPostsScreen 2023-11-04 20:52:37 +05:30
Harsh Shandilya 0b3286cd1e feat(android): revert search screen to old design
The Material3 SearchBar component is just not for me
2023-11-04 20:50:37 +05:30
Harsh Shandilya f17fb4487e fix(database): specify SQLite dialect
We use a new-enough version of SQLite for this
2023-11-04 20:16:20 +05:30
Harsh Shandilya 339162d595 refactor(android): ListItem -> LobstersListItem 2023-11-04 19:50:14 +05:30
Harsh Shandilya da6fefb1b0 fix(build): disable CC for Spotless 2023-11-04 19:45:29 +05:30
Harsh Shandilya 8d3ed24d65 fix(api): switch Retrofit URL to Named 2023-11-04 19:40:21 +05:30
Harsh Shandilya ba219af1ac fix(api): directly use HTTP annotation 2023-11-04 19:38:49 +05:30
Harsh Shandilya 4218beac9d fix(android): allow configuration changes to go through 2023-11-04 13:59:39 +05:30
renovate[bot]andGitHub d5d71c1c82 fix(deps): update dependency com.slack.eithernet:eithernet to v1.8.0 2023-11-03 21:44:50 +00:00
Harsh Shandilya 348b3a7c65 feat(android): move backup/restore and search to a dropdown menu 2023-11-04 02:43:03 +05:30
Harsh Shandilya f636b56ee3 feat(android): introduce a separate SearchActivity 2023-11-04 02:42:21 +05:30
Harsh Shandilya ed81ceaa94 chore: reformat manifest file 2023-11-04 02:29:56 +05:30
renovate[bot]andGitHub 7a78c77b6a fix(deps): update dependency eu.bambooapps:compose-material3-pullrefresh to v1.0.1 2023-11-03 13:11:18 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
337cd259a6 chore(deps): update agp to v8.3.0-alpha12 (#409)
[![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.3.0-alpha11` -> `8.3.0-alpha12` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.test/8.3.0-alpha12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.android.test/8.3.0-alpha12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.android.test/8.3.0-alpha11/8.3.0-alpha12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.test/8.3.0-alpha11/8.3.0-alpha12?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.3.0-alpha11` -> `8.3.0-alpha12` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/com.android.tools.build:gradle/8.3.0-alpha12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/com.android.tools.build:gradle/8.3.0-alpha12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/com.android.tools.build:gradle/8.3.0-alpha11/8.3.0-alpha12?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/com.android.tools.build:gradle/8.3.0-alpha11/8.3.0-alpha12?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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMS41IiwidXBkYXRlZEluVmVyIjoiMzcuMzEuNSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-03 03:26:46 +00:00
renovate[bot]andGitHub e7781517aa fix(deps): update dependency com.slack.eithernet:eithernet to v1.7.0 2023-11-02 17:32:43 +00:00
renovate[bot]andGitHub ce3411e956 fix(deps): update sentry to v6.33.0 2023-11-02 12:32:40 +00:00
renovate[bot]andGitHub a58ca2c419 fix(deps): update androidx 2023-11-01 19:16:37 +00:00
Harsh Shandilya 608d855cae fix(android): make TopAppBar color match BottomNavigation 2023-11-01 22:19:46 +05:30
Harsh Shandilya eb529be286 fix(deps): upgrade Compose Compiler and KSP 2023-11-01 00:49:17 +05:30
renovate[bot]andGitHub 68dbe97442 chore(deps): update kotlin and compose to v1.9.20 2023-10-31 19:17:22 +00:00
Harsh Shandilya 5374410c67 fix(renovate): include KSP in Kotlin group 2023-11-01 00:46:59 +05:30
Harsh Shandilya cbb697216c fix(build): make google repo non-exclusive
This allows the Compose Compiler artifact to be retried against
the secondary snapshots repository as well, since we sometimes
use builds from there.
2023-11-01 00:45:33 +05:30
Harsh Shandilya 25a11bde59 refactor(api): use ApiResult in Shiori and wire into DI 2023-10-31 12:14:00 +05:30
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
62bffc33fd fix(deps): update konvert to v2.4.0 (#408)
[![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) | `2.3.1`
-> `2.4.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.mcarle:konvert/2.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.mcarle:konvert/2.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.mcarle:konvert/2.3.1/2.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.mcarle:konvert/2.3.1/2.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [io.mcarle:konvert-api](https://togithub.com/mcarleio/konvert) |
`2.3.1` -> `2.4.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.mcarle:konvert-api/2.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.mcarle:konvert-api/2.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.mcarle:konvert-api/2.3.1/2.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.mcarle:konvert-api/2.3.1/2.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>mcarleio/konvert (io.mcarle:konvert)</summary>

###
[`v2.4.0`](https://togithub.com/mcarleio/konvert/blob/HEAD/CHANGELOG.md#240)

##### New features

- allow functions with multiple parameters in `@Konverter` annotated
interfaces if one is defined as source with `@Konverter.Source`
[#&#8203;28](https://togithub.com/mcarleio/konvert/issues/28)
    ```kotlin
    @&#8203;Konverter
    interface Mapper {
fun toDto(@&#8203;Konverter.Source source: Source, otherProperty: Int):
Target
    }
    data class Source(val property: String)
    data class Target(val property: String, val otherProperty: Int)
    ```

##### Bug fixes:

- ignore private and extension functions in `@Konverter` annotated
interfaces [#&#8203;30](https://togithub.com/mcarleio/konvert/issues/30)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMS41IiwidXBkYXRlZEluVmVyIjoiMzcuMzEuNSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-31 05:58:53 +00:00
Harsh Shandilya 45f384d048 fix(api): boot up a fresh container for each test 2023-10-31 10:56:17 +05:30
Harsh Shandilya b9d92ecefa Revert "Revert "fix(api): title and url are required for bookmark edits""
This reverts commit 2273768556.
2023-10-31 10:45:24 +05:30
renovate[bot]andGitHub 01fd8bee0c fix(deps): update coil to v2.5.0 2023-10-30 23:08:29 +00:00
Harsh Shandilya 9048d253e6 chore: update changelog 2023-10-28 14:30:33 +05:30
renovate[bot]andGitHub 16b660ad0e fix(deps): update dependency com.slack.lint:slack-lint-checks to v0.7.0 2023-10-27 21:15:39 +00:00
Harsh Shandilya 2273768556 Revert "fix(api): title and url are required for bookmark edits"
Seems to still fail in CI????????????????

This reverts commit cce12fb138.
2023-10-28 00:34:07 +05:30
Harsh Shandilya ab01554b82 fix(ci): expand test report glob to cover all modules 2023-10-28 00:13:16 +05:30
Harsh Shandilya cce12fb138 fix(api): title and url are required for bookmark edits 2023-10-27 22:34:07 +05:30
Harsh Shandilya 6f4c1a0fbd fix(build): disable slack-lint DeprecatedCall 2023-10-27 22:34:07 +05:30
Harsh Shandilya 3663ca1ec1 feat(api): add integration tests for Shiori API 2023-10-27 22:34:07 +05:30
Harsh Shandilya f39bf0b043 feat(api/model): initial Shiori API 2023-10-27 22:34:07 +05:30
renovate[bot]andGitHub f55d89b17e chore(deps): update github/codeql-action action to v2.22.5 2023-10-27 10:10:26 +00:00
renovate[bot]andGitHub f6185a3dc5 chore(deps): update agp to v8.3.0-alpha11 2023-10-26 21:44:48 +00:00
renovate[bot]andGitHub be7bd38341 fix(deps): update dependency org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin to v3 2023-10-25 19:03:15 +00:00
Harsh Shandilya b3277e2367 chore: refresh module graph 2023-10-25 02:44:46 +05:30
renovate[bot]andGitHub f560bb6fbf chore(deps): update agp to v8.3.0-alpha10 2023-10-24 17:57:12 +00:00
renovate[bot]andGitHub 013138afb8 chore(deps): update github/codeql-action action to v2.22.4 2023-10-20 19:46:38 +00:00
renovate[bot]andGitHub d6d639d059 fix(deps): update dependency org.jsoup:jsoup to v1.16.2 2023-10-20 07:12:22 +00:00
renovate[bot]andGitHub 31b2d66b9b chore(deps): update dependency com.android.test to v8.3.0-alpha09 2023-10-20 01:10:06 +00:00
renovate[bot]andGitHub 4b278d68e6 chore(deps): update agp to v8.3.0-alpha08 2023-10-19 19:04:37 +00:00
renovate[bot]andGitHub e81687bf53 fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v3.14.0 2023-10-18 22:19:40 +00:00
Harsh Shandilya a0ea6d6e1c fix(build): disable GradleDependency lint
I have better ways to deal with this
2023-10-19 01:39:10 +05:30
Harsh Shandilya 17eb9a4c45 chore: refresh lint baselines 2023-10-19 01:38:13 +05:30
Harsh Shandilya 2e8ad58979 Revert "Revert "fix(renovate): disable compose-bom updates""
Still broken :(

This reverts commit 680d43f78c.
2023-10-19 01:31:42 +05:30
Harsh Shandilya 680d43f78c Revert "fix(renovate): disable compose-bom updates"
Let's try this again, shall we?

This reverts commit f844062980.
2023-10-19 01:18:42 +05:30
renovate[bot]andGitHub 0d1fb26b52 fix(deps): update sentry to v6.32.0 2023-10-18 19:37:29 +00:00
renovate[bot]andGitHub 7540430e1d fix(deps): update androidx 2023-10-18 17:45:06 +00:00
renovate[bot]andGitHub 095ec1ed04 chore(deps): update actions/checkout action to v4.1.1 2023-10-17 17:38:42 +00:00
renovate[bot]andGitHub ce62a7b1fc fix(deps): update dependency com.squareup.okhttp3:okhttp-bom to v4.12.0 2023-10-17 04:13:01 +00:00
renovate[bot]andGitHub 4b89775f8a fix(deps): update konvert to v2.3.1 2023-10-15 09:16:58 +00:00
Harsh Shandilya a5af23e330 refactor(android): make ClawViewModel#isPostSaved synchronous
Fixes #403
2023-10-15 01:44:11 +05:30
Harsh Shandilya 46cc0910bf feat(database): enable query logging 2023-10-15 01:44:11 +05:30
renovate[bot]andGitHub 37e0fdb0a7 chore(deps): update github/codeql-action action to v2.22.3 2023-10-13 14:23:08 +00:00
Harsh Shandilya a3e7e76931 fix(deps): update gradle-versions-plugin to 0.49.0 2023-10-13 01:35:32 +05:30
renovate[bot]andGitHub cfdab8ddcd fix(deps): update sentry to v6.31.0 2023-10-12 19:47:10 +00:00
renovate[bot]andGitHub 389924a544 chore(deps): update github/codeql-action action to v2.22.2 2023-10-12 14:10:43 +00:00
renovate[bot]andGitHub b3634a0762 fix(deps): update dependency com.slack.lint:slack-lint-checks to v0.6.1 2023-10-09 21:38:21 +00:00
renovate[bot]andGitHub 985bc1361a chore(deps): update github/codeql-action action to v2.22.1 2023-10-09 12:49:26 +00:00
Harsh Shandilya d3d3a6af09 refactor(android): simplify system bars color setup 2023-10-09 01:32:45 +05:30
renovate[bot]andGitHub 3883160234 chore(deps): update androidx to v1.2.0-rc02 2023-10-06 18:35:29 +00:00
renovate[bot]andGitHub d04ad16aee chore(deps): update github/codeql-action action to v2.22.0 2023-10-06 11:02:51 +00:00
GitHub Actions 0067418ffb feat(release): start next development iteration 2023-10-06 08:51:44 +00:00
GitHub Actions deb900f8f8 feat(release): bump version 2023-10-06 08:47:17 +00:00
Harsh Shandilya e6f6ed75f1 chore: update changelog 2023-10-06 14:03:59 +05:30
Harsh Shandilya 6226c3b0c8 fix(common): prevent crashing when parsing comment trees
Fixes COMPOSE-LOBSTERS-1Z
2023-10-06 13:51:18 +05:30
Harsh Shandilya 1a525d6e5d fix(android): avoid violating sorting contract
Fixes COMPOSE-LOBSTERS-1J
2023-10-06 13:47:58 +05:30
Harsh Shandilya bc213fe3c9 chore: make rgignore common 2023-10-06 12:21:10 +05:30
Harsh Shandilya 731666936c fix(android): prevent crashes when <50 saved posts exist
Fixes COMPOSE-LOBSTERS-25
2023-10-06 12:21:10 +05:30
renovate[bot]andGitHub 67ec7e92b5 fix(deps): update dependency org.jetbrains.kotlinx:kotlinx-collections-immutable to v0.3.6 2023-10-06 01:24:19 +00:00
renovate[bot]andGitHub 40bfcb07b6 chore(deps): update agp to v8.3.0-alpha07 2023-10-05 22:19:05 +00:00
renovate[bot]andGitHub e5f09a7aef chore(deps): update dependency gradle to v8.4 2023-10-04 23:27:29 +00:00
renovate[bot]andGitHub 341bdb0eda fix(deps): update androidx 2023-10-04 17:56:34 +00:00
Harsh ShandilyaandGitHub 27d68f2774 fix(deps): update compose-bom to v2023.11.00-alpha01
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-10-04 23:26:16 +05:30
GitHub Actions d259cd8eb5 feat(release): start next development iteration 2023-10-04 13:34:35 +00:00
GitHub Actions c9e5ded43a feat(release): bump version 2023-10-04 13:30:30 +00:00
renovate[bot]andGitHub a8e03e22bf fix(deps): update dagger to v2.48.1 2023-10-03 22:31:04 +00:00
Harsh Shandilya 7094016e7e chore: update changelog 2023-10-03 23:37:32 +05:30
Harsh Shandilya 1bfa1f3981 Revert "Revert "fix(deps): use Swipe snapshots""
Maybe fixed by new Compose BOM?

This reverts commit 3cf6b22d95.
2023-10-03 22:43:34 +05:30
Harsh Shandilya 655745e049 fix(deps): upgrade to Compose Compiler 1.5.3 2023-10-03 22:43:34 +05:30
Harsh Shandilya f83a22b310 fix(deps): update compose-bom to 2023.10.00-alpha02 2023-10-03 22:43:34 +05:30
Harsh Shandilya 025c24a9d9 feat(android): switch to M3-compatible pull to refresh 2023-10-03 22:43:34 +05:30
renovate[bot]andGitHub c8c3e83e7b chore(deps): update gradle/gradle-build-action digest to 842c587 2023-10-01 01:43:33 +00:00
renovate[bot]andGitHub 7d8327af18 chore(deps): update gradle/gradle-build-action action to v2.9.0 2023-09-29 22:36:21 +00:00
Harsh Shandilya 58bab2f538 refactor(android): DRY 2023-09-30 02:45:43 +05:30
Harsh Shandilya cf93eda6c1 chore: update changelog 2023-09-30 02:43:56 +05:30
Harsh Shandilya a3b7af0f79 feat(android): add separate touch actions for widget title and comment count 2023-09-30 02:43:56 +05:30
Harsh Shandilya 91bf5e5555 fix(android): sort saved posts in view model 2023-09-30 02:03:20 +05:30
Harsh Shandilya 61a72b330d fix(android): rollback widget size to 5x2 2023-09-30 02:03:20 +05:30
Harsh Shandilya 6a1164363c feat(android): fix saved posts widget layout 2023-09-30 02:03:20 +05:30
Harsh Shandilya df9a82482c fix(android): dispatch widget update when toggling save state 2023-09-30 01:51:57 +05:30
Harsh Shandilya 778d98c7f2 fix(android): limit widget to 50 posts 2023-09-30 01:51:57 +05:30
Harsh Shandilya cae759a09e Merge remote-tracking branches 'origin/renovate/sentry' and 'origin/renovate/org.gradle.android.cache-fix-org.gradle.android.cache-fix.gradle.plugin-2.x'
* origin/renovate/sentry:
  fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v3.13.0

* origin/renovate/org.gradle.android.cache-fix-org.gradle.android.cache-fix.gradle.plugin-2.x:
  fix(deps): update dependency org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin to v2.8.1
2023-09-29 23:19:35 +05:30
renovate[bot]andGitHub 52126b2248 fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v3.13.0 2023-09-29 17:13:29 +00:00
renovate[bot]andGitHub 5782521824 fix(deps): update dependency org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin to v2.8.1 2023-09-29 17:13:26 +00:00
Harsh Shandilya 3522dc529d fix(build): prevent invalid lints failing build 2023-09-29 12:06:52 +05:30
Harsh Shandilya 8602e68b60 Merge remote-tracking branches 'origin/renovate/agp' and 'origin/renovate/com.diffplug.spotless-spotless-plugin-gradle-6.x'
* origin/renovate/agp:
  chore(deps): update dependency com.android.test to v8.3.0-alpha06

* origin/renovate/com.diffplug.spotless-spotless-plugin-gradle-6.x:
  fix(deps): update dependency com.diffplug.spotless:spotless-plugin-gradle to v6.22.0
2023-09-29 11:54:16 +05:30
renovate[bot]andGitHub fb4514d70e fix(deps): update dependency com.diffplug.spotless:spotless-plugin-gradle to v6.22.0 2023-09-29 00:41:48 +00:00
renovate[bot]andGitHub 35d86bff11 chore(deps): update dependency com.android.test to v8.3.0-alpha06 2023-09-28 21:25:13 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
193730e16c fix(deps): update sentry to v6.30.0 (#400)
[![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.sentry:sentry-android-okhttp](https://togithub.com/getsentry/sentry-java)
| `6.29.0` -> `6.30.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.sentry:sentry-android-okhttp/6.30.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.sentry:sentry-android-okhttp/6.30.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.sentry:sentry-android-okhttp/6.29.0/6.30.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.sentry:sentry-android-okhttp/6.29.0/6.30.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [io.sentry:sentry-bom](https://togithub.com/getsentry/sentry-java) |
`6.29.0` -> `6.30.0` |
[![age](https://developer.mend.io/api/mc/badges/age/maven/io.sentry:sentry-bom/6.30.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/io.sentry:sentry-bom/6.30.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/io.sentry:sentry-bom/6.29.0/6.30.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/io.sentry:sentry-bom/6.29.0/6.30.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>getsentry/sentry-java
(io.sentry:sentry-android-okhttp)</summary>

###
[`v6.30.0`](https://togithub.com/getsentry/sentry-java/blob/HEAD/CHANGELOG.md#6300)

[Compare
Source](https://togithub.com/getsentry/sentry-java/compare/6.29.0...6.30.0)

##### Features

- Add `sendModules` option for disable sending modules
([#&#8203;2926](https://togithub.com/getsentry/sentry-java/pull/2926))
- Send `db.system` and `db.name` in span data for androidx.sqlite spans
([#&#8203;2928](https://togithub.com/getsentry/sentry-java/pull/2928))
- Check-ins (CRONS) support
([#&#8203;2952](https://togithub.com/getsentry/sentry-java/pull/2952))
- Add API for sending check-ins (CRONS) manually
([#&#8203;2935](https://togithub.com/getsentry/sentry-java/pull/2935))
- Support check-ins (CRONS) for Quartz
([#&#8203;2940](https://togithub.com/getsentry/sentry-java/pull/2940))
- `@SentryCheckIn` annotation and advice config for Spring
([#&#8203;2946](https://togithub.com/getsentry/sentry-java/pull/2946))
- Add option for ignoring certain monitor slugs
([#&#8203;2943](https://togithub.com/getsentry/sentry-java/pull/2943))

##### Fixes

- Always send memory stats for transactions
([#&#8203;2936](https://togithub.com/getsentry/sentry-java/pull/2936))
- This makes it possible to query transactions by the `device.class` tag
on Sentry
- Add `sentry.enable-aot-compatibility` property to SpringBoot Jakarta
`SentryAutoConfiguration` to enable building for GraalVM
([#&#8203;2915](https://togithub.com/getsentry/sentry-java/pull/2915))

##### Dependencies

- Bump Gradle from v8.2.1 to v8.3.0
([#&#8203;2900](https://togithub.com/getsentry/sentry-java/pull/2900))
- \[changelog]\(https://github.com/gradle/gradle/blob/master
release-test/CHANGELOG.md#v830)
- [diff](https://togithub.com/gradle/gradle/compare/v8.2.1...v8.3.0)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDcuMiIsInVwZGF0ZWRJblZlciI6IjM2LjEwNy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-28 09:50:08 +00:00
Harsh Shandilya ed32186984 refactor(build): adopt Slack lints 2023-09-28 15:14:36 +05:30
renovate[bot]andGitHub eb449740eb chore(deps): update github/codeql-action action to v2.21.9 2023-09-27 16:36:31 +00:00
renovate[bot]andGitHub 327fd43dd6 fix(deps): update dependency com.slack.eithernet:eithernet to v1.6.0 2023-09-27 00:12:38 +00:00
renovate[bot]andGitHub bc2345f415 chore(deps): update plugin licensee to v1.8.0 2023-09-26 21:30:38 +00:00
Harsh Shandilya fd1bdc79f8 feat(README): use theme-context for feature graphics 2023-09-26 17:17:45 +05:30
Harsh Shandilya 22a2419185 feat(scripts): generate dark and light feature graphics 2023-09-26 17:16:46 +05:30
Harsh Shandilya de921bf786 chore(scripts): run shfmt 2023-09-26 17:12:02 +05:30
Harsh Shandilya 3cf6b22d95 Revert "fix(deps): use Swipe snapshots"
Somehow breaks R8, don't really care to figure it out.

This reverts commit d77db45f37.
2023-09-26 16:51:54 +05:30
Harsh Shandilya 82ce45b8e4 refactor(database): move SavedPostSerializer to core 2023-09-26 16:37:28 +05:30
Harsh Shandilya dfe95a646e chore: add database refactor to blame ignore revs 2023-09-26 16:36:42 +05:30
Harsh Shandilya 7b0b206905 refactor(database): split out JVM and Android parts 2023-09-26 16:35:50 +05:30
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1b1984064c chore(deps): update gradle/gradle-build-action action to v2.8.1 (#399)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[gradle/gradle-build-action](https://togithub.com/gradle/gradle-build-action)
| action | patch | `v2.8.0` -> `v2.8.1` |

---

### Release Notes

<details>
<summary>gradle/gradle-build-action
(gradle/gradle-build-action)</summary>

###
[`v2.8.1`](https://togithub.com/gradle/gradle-build-action/compare/v2.8.0...v2.8.1)

[Compare
Source](https://togithub.com/gradle/gradle-build-action/compare/v2.8.0...v2.8.1)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNi45Ny4xIiwidXBkYXRlZEluVmVyIjoiMzYuOTcuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-25 19:09:16 +00:00
renovate[bot]andGitHub 7e03e2571f chore(deps): update dependency dev.msfjarvis.whetstone to v0.8.0 2023-09-23 19:28:34 +00:00
renovate[bot]andGitHub 23f0b32634 chore(deps): update actions/checkout action to v4.1.0 2023-09-23 05:22:37 +00:00
Harsh Shandilya f844062980 fix(renovate): disable compose-bom updates
The current alphas have a regression causing crashes when
expanding/collapsing comments.
2023-09-23 10:49:10 +05:30
Harsh Shandilya 84f982b20e Revert "fix(deps): update dependency dev.chrisbanes.compose:compose-bom to v2023.10.00-alpha02"
Temporary test to see if it fixes the crashes I've seen

This reverts commit 45c7dbb3f7.
2023-09-23 10:33:47 +05:30
Harsh Shandilya c6739487a4 fix(android): update widget with a more usable UI 2023-09-23 01:19:18 +05:30
Harsh Shandilya be0f46371e fix(android): update widget when saved post update worker runs 2023-09-23 01:19:18 +05:30
Harsh Shandilya 85351d5b1c fix(android): increase widget size to 5x3 2023-09-23 01:15:41 +05:30
Harsh Shandilya 23366e4536 feat(android): navigate to a specific comments page via intent 2023-09-23 01:15:02 +05:30
Harsh Shandilya 0d1f69d36e refactor(android): expose 'plain' SavedPosts list in VM 2023-09-23 01:14:06 +05:30
Harsh Shandilya d77db45f37 fix(deps): use Swipe snapshots
Fixes COMPOSE-LOBSTERS-1N
2023-09-22 10:11:43 +05:30
renovate[bot]andGitHub 20c5b6c4a5 chore(deps): update agp to v8.3.0-alpha05 2023-09-21 22:30:07 +00:00
Harsh Shandilya 62f512e319 feat(android): basic widget implementation
This needs a Glance version of LobstersCard to function
2023-09-22 00:58:49 +05:30
Harsh Shandilya e740ddb7cc fix(build): recognize appwidget-provider as a valid XML tag 2023-09-22 00:58:07 +05:30
Harsh Shandilya 68924d6f35 chore(gradle): add androix.glance dependencies 2023-09-22 00:58:01 +05:30
Harsh Shandilya 94db512518 fix(deps): upgrade to Whetstone 0.8.0-SNAPSHOT
For BroadcastReceiver injection support
2023-09-22 00:58:01 +05:30
Harsh Shandilya f39e9889f3 feat(android): delete unused DataStore code 2023-09-21 16:11:45 +05:30
Harsh Shandilya b0ffbcd07d refactor(build): fix debug builds and groups to collection tasks 2023-09-21 13:57:12 +05:30
Harsh Shandilya 19412cc963 fix(renovate): also group Compose BOM updates with AndroidX 2023-09-21 00:45:31 +05:30
renovate[bot]andGitHub 45c7dbb3f7 fix(deps): update dependency dev.chrisbanes.compose:compose-bom to v2023.10.00-alpha02 2023-09-20 18:50:55 +00:00
renovate[bot]andGitHub 3b0d0e55dc fix(deps): update androidx 2023-09-20 18:20:45 +00:00
renovate[bot]andGitHub ae21ebe80d chore(deps): update actions/setup-java action to v3.13.0 2023-09-20 12:36:56 +00:00
Harsh Shandilya cca14765ce chore(README): refresh module graph graphic 2023-09-20 09:05:52 +05:30
renovate[bot]andGitHub 725718d18c fix(deps): update konvert to v2.3.0 2023-09-20 01:27:39 +00:00
renovate[bot]andHarsh Shandilya 61b000dc48 chore(deps): update dependency com.facebook:ktfmt to v0.46 2023-09-20 00:04:33 +05:30
renovate[bot]andGitHub cf850071e5 chore(deps): update github/codeql-action action to v2.21.8 2023-09-19 11:24:32 +00:00
Harsh Shandilya fe473e70a3 fix(ci): adjust CodeQL build task 2023-09-19 16:54:06 +05:30
Harsh Shandilya ce6540a6f3 fix(scripts): allow running on Darwin hosts 2023-09-19 16:06:56 +05:30
GitHub Actions ac3e60053a feat(release): start next development iteration 2023-09-19 09:54:05 +00:00
GitHub Actions 205ae8d9c7 feat(release): bump version 2023-09-19 09:49:59 +00:00
Harsh Shandilya 772d368caa chore(android): delete startup profile 2023-09-19 14:27:23 +05:30
Harsh Shandilya d2fa330491 chore(android): regenerate baseline profiles 2023-09-19 14:27:23 +05:30
Harsh Shandilya f85856a6d9 fix(ci): run dependency review after checks job 2023-09-19 14:27:23 +05:30
renovate[bot]andGitHub 4ed5988aa8 chore(deps): update r0adkll/upload-google-play action to v1.1.2 2023-09-19 05:21:44 +00:00
renovate[bot]andGitHub ac4bf7f4dd fix(deps): update dependency androidx.test:core to v1.6.0-alpha02 2023-09-19 00:42:03 +00:00
Harsh Shandilya 7b5cfa97d7 chore: update changelog 2023-09-19 00:25:56 +05:30
renovate[bot]andHarsh Shandilya 93292c3d5a chore(deps): update dependency com.facebook:ktfmt to v0.45 2023-09-18 23:38:00 +05:30
Harsh Shandilya 62ebb43e6f fix(common): ensure TagRow has vertical spacing 2023-09-17 01:44:09 +05:30
Harsh Shandilya 5dabebf579 fix(api): simplify test assertion 2023-09-17 01:38:46 +05:30
renovate[bot]andGitHub 96728a3834 chore(deps): update plugin modulegraph to v0.5.0 2023-09-15 19:53:37 +00:00
renovate[bot]andGitHub 10aa416e94 chore(deps): update agp to v8.3.0-alpha04 2023-09-15 17:29:46 +00:00
Harsh Shandilya e283584999 fix(api): use the correct test resource 2023-09-14 23:17:15 +05:30
renovate[bot]andGitHub edea0c6ab1 chore(deps): update github/codeql-action action to v2.21.7 2023-09-14 17:41:12 +00:00
Harsh Shandilya 1cb3eb6472 refactor(api): import CSRF extraction from android module 2023-09-14 00:47:01 +05:30
Harsh Shandilya ddfa62f4fb fix(ci): run CodeQL on Renovate branches 2023-09-14 00:22:14 +05:30
renovate[bot]andGitHub 88a119d66b chore(deps): update github/codeql-action action to v2.21.6 2023-09-13 16:41:41 +00:00
renovate[bot]andGitHub de16ff52af fix(deps): update dependency org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin to v2.8.0 2023-09-12 01:45:32 +00:00
renovate[bot]andGitHub 8dc3a034c1 chore(deps): pin actions/dependency-review-action action to 6c5ccda 2023-09-09 18:19:00 +00:00
Harsh Shandilya f9b2581464 chore(ci): add GHA dependency-review-action 2023-09-09 23:48:40 +05:30
Harsh ShandilyaandGitHub 2f2d2e694e fix(android): remove unnecessary Konvert configuration
We're only using it in the `model` subproject right now.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2023-09-09 16:48:24 +05:30
Harsh Shandilya 25382acf0e refactor(model): use Konvert to automatically generate mappings 2023-09-09 13:31:28 +05:30
Harsh Shandilya d4672ae8bd chore(deps): upgrade to Whetstone 0.7.0 2023-09-08 15:08:33 +05:30
Harsh Shandilya 4c87b644c0 chore(deps): update anvil to 2.4.8 2023-09-08 13:47:54 +05:30
Harsh Shandilya f546f98227 chore: update rgignore 2023-09-08 13:47:15 +05:30
renovate[bot]andGitHub e878df3d60 chore(deps): update agp to v8.3.0-alpha03 2023-09-08 00:16:20 +00:00
Harsh Shandilya e49a2c2cbc fix(build): disable NewerVersionAvailable Lint 2023-09-07 23:52:15 +05:30
renovate[bot]andGitHub f371c435fd fix(deps): update dependency com.github.ben-manes:gradle-versions-plugin to v0.48.0 2023-09-07 07:36:34 +00:00
Harsh Shandilya 19e7d65006 fix(deps): update dev.chrisbanes.compose:compose-bom to 2023.10.00-alpha01 2023-09-07 13:03:34 +05:30
renovate[bot]andGitHub 60506b4725 fix(deps): update androidx 2023-09-06 23:02:27 +00:00
renovate[bot]andGitHub 9cfa4d8ac4 chore(deps): update actions/upload-artifact action to v3.1.3 2023-09-06 20:25:12 +00:00
renovate[bot]andGitHub 8195a15a01 fix(deps): update sentry to v6.29.0 2023-09-06 10:36:08 +00:00
Harsh Shandilya 721b74fedc chore: refresh Lint baseline 2023-09-06 01:57:27 +05:30
renovate[bot]andGitHub 62ea7cd456 chore(deps): update agp to v8.3.0-alpha02 2023-09-05 18:09:30 +00:00
renovate[bot]andGitHub b60adaf87d chore(deps): update actions/checkout action to v4 2023-09-04 16:56:54 +00:00
renovate[bot]andGitHub 0852f197be chore(deps): update plugin modulegraphassert to v2.5.0 2023-09-03 19:14:41 +00:00
renovate[bot]andGitHub ef6359274d fix(deps): update dependency org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin to v2.7.4 2023-09-01 18:47:57 +00:00
Harsh Shandilya b31a3755bb chore: add TraceLog 2023-09-01 04:05:20 +05:30
Harsh Shandilya c87f6a4239 fix(api): adapt to new user endpoint 2023-09-01 04:05:07 +05:30
Harsh Shandilya c279765386 fix(deps): upgrade to AGP 8.3.0-alpha01 2023-08-31 11:45:23 +05:30
renovate[bot]andGitHub ac3dd45ee6 chore(deps): update androidx to v1.2.0-beta05 2023-08-30 22:45:39 +00:00
Harsh ShandilyaandGitHub 6db7880178 fix: replace unsupported extension syntax 2023-08-30 22:35:21 +05:30
renovate[bot]andGitHub 0c29a6626d fix(deps): update dagger to v2.48 2023-08-30 16:19:34 +00:00
GitHub Actions 183e1606c5 feat(release): start next development iteration 2023-08-30 10:43:33 +00:00
GitHub Actions d5a4d7f91a feat(release): bump version 2023-08-30 10:38:14 +00:00
Harsh Shandilya 5a491429db chore: add dependency updates to changelog 2023-08-30 16:01:05 +05:30
Harsh Shandilya 6265c50caf chore: refresh Lint baseline 2023-08-30 15:55:41 +05:30
Harsh Shandilya 4b4f00ad8e feat(android): enable read posts feature 2023-08-30 15:13:34 +05:30
Harsh Shandilya ed071a0fff chore: update README 2023-08-30 14:53:49 +05:30
Anunay Maheshwari db393d4534 fix(comments): calculate and expose indentLevel from CommentNode 2023-08-30 14:35:16 +05:30
Harsh Shandilya 9dcf26b5a4 fix(model): adjust for new comments structure 2023-08-30 11:32:10 +05:30
Harsh Shandilya 43402f45d8 Revert "chore(android): refresh baseline profiles"
Causes crashes 🤷

This reverts commit 0d23225ec7.
2023-08-29 15:56:47 +05:30
Harsh Shandilya 76b5395fd2 fix(deps): update dev.chrisbanes.compose:compose-bom to 2023.09.00-alpha03 2023-08-29 15:45:34 +05:30
renovate[bot]andGitHub f9fa30a58d fix(deps): update dependency com.github.requery:sqlite-android to v3.43.0 2023-08-29 08:55:26 +00:00
renovate[bot]andGitHub b7660a93b5 fix(deps): update dependency com.diffplug.spotless:spotless-plugin-gradle to v6.21.0 2023-08-29 06:55:57 +00:00
renovate[bot]andGitHub 5858466318 chore(deps): update gradle/gradle-build-action action to v2.8.0 2023-08-28 21:51:32 +00:00
renovate[bot]andGitHub 4d5ce37982 chore(deps): update github/codeql-action action to v2.21.5 2023-08-28 19:49:30 +00:00
renovate[bot]andGitHub d84e6c8e7c chore(deps): update actions/checkout action to v3.6.0 2023-08-24 19:27:43 +00:00
renovate[bot]andGitHub 9768ffa8ff chore(deps): update agp to v8.2.0-beta01 2023-08-24 17:30:48 +00:00
Harsh Shandilya 5cb4af40cd fix(build): simplify Lint task dependencies 2023-08-24 17:16:55 +05:30
Harsh Shandilya b43d238dd1 chore: refresh Lint baseline 2023-08-24 12:40:19 +05:30
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>Harsh Shandilya
3c8a23e91e chore(deps): update kotlin and compose to v1.9.10 (#396)
[![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)) | `1.9.0` -> `1.9.10`
|
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains.kotlin.plugin.serialization/1.9.10?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jetbrains.kotlin.plugin.serialization/1.9.10?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jetbrains.kotlin.plugin.serialization/1.9.0/1.9.10?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains.kotlin.plugin.serialization/1.9.0/1.9.10?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [org.jetbrains.kotlin:kotlin-gradle-plugin](https://kotlinlang.org/)
([source](https://togithub.com/JetBrains/kotlin)) | `1.9.0` -> `1.9.10`
|
[![age](https://developer.mend.io/api/mc/badges/age/maven/org.jetbrains.kotlin:kotlin-gradle-plugin/1.9.10?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/org.jetbrains.kotlin:kotlin-gradle-plugin/1.9.10?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/org.jetbrains.kotlin:kotlin-gradle-plugin/1.9.0/1.9.10?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/org.jetbrains.kotlin:kotlin-gradle-plugin/1.9.0/1.9.10?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

###
[`v1.9.10`](https://togithub.com/JetBrains/kotlin/releases/tag/v1.9.10):
Kotlin 1.9.10

#### Changelog

##### Compiler

- [`KT-60769`](https://youtrack.jetbrains.com/issue/KT-60769) Partially
revert KT-58371
- [`KT-60659`](https://youtrack.jetbrains.com/issue/KT-60659) Incorrect
'unresolved reference: addFirst' error with JDK 21
- [`KT-60371`](https://youtrack.jetbrains.com/issue/KT-60371) Native
custom allocator link error
- [`KT-60986`](https://youtrack.jetbrains.com/issue/KT-60986) Native:
static caches with custom runtime options are broken on Linux
- [`KT-60770`](https://youtrack.jetbrains.com/issue/KT-60770) Fix
false-positive ABSTRACT_MEMBER_NOT_IMPLEMENTED on toArray with JDK 21
- [`KT-60231`](https://youtrack.jetbrains.com/issue/KT-60231)
NoClassDefFoundError: $$$$$NON_LOCAL_RETURN$$$$$ after upgrade to Kotlin
1.9.0

##### JavaScript

- [`KT-60785`](https://youtrack.jetbrains.com/issue/KT-60785) KJS:
Destructured value class in suspend function fails with Uncaught
TypeError: can't convert to primitive type error
- [`KT-60852`](https://youtrack.jetbrains.com/issue/KT-60852) Kotlin
JS(IR): IllegalArgumentException: Cross module dependency resolution
failed when updating to Kotlin 1.9.0
- [`KT-57509`](https://youtrack.jetbrains.com/issue/KT-57509) KJS:
Compiler generates native JS operator == for comparing values with Any
type

##### Native

- [`KT-60230`](https://youtrack.jetbrains.com/issue/KT-60230) Native:
"unknown options: -ios_simulator_version_min -sdk_version" with Xcode 15
beta 3
- [`KT-60758`](https://youtrack.jetbrains.com/issue/KT-60758) Native:
Building for 'iOS-simulator', but linking in dylib built for 'iOS' in
Xcode 15 beta 4

##### Native. C and ObjC Import

- [`KT-59167`](https://youtrack.jetbrains.com/issue/KT-59167) Native:
cinterop is unable to build interop libraries against the Xcode 15 Beta
1

##### Tools. Gradle

- [`KT-61147`](https://youtrack.jetbrains.com/issue/KT-61147) Kotlin
Compiler 1.9.0 bundles a stripped unshadowed version of Gson
- [`KT-60543`](https://youtrack.jetbrains.com/issue/KT-60543)
NoClassDefFoundError for com/gradle/scan/plugin/BuildScanExtension

#### Checksums

| File | Sha256 |
| --- | --- |
| kotlin-compiler-1.9.10.zip |
7d74863deecf8e0f28ea54c3735feab003d0eac67e8d3a791254b16889c20342 |
| kotlin-native-linux-x86\_64-1.9.10.tar.gz |
1db3679919f4449514e9d82451e7dfa73558ac9bc80b82579cd74d452c8faa5b |
| kotlin-native-macos-x86\_64-1.9.10.tar.gz |
f5650f2560438a692803d8fe07124529c19f1972f84fe09cfa2329b93f43828d |
| kotlin-native-macos-aarch64-1.9.10.tar.gz |
d2cf5a484ac0808ab29fd3f6099df7c07330f81f3cbab949947e42e36138c3de |
| kotlin-native-windows-x86\_64-1.9.10.zip |
a34d56661455e94e1ba4dd09ec3c1adac6148fdedcf55eefb9a79c8ed01ff02c |

</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:eyJjcmVhdGVkSW5WZXIiOiIzNi41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzYuNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
2023-08-24 04:43:15 +00:00
Harsh Shandilya 63d74ae065 chore: refresh lint baseline 2023-08-23 23:29:40 +05:30
Harsh Shandilya f0d4395da6 chore(database): make test naming consistent 2023-08-23 23:28:01 +05:30
renovate[bot]andGitHub 41fe784641 chore(deps): update androidx 2023-08-23 17:35:34 +00:00
renovate[bot]andGitHub 7c07e90d0e fix(deps): update dependency androidx.test:runner to v1.6.0-alpha04 2023-08-22 21:38:42 +00:00
renovate[bot]andGitHub 6731453c41 fix(deps): update serialization to v1.6.0 2023-08-22 19:55:01 +00:00
Harsh Shandilya 932b474763 chore(build): refresh Gradle Kotlin IC properties 2023-08-20 03:27:12 +05:30
renovate[bot]andGitHub 1600b7a200 chore(deps): update gradle/gradle-build-action action to v2.7.1 2023-08-18 23:34:53 +00:00
Harsh Shandilya 0d23225ec7 chore(android): refresh baseline profiles 2023-08-18 16:17:52 +05:30
renovate[bot]andGitHub 5214355339 chore(deps): update plugin org.gradle.toolchains.foojay-resolver-convention to v0.7.0 2023-08-17 12:46:00 +00:00
renovate[bot]andGitHub 81b96cf21d chore(deps): update dependency gradle to v8.3 2023-08-17 10:12:47 +00:00
Harsh Shandilya 492eff8cde chore: add changelog entries 2023-08-16 14:59:04 +05:30
Harsh Shandilya 49c5029256 refactor: move ClawAppBar to android module 2023-08-16 12:30:04 +05:30
Harsh Shandilya fcd85dc8e1 feat(android): feature flag "read posts" feature 2023-08-16 11:27:57 +05:30
Harsh Shandilya bc3a1266f4 refactor(android): drop Accompanist SystemUI Controller dependency 2023-08-16 11:25:13 +05:30
Harsh Shandilya bc2365b08b feat(android): add support for identifying read posts 2023-08-16 00:37:50 +05:30
Harsh Shandilya 9c32d6721b feat(database): add support for marking posts as read 2023-08-15 23:58:02 +05:30
Harsh Shandilya 1394bc74c4 refactor(database): de-dupe test database setup 2023-08-15 23:58:01 +05:30
Harsh Shandilya cbf0707aa6 chore(common): tweak LobstersCard UI
Cut down on paddings and use colors more explicitly
2023-08-15 16:15:11 +05:30
Harsh Shandilya 67e621160f fix(common): allow custom tints for NetworkImage placeholders 2023-08-15 15:37:23 +05:30
Harsh Shandilya e06a8ba236 refactor(database): disallow injection of raw database types 2023-08-15 14:59:39 +05:30
renovate[bot]andGitHub 5bd37a837c chore(deps): update github/codeql-action action to v2.21.4 2023-08-14 20:26:15 +00:00
renovate[bot]andGitHub 828fb74240 chore(deps): update agp to v8.2.0-alpha16 2023-08-14 17:33:54 +00:00
renovate[bot]andGitHub 8241a6d901 chore(deps): update dependency gradle to v8.3-rc-4 2023-08-14 10:27:33 +00:00
Harsh Shandilya edadcc6744 refactor(database): expose *Queries objects to the DI graph 2023-08-14 15:54:22 +05:30
Harsh Shandilya 44438da292 chore: refresh module graph 2023-08-10 03:09:47 +05:30
Harsh Shandilya 591c68a6e4 scripts: return to monke
I don't like bash but turns out I dislike Python more

This reverts commit 2628bfc2cd, d77fa13903 and 69f63cced4.
2023-08-10 02:58:58 +05:30
renovate[bot]andGitHub 892d68581d chore(deps): update plugin poko to v0.15.0 2023-08-09 19:27:31 +00:00
renovate[bot]andGitHub a4b39ce00e fix(deps): update androidx 2023-08-09 17:56:34 +00:00
renovate[bot]andGitHub 9ce0d3a8b4 fix(deps): update dependency com.slack.eithernet:eithernet to v1.5.0 2023-08-09 01:33:00 +00:00
renovate[bot]andGitHub 23b07c4bad chore(deps): update github/codeql-action action to v2.21.3 2023-08-08 15:51:00 +00:00
renovate[bot]andGitHub f3e28d2e58 fix(deps): update dependency io.sentry.android.gradle:io.sentry.android.gradle.gradle.plugin to v3.12.0 2023-08-08 09:49:08 +00:00
Harsh Shandilya 7a5da2af9f chore(deps): upgrade accompanist to 0.33.0-alpha 2023-08-08 11:46:50 +05:30
renovate[bot]andGitHub 4c28da30ae fix(deps): update sentry to v6.28.0 2023-08-04 13:58:52 +00:00
Harsh Shandilya 4961af8a20 fix(android): workaround packaging regression 2023-08-04 02:42:31 +05:30
Harsh Shandilya 1e396bc7ff feat(android): add Licensee to track dependency licenses 2023-08-04 02:19:42 +05:30
Harsh Shandilya 52deb7ca5f Revert "feat: init store module"
Store doesn't seem particularly useful for my needs.

This reverts commits 14007c6e8f and 45701f414b.
2023-08-04 00:39:53 +05:30
Harsh Shandilya 8891667c92 fix(deps): bump serialization to 1.6.0-RC 2023-08-03 23:44:44 +05:30
Harsh ShandilyaandGitHub e7e51f38d4 Merge remote-tracking branches 'origin/renovate/org.gradle.android.cache-fix' and 'origin/renovate/org.jetbrains.kotlinx' 2023-08-03 17:14:50 +00:00
renovate[bot]andGitHub 3de6a94ea0 fix(deps): update dependency org.jetbrains.kotlinx:atomicfu to v0.21.0 2023-08-03 17:09:41 +00:00
renovate[bot]andGitHub ef0db7d5ae fix(deps): update dependency org.gradle.android.cache-fix:org.gradle.android.cache-fix.gradle.plugin to v2.7.3 2023-08-03 17:09:38 +00:00
Harsh ShandilyaandGitHub 45701f414b feat(store): set up a preliminary implementation for newest posts 2023-08-03 17:09:08 +00:00
Harsh Shandilya 14007c6e8f feat: init store module 2023-08-03 18:23:23 +05:30
Harsh Shandilya 6ca500066f fix(database): move migrations to their correct directory 2023-08-03 17:43:36 +05:30
Harsh Shandilya 69f63cced4 refactor(scripts): convert scripts/encrypt-secret to Python 2023-08-03 16:58:38 +05:30
renovate[bot]andHarsh Shandilya 1e0cc062d5 chore(deps): update dependency gradle to v8.3-rc-3 2023-08-03 16:58:38 +05:30
Harsh Shandilya f6e9b3a83f chore(build): remove unused dependencies 2023-08-03 16:58:38 +05:30
Harsh Shandilya e0eb748318 fix(android): remove native library fix attempts
There is no measurable evidence that these helped at all
2023-08-03 16:58:38 +05:30
Harsh Shandilya d65b8b6799 chore(ci): allow overriding IAU priority 2023-08-03 16:58:38 +05:30
Harsh Shandilya d41a1f444f fix(ci): remove baseline profile workflow
GHA is incapable of running this anymore
2023-08-02 13:39:10 +05:30
Harsh Shandilya 786f674044 fix(api): make commentsUrl in search results absolute 2023-08-02 11:08:10 +05:30
Harsh Shandilya 432a438815 chore(ci): add Python to Spotless 2023-08-02 01:40:36 +05:30
Harsh Shandilya bae671ad23 feat(android): switch comments page to a swipe action 2023-08-02 01:40:36 +05:30
renovate[bot]andGitHub 45b6f3c4d5 chore(deps): update agp to v8.2.0-alpha15 2023-07-31 20:14:53 +00:00
GitHub Actions 79a2a060c7 feat(release): start next development iteration 2023-07-31 14:52:59 +00:00
GitHub Actions 80736d6538 feat(release): bump version 2023-07-31 14:47:02 +00:00
Harsh Shandilya cb77a3ae85 chore: update changelog 2023-07-31 19:11:34 +05:30
Harsh Shandilya 80ab034493 fix(android): use SoLoader to load sqlite native library 2023-07-31 19:10:03 +05:30
Harsh Shandilya 3bb5dfffbe refactor(build): migrate to Baseline Profile Gradle Plugin 2023-07-31 16:48:09 +05:30
GitHub Actions d9ab751dbd chore(android): refresh baseline profile 2023-07-31 06:58:01 +00:00
Harsh Shandilya e3627ca89d fix: prevent upgrading to Anvil k1.8 build 2023-07-29 20:22:24 +05:30
Harsh Shandilya 543edf36e8 chore(deps): update anvil to v2.4.7 2023-07-29 12:12:37 +05:30
GitHub Actions fb5721beda chore(android): refresh baseline profile 2023-07-29 01:33:18 +00:00
renovate[bot]andGitHub 6e67a3de5f chore(deps): update github/codeql-action action to v2.21.2 2023-07-28 15:40:09 +00:00
GitHub Actions 6d944967f0 chore(android): refresh baseline profile 2023-07-28 01:40:03 +00:00
Harsh Shandilya 2628bfc2cd py: scripts/deploy-snapshot 2023-07-27 15:20:31 +00:00
Harsh Shandilya d77fa13903 py: scripts/boot-emulator 2023-07-27 16:55:38 +05:30
GitHub Actions f71aa07949 feat(release): start next development iteration 2023-07-27 08:10:24 +00:00
GitHub Actions a41b465648 feat(release): bump version 2023-07-27 08:06:08 +00:00
Harsh Shandilya a7038600b3 fix(release): update signing key secret in publish workflow
Fixes: ca6b941cbb ("fix(release): update secrets handling scripts")
2023-07-27 13:34:22 +05:30
Harsh Shandilya 3143556c63 fix: re-roll Lint baseline 2023-07-27 12:04:50 +05:30
GitHub Actions 5e2d9a2355 chore(android): refresh baseline profile 2023-07-27 01:38:58 +00:00
Harsh Shandilya b4adfede90 fix(android): avoid crash from empty creation time
Fixes COMPOSE-LOBSTERS-17
2023-07-27 02:57:35 +05:30
Harsh Shandilya ed85ba905d fix(deps): update dev.chrisbanes.compose:compose-bom to 2023.07.00-alpha02 2023-07-27 02:36:28 +05:30
Harsh Shandilya c29e4065d6 chore: update changelog 2023-07-27 02:03:48 +05:30
Harsh Shandilya bcf4f02a01 Revert "Revert "Revert "fix(common): make text in comments screen selectable"""
Still causes crashes :(

This reverts commit c5ec6cd680.

Fixes COMPOSE-LOBSTERS-16
2023-07-27 01:28:21 +05:30
renovate[bot]andGitHub 72b9409383 chore(deps): update github/codeql-action action to v2.21.1 2023-07-26 19:31:22 +00:00
renovate[bot]andGitHub 2c762428af chore(deps): update androidx 2023-07-26 18:27:51 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
58e427c13a chore(deps): update sqldelight to v2.0.0 (#391)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-26 23:57:37 +05:30
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
974f03ee89 fix(deps): update dependency androidx.paging:paging-compose to v3 (#392)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-26 23:57:28 +05:30
renovate[bot]andGitHub f5e6b25ec6 chore(deps): update dependency gradle to v8.3-rc-2 2023-07-26 16:46:13 +00:00
renovate[bot]andGitHub be5f073acf fix(deps): update sentry to v6.27.0 2023-07-26 08:41:17 +00:00
Harsh Shandilya ca6b941cbb fix(release): update secrets handling scripts 2023-07-26 14:10:49 +05:30
GitHub Actions 1e5f830652 chore(android): refresh baseline profile 2023-07-26 06:39:23 +00:00
renovate[bot]andGitHub e72a5fda5c chore(deps): update agp to v8.2.0-alpha14 2023-07-25 21:59:32 +00:00
renovate[bot]andGitHub 5c2fe6e630 fix(deps): update coroutines to v1.7.3 2023-07-25 19:04:26 +00:00
Harsh ShandilyaandGitHub 5907c2a09a fix(scripts): make boot_emulator naming consistent 2023-07-25 21:52:32 +05:30
Harsh Shandilya e3b381c665 chore: refresh feature graphic 2023-07-25 20:25:21 +05:30
Harsh Shandilya f1d30e59b0 feat: add Search flow to Maestro 2023-07-25 20:17:27 +05:30
Harsh Shandilya 7669a85f43 chore: refresh README graphic 2023-07-25 19:25:35 +05:30
GitHub Actions c05db765c8 feat(release): start next development iteration 2023-07-25 10:42:52 +00:00
GitHub Actions 4c8e30bcc9 feat(release): bump version 2023-07-25 10:38:59 +00:00
GitHub Actions d32819b1ff chore(android): refresh baseline profile 2023-07-25 06:39:00 +00:00
Harsh Shandilya a2d046bd0b Revert "fix(benchmark): upgrade to API level 33"
This reverts commit 1defffa504.
2023-07-25 11:46:47 +05:30
Harsh Shandilya 3ad4ff1c63 fix(build): use Whetstone from Maven Central 2023-07-25 11:40:02 +05:30
Harsh Shandilya 1defffa504 fix(benchmark): upgrade to API level 33 2023-07-25 01:31:01 +05:30
Harsh Shandilya 0d78cb4112 fix(benchmark): rework baseline profile benchmark 2023-07-25 01:31:01 +05:30
Harsh Shandilya 7c59130af9 feat(benchmark): restore full UI exploration 2023-07-25 01:31:01 +05:30
Harsh Shandilya 4137d73539 chore: update changelog 2023-07-25 00:56:07 +05:30
renovate[bot]andGitHub 0f8a649e3b chore(deps): update gradle/gradle-build-action action to v2.7.0 2023-07-24 16:23:53 +00:00
Harsh ShandilyaandGitHub 7e7a4bec83 chore(renovate): re-enable Kotlin upgrades 2023-07-24 21:49:52 +05:30
Harsh Shandilya b442b14cc1 fix(deps): upgrade to Kotlin 1.9.0 2023-07-24 21:29:24 +05:30
renovate[bot]andGitHub 97886f6ece chore(deps): update actions/setup-java action to v3.12.0 2023-07-24 14:03:55 +00:00
GitHub Actions 7b9245e62c chore(android): refresh baseline profile 2023-07-24 01:25:48 +00:00
renovate[bot]andGitHub 99aa62d0e4 fix(deps): update junit5 monorepo to v5.10.0 2023-07-23 13:39:47 +00:00
GitHub Actions c3cf8a8a39 chore(android): refresh baseline profile 2023-07-23 01:27:03 +00:00
GitHub Actions 340655f18a chore(android): refresh baseline profile 2023-07-22 01:27:26 +00:00
renovate[bot]andGitHub 10fa84b09e fix(deps): update richtext to v0.17.0 2023-07-21 05:01:52 +00:00
GitHub Actions f21a03b20b chore(android): refresh baseline profile 2023-07-21 01:29:17 +00:00
GitHub Actions 56394fc275 chore(android): refresh baseline profile 2023-07-20 01:27:18 +00:00
Harsh Shandilya 9fd2d9f17b fix(android): avoid triggering another useless search API call 2023-07-20 01:11:45 +05:30
Harsh Shandilya 0c0506b6d7 fix(android): fix content description of search page icon 2023-07-20 01:06:13 +05:30
Harsh Shandilya f94741144c refactor(android): make search page manage localized state 2023-07-19 22:24:43 +05:30
Harsh Shandilya 29c0369d43 fix(build): set proguard files for all build types
Some cursed day you might be enabling R8 on debug builds
2023-07-19 22:24:23 +05:30
Harsh Shandilya e700987d14 chore(deps): update dev.chrisbanes.compose:compose-bom to 2023.07.00-alpha01 2023-07-19 22:15:33 +05:30
Harsh Shandilya c5ec6cd680 Revert "Revert "fix(common): make text in comments screen selectable""
This reverts commit 401214794d.
2023-07-19 21:58:08 +05:30
renovate[bot]andGitHub e48a6d41d5 chore(deps): update github/codeql-action action to v2.21.0 2023-07-19 16:02:19 +00:00
Harsh Shandilya 5870af4017 fix(core): remove unused DispatcherProvider#unconfined 2023-07-19 21:31:43 +05:30
Harsh Shandilya cb4c85b41c chore(build): upgrade to Gradle 8.3 RC1 2023-07-19 21:31:43 +05:30
renovate[bot]andGitHub cd6a04c5fd fix(deps): update sentry to v6.26.0 2023-07-19 13:37:30 +00:00
Harsh Shandilya 401214794d Revert "fix(common): make text in comments screen selectable"
Causes frequent crashes

This reverts commit 778be597dd.
2023-07-19 10:03:04 +00:00
Harsh Shandilya fdd2f7008c Revert "fix(common): use SystemClock for getting current millis"
This broke relative time accounting

This reverts commit 42cc852a20.
2023-07-19 10:02:20 +00:00
renovate[bot]andGitHub 18ef9c63b9 chore(deps): update dependency com.android.test to v8.2.0-alpha13 2023-07-18 21:20:15 +00:00
Harsh Shandilya d343f3db2b feat(api): remove tag search endpoints 2023-07-19 00:50:10 +05:30
Harsh Shandilya 42cc852a20 fix(common): use SystemClock for getting current millis 2023-07-19 00:41:33 +05:30
Harsh Shandilya 44be6eacbb chore: update changelog 2023-07-19 00:04:25 +05:30
Harsh Shandilya 778be597dd fix(common): make text in comments screen selectable
With this change you can now select
- The post title
- The post description if it exists, and
- Each individual comment

Fixes #385
2023-07-18 23:23:24 +05:30
Harsh Shandilya 255439e2b4 feat(common): add a clickable icon to SearchBar 2023-07-18 23:23:24 +05:30
renovate[bot]andGitHub 63c3e26f5c fix(deps): update dependency nl.littlerobots.version-catalog-update:nl.littlerobots.version-catalog-update.gradle.plugin to v0.8.1 2023-07-18 17:38:40 +00:00
Harsh Shandilya d3c3e3ca08 feat(android): wire up search UI into navigation graph 2023-07-18 23:08:07 +05:30
Harsh Shandilya 8d6aba9865 feat(android): add search UI 2023-07-18 23:08:07 +05:30
Harsh Shandilya 5e91e20c51 feat(android): add specialized PagingSource for search endpoint 2023-07-18 23:08:07 +05:30
Harsh Shandilya 84c9dd3762 feat(common): add a simple SearchBar component
Material 3's SearchBar has way too much "interaction" for my liking
2023-07-18 23:08:07 +05:30
renovate[bot]andGitHub 24ef11b315 fix(deps): update dependency androidx.benchmark:benchmark-macro-junit4 to v1.2.0-beta01 2023-07-18 17:34:11 +00:00
Harsh Shandilya bdf218cd85 refactor(api): rework Retrofit DI and expose LobstersSearchApi 2023-07-18 17:53:36 +05:30
Harsh Shandilya b3ff40b12b refactor(core): RetrofitModule -> JsonModule 2023-07-18 17:11:52 +05:30
Harsh Shandilya bad5bf5457 refactor(api): make SearchConverter a singleton 2023-07-18 17:11:06 +05:30
Harsh Shandilya cf3ca27966 fix(api): correct usage of @Query feature in search API 2023-07-18 17:04:50 +05:30
renovate[bot]andHarsh Shandilya 127a0674a2 chore(deps): update gradle/gradle-build-action action to v2.6.1 2023-07-18 17:01:52 +05:30
renovate[bot]andHarsh Shandilya b1a18c5dec fix(deps): update dependency com.diffplug.spotless:spotless-plugin-gradle to v6.20.0 2023-07-18 17:01:52 +05:30
GitHub ActionsandHarsh Shandilya 0a39f56775 chore(android): refresh baseline profile 2023-07-18 17:01:52 +05:30
Harsh Shandilya 5daeb8d580 feat(common): log errors from NetworkError composable
Having the errors in the logcat stream makes debugging quite a lot faster.
2023-07-18 17:01:52 +05:30
Harsh Shandilya 415ddae9f7 refactor(android): enforce DI encapsulation 2023-07-18 17:01:52 +05:30
Harsh Shandilya 4c95680f3b fix(renovate): remove now-unnecessary sentry-sdk regex manager 2023-07-17 16:03:15 +05:30
Harsh Shandilya b6cb9a2077 fix(renovate): consolidate and cleanup disabled packages 2023-07-17 16:01:36 +05:30
Harsh Shandilya 13eefbba2a chore(gradle): ensure all custom repositories are named 2023-07-17 15:43:58 +05:30
Harsh Shandilya 6548f7d654 fix(renovate): drop Poko from Renovate list
This is tied to the Kotlin version
2023-07-17 15:12:09 +05:30
Harsh Shandilya 1e4217598f fix(build): make slimTests skip debug rather than select release 2023-07-17 15:08:52 +05:30
Harsh Shandilya 0359860b82 refactor(android): move link metadata extraction to Unfurl
Crux is doing major changes for no good reason
2023-07-17 15:03:55 +05:30
Harsh Shandilya 37f42dc107 feat(api): add a Retrofit service for search 2023-07-17 08:26:56 +00:00
Harsh Shandilya 7eb4b45ab1 fix(model): ensure all classes have a readable toString 2023-07-17 13:36:42 +05:30
GitHub Actions 3706fdd284 chore(android): refresh baseline profile 2023-07-17 01:28:06 +00:00
renovate[bot]andGitHub f1fa96f8ca fix(deps): update dependency com.chimbori.crux:crux to v5 2023-07-16 10:22:42 +00:00
renovate[bot]andGitHub 36cadcdd78 fix(deps): update dependency com.chimbori.crux:crux to v4 2023-07-16 03:55:22 +00:00
renovate[bot]andGitHub cf3ac329f6 fix(deps): update dependency com.chimbori.crux:crux to v3.13.0 2023-07-16 00:26:09 +00:00
Harsh Shandilya 0581cedfb0 fix: remove useless get 2023-07-16 00:49:16 +05:30
GitHub Actions 0fc5adc197 chore(android): refresh baseline profile 2023-07-15 01:25:21 +00:00
renovate[bot]andGitHub 0680585b77 chore(deps): update github/codeql-action action to v2.20.4 2023-07-14 15:04:14 +00:00
Harsh Shandilya 2a3514e3b5 Revert "fix(android): remove explicit item keys"
This causes subtle UI artifacts that make me more annoyed than the occasional crash.

This reverts commit 2a97383e7d.
2023-07-14 19:08:32 +05:30
renovate[bot]andGitHub fd8b65be72 chore(deps): update sentry to v6.25.2 2023-07-14 10:57:40 +00:00
renovate[bot]andGitHub 50870b5fb5 fix(deps): update dagger to v2.47 2023-07-14 05:07:17 +00:00
GitHub Actions 7c5d935801 chore(android): refresh baseline profile 2023-07-14 01:31:32 +00:00
GitHub Actions 2862ada772 chore(android): refresh baseline profile 2023-07-13 01:25:54 +00:00
renovate[bot]andGitHub 65d1457386 chore(deps): update sentry to v6.25.1 2023-07-12 10:33:55 +00:00
GitHub Actions 0f63611c2d chore(android): refresh baseline profile 2023-07-12 01:25:10 +00:00
renovate[bot]andGitHub 7767f1c6d7 chore(deps): update agp to v8.2.0-alpha12 2023-07-11 19:08:20 +00:00
GitHub Actions f351b60073 chore(android): refresh baseline profile 2023-07-11 01:27:20 +00:00
Harsh Shandilya 752dee8ed6 fix(ci): submit generated dependency graph from running tests 2023-07-11 06:28:33 +05:30
Harsh Shandilya 0573e8cb2d fix(ci): remove build-tools workaround 2023-07-11 06:14:04 +05:30
Harsh Shandilya 75fd41a0d8 fix(ci): make CodeQL only run on schedule 2023-07-11 06:14:04 +05:30
renovate[bot]andGitHub 59f8577d1f chore(deps): update plugin org.gradle.toolchains.foojay-resolver-convention to v0.6.0 2023-07-10 18:46:20 +00:00
renovate[bot]andGitHub 85d4b50d28 chore(deps): update gradle/gradle-build-action action to v2.6.0 2023-07-10 18:32:28 +00:00
renovate[bot]andGitHub c3499d434b chore(deps): update dependency gradle to v8.2.1 2023-07-10 15:18:37 +00:00
GitHub Actions 701e0d7fcc chore(android): refresh baseline profile 2023-07-10 01:28:01 +00:00
Harsh Shandilya 9a5a417418 feat(build): add copyright license headers to XML files 2023-07-09 22:59:58 +05:30
renovate[bot]andHarsh Shandilya 1221992d26 chore(deps): update agp to v8.2.0-alpha11 2023-07-09 22:56:37 +05:30
renovate[bot]andHarsh Shandilya 144cdb5e50 chore(deps): update github/codeql-action action to v2.20.3 2023-07-09 22:56:37 +05:30
GitHub Actions 8133b2c091 chore(android): refresh baseline profile 2023-07-05 01:24:08 +00:00
renovate[bot]andGitHub 869cc650e3 chore(deps): update sentry to v6.25.0 2023-07-04 17:23:45 +00:00
GitHub Actions 7a3262338d chore(android): refresh baseline profile 2023-07-04 01:26:35 +00:00
renovate[bot]andGitHub 85ff15e8ca chore(deps): update github/codeql-action action to v2.20.2 2023-07-03 11:17:13 +00:00
GitHub Actions 3d34c4f466 chore(android): refresh baseline profile 2023-07-03 06:43:06 +00:00
GitHub Actions 6da6364a55 feat(release): start next development iteration 2023-07-02 18:43:07 +00:00
226 changed files with 86902 additions and 40881 deletions
+3
View File
@@ -6,3 +6,6 @@ cbdfa67d075ec1f8ceec0f3559498cbca01783a0
# Renamed Renovate config file
f304304bc5b64edf189aaa473b05df912067a8bd
# Refactored database module into core and impl
7b0b206905b8dc1f824a2d2a10e3d94c6b9dd11c
+1
View File
@@ -2,3 +2,4 @@
**/dependencies/** linguist-generated
**/clawicons/** linguist-generated
android/src/main/baseline-prof.txt linguist-generated -diff
android/src/main/generated/** linguist-generated -diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

+20 -30
View File
@@ -1,4 +1,5 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":dependencyDashboard",
@@ -19,39 +20,39 @@
],
},
{
"matchPackagePatterns": [
"^androidx.*",
"matchPackageNames": [
"androidx.compose.compiler:compiler",
"com.google.devtools.ksp",
"dev.drewhamilton.poko",
"org.jetbrains.kotlin:kotlin-gradle-plugin",
"org.jetbrains.kotlin.plugin.serialization",
],
"groupName": "androidx"
"groupName": "Kotlin and Compose",
},
{
"matchPackagePatterns": [
"^kotlin",
"^org.jetbrains.kotlin",
"^androidx.compose.compiler",
"^anvil",
"^coil",
"^androidx.*",
],
"enabled": false
"groupName": "AndroidX"
},
{
"matchPackagePatterns": [
"^io.sentry",
"^sentry",
],
"groupName": "sentry"
"groupName": "Sentry"
},
{
"managers": [
"gradle"
"matchPackagePatterns": [
"^com.squareup.anvil"
],
"packagePatterns": [
// Renovate refuses to stop resolving this from the snapshots repo
"^app.cash.sqldelight",
// Currently on a pre-release version for bugfixes
"com.android.tools:r8",
"allowedVersions": "!/.*-1-8$/",
},
{
"matchPackagePatterns": [
"^androidx.glance",
],
"enabled": false
"allowedVersions": "<=1.0.0",
},
],
"regexManagers": [
@@ -77,16 +78,5 @@
"depNameTemplate": "androidx.compose.compiler:compiler",
"registryUrlTemplate": "https://maven.google.com",
},
{
"fileMatch": [
"gradle/libs.versions.toml"
],
"matchStrings": [
"sentry-sdk = \"(?<currentValue>.*)\""
],
"datasourceTemplate": "maven",
"depNameTemplate": "io.sentry:sentry-android",
"registryUrlTemplate": "https://repo1.maven.org/maven2/",
}
]
],
}
-105
View File
@@ -1,105 +0,0 @@
name: Baseline profile generation
on:
# every day at 00:43
schedule:
- cron: '43 0 * * *'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
baseline-profile:
runs-on: macos-latest
timeout-minutes: 45
env:
TERM: dumb
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
token: ${{ secrets.POST_RELEASE_GH_TOKEN }}
fetch-depth: 0
- name: Accept all SDK licenses
shell: bash
run: printf 'y\ny\ny\ny\ny\ny\n' | $ANDROID_HOME/tools/bin/sdkmanager --licenses
- name: Get build-tools directory
id: build-tools-path
shell: bash
run: echo "dir=${ANDROID_HOME}/build-tools/34.0.0-rc3" >> "${GITHUB_OUTPUT}"
- name: Cache build-tools
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ${{ steps.build-tools-path.outputs.dir }}
key: ${{ runner.os }}-34.0.0-rc3
- name: Set up JDK
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with:
distribution: temurin
java-version: 18
- name: Set up Git author
shell: bash
run: |
git config user.name "GitHub Actions"
git config user.email noreply@github.com
- name: Setup Gradle caching
uses: gradle/gradle-build-action@40b6781dcdec2762ad36556682ac74e31030cfe2 # v2.5.1
with:
gradle-home-cache-cleanup: true
cache-read-only: true
- name: Decrypt secrets
run: |
./scripts/setup-age.sh
./scripts/signing-setup.sh "$ENCRYPT_KEY"
env:
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
# This allows us to build most of what we need without the emulator running
# and using resources
- name: Build app and benchmark
run: ./gradlew :benchmark:assembleBenchmark :android:assembleBenchmark
- name: Clear unused Gradle Managed Devices
run: ./gradlew cleanManagedDevices --unused-only
- name: Run benchmark on Gradle Managed Device
run: |
./gradlew api31BenchmarkAndroidTest \
-Dorg.gradle.workers.max=1 \
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile \
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
# If we're on main branch, copy over the baseline profile and
# commit it to the repository (if changed)
- name: Commit baseline profile into main
if: github.ref == 'refs/heads/main'
run: |
# Pull down any changes which may have been committed while this workflow has been running
git pull
# Sort the baseline profile, output to android/
sort -o android/src/main/baseline-prof.txt benchmark/build/outputs/managed_device_android_test_additional_output/benchmark/api31/BaselineProfileGenerator_generateBaselineProfile-baseline-prof.txt
# If the baseline profile has changed, commit it
if [[ $(git diff --stat android/src/main/baseline-prof.txt) != '' ]]; then
git add android/src/main/baseline-prof.txt
git commit -m "chore(android): refresh baseline profile" && git push
fi
# Upload the entire output folder and attach it to the CI run
- name: Attach baseline profile
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: Baseline profile output
path: benchmark/build/outputs/managed_device_android_test_additional_output
- name: Clean secrets
if: always()
run: scripts/signing-cleanup.sh
+32 -74
View File
@@ -12,100 +12,58 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
runs-on: macos-14
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Accept all SDK licenses
shell: bash
run: printf 'y\ny\ny\ny\ny\ny\n' | $ANDROID_HOME/tools/bin/sdkmanager --licenses
- name: Get build-tools directory
id: build-tools-path
shell: bash
run: echo "dir=${ANDROID_HOME}/build-tools/34.0.0-rc3" >> "${GITHUB_OUTPUT}"
- name: Cache build-tools
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ${{ steps.build-tools-path.outputs.dir }}
key: ${{ runner.os }}-34.0.0-rc3
- name: Set up JDK
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: temurin
java-version: 18
- name: Run unit tests
uses: gradle/gradle-build-action@40b6781dcdec2762ad36556682ac74e31030cfe2 # v2.5.1
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3
with:
arguments: --no-configuration-cache --stacktrace check -PslimTests
gradle-home-cache-cleanup: true
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
uses: mindsers/changelog-reader-action@32aa5b4c155d76c94e4ec883a223c947b2f02656 # v2.2.3
with:
path: ./CHANGELOG.md
validation_level: error
- name: Run unit tests
run: ./gradlew --no-configuration-cache --stacktrace check -PslimTests
- name: (Fail-only) Upload test report
if: failure()
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: Test report
path: android/build/reports
path: '**/build/reports/tests/**'
deploy-release-snapshot:
runs-on: ubuntu-latest
if: "github.event_name == 'push' && github.event.ref == 'refs/heads/main'"
needs: [ "check" ]
dependency-review:
runs-on: macos-14
if: "github.event_name == 'push' && github.event.ref != 'refs/heads/main'"
needs:
- check
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Accept all SDK licenses
shell: bash
run: printf 'y\ny\ny\ny\ny\ny\n' | $ANDROID_HOME/tools/bin/sdkmanager --licenses
- name: Get build-tools directory
id: build-tools-path
shell: bash
run: echo "dir=${ANDROID_HOME}/build-tools/34.0.0-rc3" >> "${GITHUB_OUTPUT}"
- name: Cache build-tools
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ${{ steps.build-tools-path.outputs.dir }}
key: ${{ runner.os }}-34.0.0-rc3
- name: Set up JDK
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with:
distribution: temurin
java-version: 18
- name: Decrypt secrets
run: |
./scripts/setup-age.sh
./scripts/signing-setup.sh "$ENCRYPT_KEY"
env:
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
- name: Build release app
uses: gradle/gradle-build-action@40b6781dcdec2762ad36556682ac74e31030cfe2 # v2.5.1
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
with:
arguments: --no-configuration-cache --stacktrace collectReleaseApks
gradle-home-cache-cleanup: true
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Clean secrets
run: scripts/signing-cleanup.sh
- name: Deploy snapshot
run: scripts/deploy-snapshot.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Dependency Review
uses: actions/dependency-review-action@9129d7d40b8c12c1ed0f60400d00c92d437adcce # v4
with:
base-ref: refs/heads/main
head-ref: ${{ github.ref }}
@@ -0,0 +1,75 @@
name: Code quality analysis
on:
push:
branches:
- main
- renovate/**
schedule:
- cron: '31 7 * * 3'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
security-events: write
jobs:
codeql:
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
with:
cache-read-only: true
- name: Initialize CodeQL
uses: github/codeql-action/init@3ab4101902695724f9365a384f86c1074d94e18c # v3.24.7
with:
languages: java
tools: latest
queries: +security-extended
- name: Build project
shell: bash
run: |
./gradlew assembleDebug assembleInternal
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@3ab4101902695724f9365a384f86c1074d94e18c # v3.24.7
with:
category: "/language:java"
mobsfscan:
name: MobSF
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
with:
python-version: 3.8
- name: Run mobsfscan
uses: MobSF/mobsfscan@e29e85c36fa1aa950d7f1b1064345d94a70b2a28
with:
args: . --sarif --output results.sarif || true
- name: Upload mobsfscan report
uses: github/codeql-action/upload-sarif@3ab4101902695724f9365a384f86c1074d94e18c # v3.24.7
with:
sarif_file: results.sarif
-66
View File
@@ -1,66 +0,0 @@
name: CodeQL
on:
workflow_dispatch:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: Accept all SDK licenses
shell: bash
run: printf 'y\ny\ny\ny\ny\ny\n' | $ANDROID_HOME/tools/bin/sdkmanager --licenses
- name: Get build-tools directory
id: build-tools-path
shell: bash
run: echo "dir=${ANDROID_HOME}/build-tools/34.0.0-rc3" >> "${GITHUB_OUTPUT}"
- name: Cache build-tools
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ${{ steps.build-tools-path.outputs.dir }}
key: ${{ runner.os }}-34.0.0-rc3
- name: Set up JDK
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
with:
distribution: temurin
java-version: 18
- name: Setup Gradle caching
uses: gradle/gradle-build-action@40b6781dcdec2762ad36556682ac74e31030cfe2 # v2.5.1
with:
gradle-home-cache-cleanup: true
cache-read-only: true
- name: Initialize CodeQL
uses: github/codeql-action/init@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2.20.1
with:
languages: java
tools: latest
queries: +security-extended
- name: Build project
shell: bash
run: |
./gradlew assemble -PslimTests
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@f6e388ebf0efc915c6c5b165b019ee61a6746a38 # v2.20.1
with:
category: "/language:java"
+21 -30
View File
@@ -1,59 +1,50 @@
name: Release to Google Play
on:
workflow_dispatch:
inputs:
inAppUpdatePriority:
description: 'In app update priority (0-5)'
type: number
default: "0"
required: false
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
publish-google-play-release:
runs-on: ubuntu-latest
runs-on: macos-14
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
token: ${{ secrets.POST_RELEASE_GH_TOKEN }}
fetch-depth: 0
- name: Accept all SDK licenses
shell: bash
run: printf 'y\ny\ny\ny\ny\ny\n' | $ANDROID_HOME/tools/bin/sdkmanager --licenses
- name: Get build-tools directory
id: build-tools-path
shell: bash
run: echo "dir=${ANDROID_HOME}/build-tools/34.0.0-rc3" >> "${GITHUB_OUTPUT}"
- name: Cache build-tools
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: ${{ steps.build-tools-path.outputs.dir }}
key: ${{ runner.os }}-34.0.0-rc3
- name: Set up JDK
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0
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
run: |
git config user.name "GitHub Actions"
git config user.email noreply@github.com
- name: Setup Gradle caching
uses: gradle/gradle-build-action@40b6781dcdec2762ad36556682ac74e31030cfe2 # v2.5.1
with:
gradle-home-cache-cleanup: true
cache-read-only: true
- name: Decrypt secrets
run: |
./scripts/setup-age.sh
./scripts/signing-setup.sh "$ENCRYPT_KEY"
./scripts/signing-setup.sh "$AGE_SECRET_KEY"
env:
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
AGE_SECRET_KEY: ${{ secrets.AGE_SECRET_KEY }}
- name: Get current version
shell: bash
@@ -79,14 +70,14 @@ jobs:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: |
./gradlew --no-configuration-cache collectReleaseApks collectReleaseBundle -PsentryUploadMappings
./gradlew --no-configuration-cache collectReleaseApks collectReleaseBundle -PenableSentry
- name: Clean secrets
run: scripts/signing-cleanup.sh
- name: Get changelog entry
id: changelog_reader
uses: mindsers/changelog-reader-action@b97ce03a10d9bdbb07beb491c76a5a01d78cd3ef # v2.2.2
uses: mindsers/changelog-reader-action@32aa5b4c155d76c94e4ec883a223c947b2f02656 # v2.2.3
with:
version: ${{ env.VERSION }}
path: ./CHANGELOG.md
@@ -97,11 +88,10 @@ jobs:
CHANGELOG: ${{ steps.changelog_reader.outputs.changes }}
run: |
mkdir -p distribution/whatsnew
printf '## Changelog\n\n' > distribution/whatsnew/whatsnew-en-GB
printf '%s' "${CHANGELOG}" >> distribution/whatsnew/whatsnew-en-GB
- name: Publish bundle to Google Play
uses: r0adkll/upload-google-play@70c7397e868b00eccd390222f492ab3e30520d09 # v1.1.1
uses: r0adkll/upload-google-play@935ef9c68bb393a8e6116b1575626a7f5be3a7fb # v1.1.3
with:
mappingFile: android/bundle/mapping.txt
packageName: dev.msfjarvis.claw.android
@@ -110,6 +100,7 @@ jobs:
status: completed
track: production
whatsNewDirectory: distribution/whatsnew
inAppUpdatePriority: ${{ inputs.inAppUpdatePriority }}
- name: Post-release work
shell: bash
+51
View File
@@ -0,0 +1,51 @@
name: Android release build
on:
workflow_dispatch:
inputs:
versionName:
description: 'User-facing release version name'
required: true
default: ""
versionCode:
description: 'versionCode or build number'
required: true
default: ''
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
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
./scripts/signing-cleanup.sh
env:
AGE_SECRET_KEY: ${{ secrets.AGE_SECRET_KEY }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
ORG_GRADLE_PROJECT_VERSION_NAME: ${{ github.event.inputs.versionName }}
ORG_GRADLE_PROJECT_VERSION_CODE: ${{ github.event.inputs.versionCode }}
- name: Upload app bundle
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: release-aab
path: android/build/outputs/bundle/release/android-release.aab
+1
View File
@@ -1,3 +1,4 @@
*.json
baseline-prof.txt
startup-prof.txt
**/test/resources/**
+143 -1
View File
@@ -7,6 +7,124 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [1.42.0] - 2024-03-16
### Fixed
* 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.
## [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
## [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
## [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
## [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
## [1.36.0] - 2023-10-04
### Added
* 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
## [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
## [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
### Changed
* 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
## [1.33.0] - 2023-07-31
### Changed
* 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
## [1.31.0] - 2023-07-25
### Added
* 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
## [1.30.0] - 2023-07-02
### Changed
@@ -250,7 +368,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Initial Play Store release
[Unreleased]: https://github.com/msfjarvis/compose-lobsters/compare/v1.30.0...HEAD
[Unreleased]: https://github.com/msfjarvis/compose-lobsters/compare/v1.42.0...HEAD
[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
+8 -26
View File
@@ -8,35 +8,17 @@ Unofficial Android app for read-only access to [lobste.rs](https://lobste.rs), b
height="80" />
</a>
> Snapshots from the development branch can be obtained [here](https://github.com/msfjarvis/compose-lobsters/releases/tag/nightly).
> [!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)
<img src="https://github.com/msfjarvis/compose-lobsters/blob/main/.github/readme_feature.webp"
alt="Side by side screenshots of the app's main page in dark and light UI modes"
height="550" />
<img src="https://github.com/msfjarvis/compose-lobsters/blob/main/.github/readme_feature_light.webp#gh-light-mode-only"
alt="A grid of screenshots from the app, in clockwise order: the main screen, the comments page, the search page and the saved posts page"
width="550" />
## Dependency Diagram
<img src="https://github.com/msfjarvis/compose-lobsters/blob/main/.github/readme_feature_dark.webp#gh-dark-mode-only"
alt="A grid of screenshots from the app, in clockwise order: the main screen, the comments page, the search page and the saved posts page"
width="550" />
```mermaid
%%{
init: {
'theme': 'neutral'
}
}%%
graph LR
benchmark --> android
android --> api
android --> common
android --> core
android --> database
android --> model
api --> model
common --> core
common --> database
common --> model
```
## License
See [LICENSE](LICENSE)
-1
View File
@@ -1 +0,0 @@
-dontobfuscate
+33 -18
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.
@@ -15,29 +15,42 @@ plugins {
id("dev.msfjarvis.claw.kotlin-kapt")
id("dev.msfjarvis.claw.sentry")
id("dev.msfjarvis.claw.versioning-plugin")
alias(libs.plugins.aboutlibraries)
alias(libs.plugins.anvil)
alias(libs.plugins.modulegraphassert)
alias(libs.plugins.whetstone)
alias(libs.plugins.baselineprofile)
alias(libs.plugins.licensee)
alias(libs.plugins.tracelog)
}
android {
namespace = "dev.msfjarvis.claw.android"
defaultConfig { applicationId = "dev.msfjarvis.claw.android" }
buildFeatures { compose = true }
defaultConfig.applicationId = "dev.msfjarvis.claw.android"
buildFeatures.compose = true
composeOptions {
useLiveLiterals = false
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
}
buildTypes {
create("benchmark") {
signingConfig = signingConfigs["debug"]
matchingFallbacks += "release"
isDebuggable = false
proguardFile("benchmark-rules.pro")
applicationIdSuffix = ".benchmark"
}
buildTypes.create("internal") {
matchingFallbacks += "release"
signingConfig = signingConfigs["debug"]
applicationIdSuffix = ".internal"
}
packaging { jniLibs { useLegacyPackaging = true } }
}
baselineProfile {
mergeIntoMain = true
saveInSrc = true
from(projects.benchmark.dependencyProject)
}
licensee {
allow("Apache-2.0")
allow("MIT")
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") }
}
moduleGraphAssert {
@@ -56,14 +69,14 @@ whetstone {
dependencies {
implementation(platform(libs.androidx.compose.bom))
implementation(platform(libs.okhttp.bom))
implementation(libs.accompanist.sysuicontroller)
implementation(libs.aboutLibraries.m3)
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.compose.material)
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.core.splashscreen)
implementation(libs.androidx.datastore.preferences)
implementation(libs.androidx.lifecycle.compose)
implementation(libs.androidx.navigation.compose)
implementation(libs.androidx.paging.compose)
@@ -71,19 +84,21 @@ dependencies {
implementation(libs.androidx.work.runtime)
implementation(libs.coil)
implementation(libs.copydown)
implementation(libs.crux)
implementation(libs.dagger)
implementation(libs.jsoup)
implementation(libs.kotlinx.collections.immutable)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.material3.pulltorefresh)
implementation(libs.napier)
implementation(libs.soloader)
implementation(libs.sqldelight.extensions.coroutines)
implementation(libs.swipe)
implementation(libs.unfurl)
implementation(projects.api)
implementation(projects.common)
implementation(projects.core)
implementation(projects.database)
implementation(projects.database.impl)
implementation(projects.model)
implementation(projects.web)
kapt(libs.dagger.compiler)
+12 -1
View File
@@ -1,4 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<issues format="6" by="lint 8.0.1" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.1)" variant="all" version="8.0.1">
<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">
<issue
id="VectorPath"
message="Very long vector path (918 characters), which is bad for performance. Considering reducing precision, removing minor details or rasterizing vector."
errorLine1=" android:pathData=&quot;M431.3,341.2C435.9,337 580.3,236 710.5,223.8C747.3,220.3 790.7,254.7 833.2,312.5C875.9,370.7 892.9,433.4 875.9,443C863.2,450.2 838.6,407.4 758.8,396.3C743.4,394.2 730.4,393.4 719.4,393.5C738.5,423.4 745.6,451.1 737.2,458C733.1,461.4 673.6,438.7 612.9,436.5C570.1,435 535.2,440.9 506.7,451.3C496.9,454.9 486,453.8 477.2,448.3C444.5,427.9 424.2,406.2 418.4,376.2C415.8,362.8 420.9,349.4 431.3,341.2ZM274.7,394.8C285.8,370.1 312.2,325.9 346.3,305.4C383.6,282.9 335,390.3 427.3,489.8C519.5,589.3 586.5,623.8 655.1,581.5C723.7,539.2 746.5,518.1 753,518.7C764,519.6 772.9,536.1 764.4,589.5C763,598.2 761.3,606.5 759.3,614.2C828.7,575 871.7,516.3 889,520C912,524.8 918.3,617.8 852.1,721C811.8,784 768.8,830.7 741.4,857.5C724.3,874 699.7,880 677,873.1C512,822.6 315.5,733.8 202.9,652C193.8,645.2 186.8,635.9 183,625.1C171.8,593.7 161.3,548.1 168.5,495.3C179.5,414.2 222.7,352.9 245.2,335.9C261.9,323.2 267.1,362.4 274.7,394.8Z&quot;"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="src/main/res/drawable/ic_launcher_foreground.xml"
line="17"
column="27"/>
</issue>
</issues>
+6 -1
View File
@@ -1,4 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
~ Copyright © 2021-2023 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.
-->
<resources>
<string name="app_name">Claw β</string>
</resources>
@@ -0,0 +1,9 @@
<!--
~ 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.
-->
<resources>
<string name="app_name">Claw 🤫</string>
</resources>
+43 -10
View File
@@ -1,4 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
~ 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"
xmlns:tools="http://schemas.android.com/tools">
@@ -20,6 +25,8 @@
<activity
android:name=".MainActivity"
android:configChanges="colorMode|density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
android:launchMode="singleTask"
android:taskAffinity=""
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -127,6 +134,19 @@
<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"
android:exported="true"
android:label="Claw Search"
android:launchMode="singleTask"
android:taskAffinity=""
android:theme="@style/Theme.Claw">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
@@ -141,23 +161,36 @@
android:value="androidx.startup"
tools:node="remove" />
</provider>
<!-- https://issuetracker.google.com/issues/258619948 -->
<receiver
android:name="androidx.profileinstaller.ProfileInstallReceiver"
android:permission="android.permission.DUMP"
android:name=".glance.WidgetReceiver"
android:exported="true">
<intent-filter>
<action android:name="androidx.profileinstaller.action.BENCHMARK_OPERATION" />
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
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" android:value="${sentryDsn}" />
<meta-data
android:name="io.sentry.dsn"
android:value="${sentryDsn}" />
<!-- enable automatic breadcrumbs for user interactions (clicks, swipes, scrolls) -->
<meta-data android:name="io.sentry.traces.user-interaction.enable" android:value="${enableSentry}" />
<meta-data android:name="io.sentry.breadcrumbs.user-interaction" android:value="${enableSentry}" />
<meta-data
android:name="io.sentry.traces.user-interaction.enable"
android:value="true" />
<meta-data
android:name="io.sentry.breadcrumbs.user-interaction"
android:value="true" />
<!-- enable screenshot for crashes -->
<meta-data android:name="io.sentry.attach-screenshot" android:value="${enableSentry}" />
<meta-data
android:name="io.sentry.attach-screenshot"
android:value="true" />
<!-- enable view hierarchy for crashes -->
<meta-data android:name="io.sentry.attach-view-hierarchy" android:value="${enableSentry}" />
<meta-data
android:name="io.sentry.attach-view-hierarchy"
android:value="true" />
<!-- set the environment for this build -->
<meta-data android:name="io.sentry.environment" android:value="${sentryEnvironment}" />
</application>
</manifest>
-38612
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@@ -0,0 +1,70 @@
/*
* 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
import android.app.assist.AssistContent
import android.graphics.Color
import android.net.Uri
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.SystemBarStyle
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Stable
import androidx.compose.ui.platform.LocalUriHandler
import com.deliveryhero.whetstone.Whetstone
import dev.msfjarvis.claw.android.viewmodel.ClawViewModel
import dev.msfjarvis.claw.common.comments.HTMLConverter
import dev.msfjarvis.claw.common.theme.LobstersTheme
import dev.msfjarvis.claw.common.urllauncher.UrlLauncher
import javax.inject.Inject
/** A base class that encapsulates all activities used by Claw. */
@Stable
abstract class BaseActivity : ComponentActivity() {
@Inject lateinit var urlLauncher: UrlLauncher
@Inject lateinit var htmlConverter: HTMLConverter
@Inject lateinit var viewModel: ClawViewModel
var webUri: String? = null
/** Entrypoint to show a [Composable] as this [ComponentActivity]'s view. */
@Composable abstract fun Content()
/** Overrideable method to call stuff in [onCreate]. */
open fun preLaunch() {}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
preLaunch()
Whetstone.inject(this)
enableEdgeToEdge(
statusBarStyle = SystemBarStyle.light(Color.TRANSPARENT, Color.TRANSPARENT),
navigationBarStyle = SystemBarStyle.light(Color.TRANSPARENT, Color.TRANSPARENT),
)
setContent {
LobstersTheme(
dynamicColor = true,
providedValues = arrayOf(LocalUriHandler provides urlLauncher),
) {
Content()
}
}
}
override fun onProvideAssistContent(outContent: AssistContent?) {
super.onProvideAssistContent(outContent)
if (outContent != null) {
if (webUri != null) {
outContent.webUri = Uri.parse(webUri)
} else {
outContent.webUri = null
}
}
}
}
@@ -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.
@@ -15,7 +15,6 @@ import androidx.work.WorkManager
import com.deliveryhero.whetstone.Whetstone
import com.deliveryhero.whetstone.app.ApplicationComponentOwner
import com.deliveryhero.whetstone.app.ContributesAppInjector
import com.facebook.soloader.SoLoader
import dev.msfjarvis.claw.android.work.SavedPostUpdaterWorker
import dev.msfjarvis.claw.core.injection.AppPlugin
import java.util.concurrent.TimeUnit
@@ -32,23 +31,15 @@ class ClawApplication : Application(), ApplicationComponentOwner {
override fun onCreate() {
Whetstone.inject(this)
super.onCreate()
SoLoader.init(this, false)
plugins.forEach { plugin -> plugin.apply(this) }
val postUpdateWorkRequest =
PeriodicWorkRequestBuilder<SavedPostUpdaterWorker>(POST_REFRESH_PERIOD, TimeUnit.HOURS)
.setConstraints(
Constraints.Builder()
.setRequiresCharging(false)
.setRequiresBatteryNotLow(true)
.setRequiredNetworkType(NetworkType.CONNECTED)
.setRequiresDeviceIdle(true)
.build()
)
.setConstraints(Constraints.Builder().setRequiredNetworkType(NetworkType.CONNECTED).build())
.build()
WorkManager.getInstance(this)
.enqueueUniquePeriodicWork(
"updateSavedPosts",
ExistingPeriodicWorkPolicy.UPDATE,
ExistingPeriodicWorkPolicy.KEEP,
postUpdateWorkRequest,
)
}
@@ -1,60 +1,39 @@
/*
* 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.
*/
package dev.msfjarvis.claw.android
import android.app.assist.AssistContent
import android.net.Uri
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi
import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass
import androidx.compose.runtime.Composable
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.core.view.WindowCompat
import com.deliveryhero.whetstone.Whetstone
import com.deliveryhero.whetstone.activity.ContributesActivityInjector
import dev.msfjarvis.claw.android.ui.LobstersApp
import dev.msfjarvis.claw.common.comments.HTMLConverter
import dev.msfjarvis.claw.common.urllauncher.UrlLauncher
import javax.inject.Inject
import dev.msfjarvis.claw.android.ui.screens.LobstersPostsScreen
@ContributesActivityInjector
class MainActivity : ComponentActivity() {
@Inject lateinit var urlLauncher: UrlLauncher
@Inject lateinit var htmlConverter: HTMLConverter
private var webUri: String? = null
class MainActivity : BaseActivity() {
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
installSplashScreen()
Whetstone.inject(this)
WindowCompat.setDecorFitsSystemWindows(window, false)
setContent {
val windowSizeClass = calculateWindowSizeClass(this)
LobstersApp(
urlLauncher = urlLauncher,
htmlConverter = htmlConverter,
windowSizeClass = windowSizeClass,
setWebUri = { url -> webUri = url },
)
}
@Composable
override fun Content() {
val windowSizeClass = calculateWindowSizeClass(this)
LobstersPostsScreen(
urlLauncher = urlLauncher,
htmlConverter = htmlConverter,
windowSizeClass = windowSizeClass,
setWebUri = { url -> webUri = url },
)
}
override fun onProvideAssistContent(outContent: AssistContent?) {
super.onProvideAssistContent(outContent)
if (outContent != null) {
if (webUri != null) {
outContent.webUri = Uri.parse(webUri)
} else {
outContent.webUri = null
}
}
override fun preLaunch() {
super.preLaunch()
installSplashScreen()
}
companion object {
const val NAVIGATION_KEY = "postId"
}
}
@@ -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.
*/
package dev.msfjarvis.claw.android
import androidx.compose.runtime.Composable
import com.deliveryhero.whetstone.activity.ContributesActivityInjector
import dev.msfjarvis.claw.android.ui.screens.SearchScreen
@ContributesActivityInjector
class SearchActivity : BaseActivity() {
@Composable
override fun Content() {
SearchScreen(
urlLauncher = urlLauncher,
htmlConverter = htmlConverter,
setWebUri = { webUri = it },
viewModel = viewModel,
)
}
}
@@ -0,0 +1,74 @@
/*
* 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.
*/
package dev.msfjarvis.claw.android.glance
import android.content.Context
import android.os.Build
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.unit.dp
import androidx.glance.GlanceId
import androidx.glance.GlanceModifier
import androidx.glance.GlanceTheme
import androidx.glance.appwidget.GlanceAppWidget
import androidx.glance.appwidget.appWidgetBackground
import androidx.glance.appwidget.lazy.LazyColumn
import androidx.glance.appwidget.lazy.items
import androidx.glance.appwidget.provideContent
import androidx.glance.background
import androidx.glance.layout.Alignment
import androidx.glance.layout.fillMaxSize
import androidx.glance.layout.padding
import androidx.glance.material3.ColorProviders
import androidx.glance.text.Text
import androidx.glance.text.TextStyle
import dev.msfjarvis.claw.common.theme.DarkThemeColors
import dev.msfjarvis.claw.common.theme.LightThemeColors
import dev.msfjarvis.claw.model.UIPost
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.toImmutableList
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.first
class SavedPostsWidget(private val posts: Flow<List<UIPost>>) : GlanceAppWidget() {
override suspend fun provideGlance(context: Context, id: GlanceId) {
val postWindow = posts.first().take(50).toImmutableList()
provideContent {
GlanceTheme(
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) GlanceTheme.colors
else ColorProviders(light = LightThemeColors, dark = DarkThemeColors)
) {
WidgetHost(postWindow)
}
}
}
}
@Composable
fun WidgetHost(posts: ImmutableList<UIPost>, modifier: GlanceModifier = GlanceModifier) {
LazyColumn(
modifier =
modifier.fillMaxSize().background(GlanceTheme.colors.background).appWidgetBackground(),
horizontalAlignment = Alignment.CenterHorizontally,
) {
item {
val style = MaterialTheme.typography.titleLarge
Text(
text = "Saved posts",
style =
TextStyle(
color = GlanceTheme.colors.onBackground,
fontSize = style.fontSize,
fontWeight = style.fontWeight.toGlance(),
fontStyle = style.fontStyle.toGlance(),
),
modifier = GlanceModifier.padding(vertical = 8.dp),
)
}
items(posts) { post -> WidgetListEntry(post = post) }
}
}
@@ -0,0 +1,76 @@
/*
* 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.
*/
package dev.msfjarvis.claw.android.glance
import android.content.Intent
import android.net.Uri
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.unit.dp
import androidx.glance.GlanceComposable
import androidx.glance.GlanceModifier
import androidx.glance.GlanceTheme
import androidx.glance.Image
import androidx.glance.ImageProvider
import androidx.glance.action.ActionParameters.Key
import androidx.glance.action.actionParametersOf
import androidx.glance.action.actionStartActivity
import androidx.glance.action.clickable
import androidx.glance.appwidget.action.actionStartActivity
import androidx.glance.appwidget.cornerRadius
import androidx.glance.background
import androidx.glance.layout.Alignment
import androidx.glance.layout.Box
import androidx.glance.layout.Row
import androidx.glance.layout.fillMaxWidth
import androidx.glance.layout.padding
import androidx.glance.text.Text
import androidx.glance.text.TextStyle
import dev.msfjarvis.claw.android.MainActivity
import dev.msfjarvis.claw.android.MainActivity.Companion.NAVIGATION_KEY
import dev.msfjarvis.claw.android.R
import dev.msfjarvis.claw.model.UIPost
private val destinationKey = Key<String>(NAVIGATION_KEY)
@Composable
@GlanceComposable
fun WidgetListEntry(post: UIPost, modifier: GlanceModifier = GlanceModifier) {
val titleStyle = MaterialTheme.typography.titleMedium
val commentsAction =
actionStartActivity<MainActivity>(actionParametersOf(destinationKey to post.shortId))
val postAction =
if (post.url.isNotEmpty()) actionStartActivity(Intent(Intent.ACTION_VIEW, Uri.parse(post.url)))
else commentsAction
Box(modifier.padding(8.dp)) {
Row(
verticalAlignment = Alignment.CenterVertically,
modifier =
GlanceModifier.fillMaxWidth()
.background(GlanceTheme.colors.surfaceVariant)
.cornerRadius(4.dp)
.padding(8.dp),
) {
Text(
text = post.title,
modifier = GlanceModifier.defaultWeight().padding(start = 4.dp).clickable(postAction),
style =
TextStyle(
color = GlanceTheme.colors.onSurfaceVariant,
fontSize = titleStyle.fontSize,
fontWeight = titleStyle.fontWeight.toGlance(),
fontStyle = titleStyle.fontStyle.toGlance(),
),
)
Image(
provider = ImageProvider(R.drawable.ic_comment),
contentDescription = "${post.commentCount} comments",
modifier = GlanceModifier.padding(end = 4.dp).clickable(commentsAction),
)
}
}
}
@@ -0,0 +1,30 @@
/*
* 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.
*/
package dev.msfjarvis.claw.android.glance
import android.content.Context
import android.content.Intent
import androidx.glance.appwidget.GlanceAppWidget
import androidx.glance.appwidget.GlanceAppWidgetReceiver
import com.deliveryhero.whetstone.Whetstone
import com.deliveryhero.whetstone.broadcastreceiver.ContributesBroadcastReceiverInjector
import dev.msfjarvis.claw.android.viewmodel.ClawViewModel
import javax.inject.Inject
@ContributesBroadcastReceiverInjector
class WidgetReceiver : GlanceAppWidgetReceiver() {
@Inject lateinit var viewModel: ClawViewModel
override val glanceAppWidget: GlanceAppWidget
get() = SavedPostsWidget(viewModel.savedPosts)
override fun onReceive(context: Context, intent: Intent) {
Whetstone.inject(this, context)
super.onReceive(context, intent)
}
}
@@ -0,0 +1,27 @@
/*
* Copyright © 2023 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.glance
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight
fun FontWeight?.toGlance(): androidx.glance.text.FontWeight? {
return when (this) {
FontWeight.Normal -> androidx.glance.text.FontWeight.Normal
FontWeight.Medium -> androidx.glance.text.FontWeight.Medium
FontWeight.Bold -> androidx.glance.text.FontWeight.Bold
else -> null
}
}
fun FontStyle?.toGlance(): androidx.glance.text.FontStyle? {
return when (this) {
FontStyle.Normal -> androidx.glance.text.FontStyle.Normal
FontStyle.Italic -> androidx.glance.text.FontStyle.Italic
else -> null
}
}
@@ -1,42 +0,0 @@
/*
* Copyright © 2023 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.injection
import android.content.Context
import androidx.datastore.core.DataStore
import androidx.datastore.preferences.core.PreferenceDataStoreFactory
import androidx.datastore.preferences.core.Preferences
import androidx.datastore.preferences.preferencesDataStoreFile
import com.deliveryhero.whetstone.ForScope
import com.deliveryhero.whetstone.app.ApplicationScope
import com.squareup.anvil.annotations.ContributesTo
import dagger.Module
import dagger.Provides
import dev.msfjarvis.claw.core.coroutines.DispatcherProvider
import javax.inject.Singleton
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.SupervisorJob
@Module
@ContributesTo(ApplicationScope::class)
class DataStoreModule {
@Singleton
@Provides
fun provideLoginDatastore(
@ForScope(ApplicationScope::class) context: Context,
dispatcherProvider: DispatcherProvider,
): DataStore<Preferences> {
return PreferenceDataStoreFactory.create(
corruptionHandler = null,
migrations = emptyList(),
scope = CoroutineScope(dispatcherProvider.io() + SupervisorJob()),
) {
context.preferencesDataStoreFile("login")
}
}
}
@@ -16,5 +16,5 @@ import dev.msfjarvis.claw.common.comments.HTMLConverter
@Module
@ContributesTo(ApplicationScope::class)
interface HTMLConverterModule {
@Binds fun HTMLConverterImpl.bind(): HTMLConverter
@Binds fun bindHTMLConverter(impl: HTMLConverterImpl): HTMLConverter
}
@@ -1,25 +1,38 @@
/*
* Copyright © 2021-2022 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.
*/
package dev.msfjarvis.claw.android.injection
import com.chimbori.crux.Crux
import com.deliveryhero.whetstone.app.ApplicationScope
import com.squareup.anvil.annotations.ContributesTo
import dagger.Module
import dagger.Provides
import io.github.aakira.napier.Napier
import me.saket.unfurl.UnfurlLogger
import me.saket.unfurl.Unfurler
import okhttp3.OkHttpClient
@Module
@ContributesTo(ApplicationScope::class)
object MetadataExtractorModule {
@Provides
fun provideCrux(
okHttpClient: OkHttpClient,
): Crux {
return Crux(okHttpClient = okHttpClient)
fun provideUnfurlLogger(): UnfurlLogger {
return object : UnfurlLogger {
override fun log(message: String) {
Napier.d { message }
}
override fun log(e: Throwable, message: String) {
Napier.e(e) { message }
}
}
}
@Provides
fun provideUnfurler(okHttpClient: OkHttpClient, logger: UnfurlLogger): Unfurler {
return Unfurler(httpClient = okHttpClient, logger = logger)
}
}
@@ -1,5 +1,5 @@
/*
* Copyright © 2021-2022 Harsh Shandilya.
* Copyright © 2021-2023 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,9 +7,9 @@
package dev.msfjarvis.claw.android.injection
import android.content.Context
import com.deliveryhero.whetstone.ForScope
import com.deliveryhero.whetstone.activity.ActivityScope
import com.squareup.anvil.annotations.ContributesTo
import com.squareup.anvil.annotations.optional.ForScope
import dagger.Module
import dagger.Provides
import dev.msfjarvis.claw.common.urllauncher.UrlLauncher
@@ -1,5 +1,5 @@
/*
* Copyright © 2022 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.
@@ -17,18 +17,14 @@ import dev.msfjarvis.claw.core.injection.AppPlugin
import javax.inject.Inject
@ContributesMultibinding(ApplicationScope::class)
class WorkManagerPlugin
@Inject
constructor(
private val workerFactory: WorkerFactory,
) : AppPlugin {
class WorkManagerPlugin @Inject constructor(private val workerFactory: WorkerFactory) : AppPlugin {
override fun apply(application: Application) {
WorkManager.initialize(
application,
Configuration.Builder()
.setWorkerFactory(workerFactory)
.setMinimumLoggingLevel(Log.DEBUG)
.build()
.build(),
)
}
}
@@ -0,0 +1,75 @@
/*
* Copyright © 2021-2023 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.paging
import androidx.paging.PagingSource
import androidx.paging.PagingState
import com.slack.eithernet.ApiResult
import dagger.assisted.Assisted
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.api.LobstersSearchApi
import dev.msfjarvis.claw.core.injection.IODispatcher
import dev.msfjarvis.claw.model.LobstersPost
import java.io.IOException
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.withContext
/**
* Specialized variant of [LobstersPagingSource] to prevent hammering the Lobsters search endpoint
* with unnecessary requests. Rather than abstract out the API call this paging source takes in the
* relevant parameters to short-circuit when there is no query specified in order to avoid calling
* the API at all.
*/
class SearchPagingSource
@AssistedInject
constructor(
private val searchApi: LobstersSearchApi,
@Assisted private val queryProvider: () -> String,
@IODispatcher private val ioDispatcher: CoroutineDispatcher,
) : PagingSource<Int, LobstersPost>() {
override fun getRefreshKey(state: PagingState<Int, LobstersPost>): Int? {
return state.anchorPosition?.let { anchorPosition ->
(anchorPosition / PAGE_SIZE).coerceAtLeast(STARTING_PAGE_INDEX)
}
}
override suspend fun load(params: LoadParams<Int>): LoadResult<Int, LobstersPost> {
val searchQuery = queryProvider()
// If there is no query, we don't need to call the API at all.
if (searchQuery.isEmpty()) {
return LoadResult.Page(itemsBefore = 0, data = emptyList(), prevKey = null, nextKey = null)
}
val page = params.key ?: STARTING_PAGE_INDEX
val result = withContext(ioDispatcher) { searchApi.searchPosts(searchQuery, page) }
return when (result) {
is ApiResult.Success -> {
// Optimization: prevent fetching more pages if we found no items, this means
// there is no active search query.
val nextKey = if (result.value.isEmpty()) null else page + 1
LoadResult.Page(
itemsBefore = (page - 1) * PAGE_SIZE,
data = result.value,
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.ApiFailure ->
LoadResult.Error(IOException("API returned an invalid response"))
}
}
@AssistedFactory
interface Factory {
fun create(queryProvider: () -> String): SearchPagingSource
}
}
@@ -1,23 +0,0 @@
/*
* Copyright © 2023 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.settings
import androidx.datastore.core.DataStore
import androidx.datastore.preferences.core.Preferences
import androidx.datastore.preferences.core.stringPreferencesKey
import javax.inject.Inject
class LoginSettings
@Inject
constructor(
val dataStore: DataStore<Preferences>,
) {
companion object {
val CSRF_TOKEN = stringPreferencesKey("csrf_token")
val LOGIN_COOKIE = stringPreferencesKey("login_cookie")
}
}
@@ -1,270 +0,0 @@
/*
* Copyright © 2021-2023 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
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.layout.Row
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.material.icons.filled.ImportExport
import androidx.compose.material.icons.filled.NewReleases
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.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.Scaffold
import androidx.compose.material3.SnackbarHost
import androidx.compose.material3.SnackbarHostState
import androidx.compose.material3.Text
import androidx.compose.material3.windowsizeclass.WindowSizeClass
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.semantics.testTagsAsResourceId
import androidx.compose.ui.text.font.FontWeight
import androidx.navigation.NavType
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.paging.compose.collectAsLazyPagingItems
import com.deliveryhero.whetstone.compose.injectedViewModel
import dev.msfjarvis.claw.android.R
import dev.msfjarvis.claw.android.ui.datatransfer.DataTransferScreen
import dev.msfjarvis.claw.android.ui.decorations.ClawNavigationBar
import dev.msfjarvis.claw.android.ui.decorations.ClawNavigationRail
import dev.msfjarvis.claw.android.ui.decorations.NavigationItem
import dev.msfjarvis.claw.android.ui.decorations.TransparentSystemBars
import dev.msfjarvis.claw.android.ui.lists.DatabasePosts
import dev.msfjarvis.claw.android.ui.lists.NetworkPosts
import dev.msfjarvis.claw.android.ui.navigation.ClawNavigationType
import dev.msfjarvis.claw.android.ui.navigation.Destinations
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.theme.LobstersTheme
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.coroutines.launch
@OptIn(ExperimentalComposeUiApi::class)
@Composable
fun LobstersApp(
urlLauncher: UrlLauncher,
htmlConverter: HTMLConverter,
windowSizeClass: WindowSizeClass,
setWebUri: (String?) -> Unit,
modifier: Modifier = Modifier,
viewModel: ClawViewModel = injectedViewModel(),
) {
val hottestListState = rememberLazyListState()
val newestListState = rememberLazyListState()
val savedListState = rememberLazyListState()
val navController = rememberNavController()
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 hottestPosts = viewModel.hottestPosts.collectAsLazyPagingItems()
val newestPosts = viewModel.newestPosts.collectAsLazyPagingItems()
val savedPosts by viewModel.savedPosts.collectAsState(persistentMapOf())
val navigationType = ClawNavigationType.fromSize(windowSizeClass.widthSizeClass)
LobstersTheme(
dynamicColor = true,
providedValues = arrayOf(LocalUriHandler provides urlLauncher),
) {
val navItems =
persistentListOf(
NavigationItem(
label = "Hottest",
route = Destinations.Hottest.route,
icon = Icons.Outlined.Whatshot,
selectedIcon = Icons.Filled.Whatshot,
) {
coroutineScope.launch { hottestListState.animateScrollToItem(index = 0) }
},
NavigationItem(
label = "Newest",
route = Destinations.Newest.route,
icon = Icons.Outlined.NewReleases,
selectedIcon = Icons.Filled.NewReleases,
) {
coroutineScope.launch { newestListState.animateScrollToItem(index = 0) }
},
NavigationItem(
label = "Saved",
route = Destinations.Saved.route,
icon = Icons.Outlined.FavoriteBorder,
selectedIcon = Icons.Filled.Favorite,
) {
coroutineScope.launch { savedListState.animateScrollToItem(index = 0) }
},
)
TransparentSystemBars()
Scaffold(
topBar = {
ClawAppBar(
navigationIcon = {
if (
navController.previousBackStackEntry != null &&
navItems.none { it.route == currentDestination }
) {
IconButton(
onClick = { if (!navController.popBackStack()) context.getActivity()?.finish() }
) {
Icon(
imageVector = Icons.Filled.ArrowBack,
contentDescription = "Go back to previous screen",
)
}
}
},
title = {
if (navItems.any { it.route == currentDestination }) {
Text(text = stringResource(R.string.app_name), fontWeight = FontWeight.Bold)
}
},
actions = {
if (navItems.any { it.route == currentDestination }) {
IconButton(onClick = { navController.navigate(Destinations.DataTransfer.route) }) {
Icon(
imageVector = Icons.Filled.ImportExport,
contentDescription = "Data transfer options"
)
}
}
},
)
},
bottomBar = {
AnimatedVisibility(visible = navigationType == ClawNavigationType.BOTTOM_NAVIGATION) {
ClawNavigationBar(
navController = navController,
items = navItems,
isVisible = navItems.any { it.route == currentDestination },
)
}
},
snackbarHost = { SnackbarHost(snackbarHostState) },
modifier = modifier.semantics { testTagsAsResourceId = true },
) { paddingValues ->
Row(modifier = Modifier.padding(paddingValues)) {
AnimatedVisibility(visible = navigationType == ClawNavigationType.NAVIGATION_RAIL) {
ClawNavigationRail(
navController = navController,
items = navItems,
isVisible = navItems.any { it.route == currentDestination },
)
}
NavHost(
navController = navController,
startDestination = Destinations.startDestination.route,
// Make animations 2x faster than default specs
enterTransition = { fadeIn(animationSpec = tween(350)) },
exitTransition = { fadeOut(animationSpec = tween(350)) },
) {
val uri = LobstersApi.BASE_URL
composable(route = Destinations.Hottest.route) {
setWebUri("https://lobste.rs/")
NetworkPosts(
lazyPagingItems = hottestPosts,
listState = hottestListState,
isPostSaved = viewModel::isPostSaved,
postActions = postActions,
)
}
composable(route = Destinations.Newest.route) {
setWebUri("https://lobste.rs/")
NetworkPosts(
lazyPagingItems = newestPosts,
listState = newestListState,
isPostSaved = viewModel::isPostSaved,
postActions = postActions,
)
}
composable(route = Destinations.Saved.route) {
setWebUri(null)
DatabasePosts(
items = savedPosts,
listState = savedListState,
postActions = postActions,
)
}
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"))
setWebUri("https://lobste.rs/s/$postId")
CommentsPage(
postId = postId,
postActions = postActions,
htmlConverter = htmlConverter,
getSeenComments = viewModel::getSeenComments,
markSeenComments = viewModel::markSeenComments,
)
}
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"))
setWebUri("https://lobste.rs/u/$username")
UserProfile(
username = username,
getProfile = viewModel::getUserProfile,
)
}
composable(route = Destinations.DataTransfer.route) {
DataTransferScreen(
context = context,
dataTransferRepository = viewModel.dataTransferRepository,
snackbarHostState = snackbarHostState,
)
}
}
}
}
}
}
@@ -1,136 +0,0 @@
/*
* Copyright © 2023 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.datatransfer
import android.content.Context
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts.CreateDocument
import androidx.activity.result.contract.ActivityResultContracts.GetContent
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.height
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Download
import androidx.compose.material.icons.filled.Upload
import androidx.compose.material3.Icon
import androidx.compose.material3.ListItem
import androidx.compose.material3.SnackbarHostState
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.unit.dp
import dev.msfjarvis.claw.android.viewmodel.DataTransferRepository
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
private const val MIME_TYPE = "application/json"
@Composable
fun DataTransferScreen(
context: Context,
dataTransferRepository: DataTransferRepository,
snackbarHostState: SnackbarHostState,
modifier: Modifier = Modifier,
) {
val coroutineScope = rememberCoroutineScope()
Column(modifier = modifier) {
ImportOption(context, coroutineScope, dataTransferRepository, snackbarHostState)
ExportOption(context, coroutineScope, dataTransferRepository, snackbarHostState)
}
}
@Composable
private fun ImportOption(
context: Context,
coroutineScope: CoroutineScope,
dataTransferRepository: DataTransferRepository,
snackbarHostState: SnackbarHostState,
) {
val importAction =
rememberLauncherForActivityResult(GetContent()) { uri ->
if (uri == null) {
coroutineScope.launch { snackbarHostState.showSnackbarDismissing("No file selected") }
return@rememberLauncherForActivityResult
}
coroutineScope.launch {
context.contentResolver.openInputStream(uri)?.use { stream ->
dataTransferRepository.importPosts(stream)
snackbarHostState.showSnackbarDismissing("Successfully imported posts")
}
}
}
SettingsActionItem(
title = "Import saved posts",
description = "Import saved posts from a previously generated export",
icon = Icons.Filled.Download,
) {
importAction.launch(MIME_TYPE)
}
}
@Composable
private fun ExportOption(
context: Context,
coroutineScope: CoroutineScope,
dataTransferRepository: DataTransferRepository,
snackbarHostState: SnackbarHostState,
) {
val exportAction =
rememberLauncherForActivityResult(CreateDocument(MIME_TYPE)) { uri ->
if (uri == null) {
coroutineScope.launch { snackbarHostState.showSnackbarDismissing("No file selected") }
return@rememberLauncherForActivityResult
}
coroutineScope.launch {
context.contentResolver.openOutputStream(uri)?.use { stream ->
dataTransferRepository.exportPosts(stream)
snackbarHostState.showSnackbarDismissing("Successfully exported posts")
}
}
}
SettingsActionItem(
title = "Export posts to file",
description = "Write all saved posts into a JSON file that can be imported at a later date",
icon = Icons.Filled.Upload,
) {
exportAction.launch("claw-export.json")
}
}
@Composable
private fun SettingsActionItem(
title: String,
modifier: Modifier = Modifier,
description: String? = null,
icon: ImageVector? = null,
onClick: (() -> Unit)? = null,
) {
ListItem(
headlineContent = { Text(title) },
supportingContent = { description?.let { Text(it) } },
leadingContent = {
icon?.let {
Icon(
imageVector = icon,
contentDescription = null,
modifier = Modifier.height(32.dp),
)
}
},
modifier = modifier.clickable { onClick?.invoke() },
)
}
/** Shows a Snackbar but dismisses any existing ones first. */
private suspend fun SnackbarHostState.showSnackbarDismissing(
text: String,
) {
currentSnackbarData?.dismiss()
showSnackbar(text)
}
@@ -1,25 +0,0 @@
/*
* Copyright © 2023 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.decorations
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.ui.graphics.Color
import com.google.accompanist.systemuicontroller.rememberSystemUiController
@Composable
fun TransparentSystemBars() {
val systemUiController = rememberSystemUiController()
val useDarkIcons = !isSystemInDarkTheme()
DisposableEffect(systemUiController, useDarkIcons) {
systemUiController.setSystemBarsColor(color = Color.Transparent, darkIcons = useDarkIcons)
onDispose {}
}
}
@@ -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,9 +16,8 @@ import dev.msfjarvis.claw.android.ui.navigation.Destinations
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.database.local.SavedPost
import dev.msfjarvis.claw.model.LinkMetadata
import dev.msfjarvis.claw.model.LobstersPostDetails
import dev.msfjarvis.claw.model.UIPost
fun Context.getActivity(): ComponentActivity? {
return when (this) {
@@ -36,14 +35,16 @@ fun rememberPostActions(
): PostActions {
return remember {
object : PostActions {
override fun viewPost(postUrl: String, commentsUrl: String) {
override fun viewPost(postId: String, postUrl: String, commentsUrl: String) {
viewModel.markPostAsRead(postId)
urlLauncher.openUri(postUrl.ifEmpty { commentsUrl })
}
override fun viewComments(postId: String) {
viewModel.markPostAsRead(postId)
val currentRoute = navController.currentDestination?.route
val newRoute =
Destinations.Comments.route.replace(Destinations.Comments.placeholder, postId)
Destinations.Comments.route.replace(Destinations.Comments.PLACEHOLDER, postId)
if (currentRoute != Destinations.Comments.route) navController.navigate(newRoute)
}
@@ -57,11 +58,11 @@ fun rememberPostActions(
urlLauncher.openUri(commentsUrl.replaceAfterLast('/', "r"))
}
override fun toggleSave(post: SavedPost) {
override fun toggleSave(post: UIPost) {
viewModel.toggleSave(post)
}
override suspend fun getComments(postId: String): LobstersPostDetails {
override suspend fun getComments(postId: String): UIPost {
return viewModel.getPostComments(postId)
}
@@ -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.
@@ -17,7 +17,7 @@ import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Inbox
import androidx.compose.material3.Divider
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
@@ -27,14 +27,13 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import dev.msfjarvis.claw.common.posts.PostActions
import dev.msfjarvis.claw.common.ui.decorations.MonthHeader
import dev.msfjarvis.claw.database.local.SavedPost
import java.time.Month
import dev.msfjarvis.claw.model.UIPost
import kotlinx.collections.immutable.ImmutableMap
@OptIn(ExperimentalFoundationApi::class)
@Composable
fun DatabasePosts(
items: ImmutableMap<Month, List<SavedPost>>,
items: ImmutableMap<String, List<UIPost>>,
listState: LazyListState,
postActions: PostActions,
modifier: Modifier = Modifier,
@@ -53,17 +52,10 @@ fun DatabasePosts(
} else {
LazyColumn(state = listState) {
items.forEach { (month, posts) ->
stickyHeader(contentType = "month-header") { MonthHeader(month = month) }
items(
items = posts,
contentType = { "LobstersItem" },
) { item ->
ListItem(
item = item,
isSaved = { true },
postActions = postActions,
)
Divider()
stickyHeader(contentType = "month-header") { MonthHeader(label = month) }
items(items = posts, key = { it.shortId }, contentType = { "LobstersItem" }) { item ->
LobstersListItem(item = item, refresh = {}, postActions = postActions)
HorizontalDivider()
}
}
}
@@ -1,31 +0,0 @@
/*
* Copyright © 2021-2022 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 androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.produceState
import androidx.compose.ui.Modifier
import dev.msfjarvis.claw.common.posts.LobstersCard
import dev.msfjarvis.claw.common.posts.PostActions
import dev.msfjarvis.claw.database.local.SavedPost
@Composable
fun ListItem(
item: SavedPost,
isSaved: suspend (SavedPost) -> Boolean,
postActions: PostActions,
modifier: Modifier = Modifier,
) {
val saved by produceState(false, item) { value = isSaved(item) }
LobstersCard(
post = item,
isSaved = saved,
postActions = postActions,
modifier = modifier,
)
}
@@ -0,0 +1,38 @@
/*
* 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.lists
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.Reply
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
import dev.msfjarvis.claw.common.posts.PostActions
import dev.msfjarvis.claw.model.UIPost
import me.saket.swipe.SwipeAction
import me.saket.swipe.SwipeableActionsBox
@Composable
fun LobstersListItem(
item: UIPost,
postActions: PostActions,
refresh: () -> Unit,
modifier: Modifier = Modifier,
) {
val commentsAction =
SwipeAction(
icon = rememberVectorPainter(Icons.AutoMirrored.Filled.Reply),
background = MaterialTheme.colorScheme.tertiary,
onSwipe = { postActions.viewCommentsPage(item.commentsUrl) },
)
SwipeableActionsBox(endActions = listOf(commentsAction)) {
LobstersCard(post = item, postActions = postActions, refresh = refresh, modifier = modifier)
}
}
@@ -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.
@@ -14,13 +14,8 @@ 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.material.ExperimentalMaterialApi
import androidx.compose.material.pullrefresh.PullRefreshIndicator
import androidx.compose.material.pullrefresh.pullRefresh
import androidx.compose.material.pullrefresh.rememberPullRefreshState
import androidx.compose.material3.Divider
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.contentColorFor
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.HorizontalDivider
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@@ -28,25 +23,26 @@ import androidx.compose.ui.unit.dp
import androidx.paging.LoadState
import androidx.paging.compose.LazyPagingItems
import androidx.paging.compose.itemContentType
import androidx.paging.compose.itemKey
import dev.msfjarvis.claw.common.posts.PostActions
import dev.msfjarvis.claw.common.posts.toDbModel
import dev.msfjarvis.claw.common.ui.NetworkError
import dev.msfjarvis.claw.common.ui.ProgressBar
import dev.msfjarvis.claw.database.local.SavedPost
import dev.msfjarvis.claw.model.LobstersPost
import dev.msfjarvis.claw.model.UIPost
import eu.bambooapps.material3.pullrefresh.PullRefreshIndicator
import eu.bambooapps.material3.pullrefresh.pullRefresh
import eu.bambooapps.material3.pullrefresh.rememberPullRefreshState
@OptIn(ExperimentalMaterialApi::class)
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun NetworkPosts(
lazyPagingItems: LazyPagingItems<LobstersPost>,
lazyPagingItems: LazyPagingItems<UIPost>,
listState: LazyListState,
isPostSaved: suspend (SavedPost) -> Boolean,
postActions: PostActions,
modifier: Modifier = Modifier,
) {
ReportDrawnWhen { lazyPagingItems.itemCount > 0 }
val refreshLoadState = lazyPagingItems.loadState.refresh
val isRefreshing = refreshLoadState == LoadState.Loading
val isRefreshing = refreshLoadState == LoadState.Loading && lazyPagingItems.itemCount == 0
val pullRefreshState = rememberPullRefreshState(isRefreshing, lazyPagingItems::refresh)
Box(modifier = modifier.fillMaxSize().pullRefresh(pullRefreshState)) {
if (lazyPagingItems.itemCount == 0 && refreshLoadState is LoadState.Error) {
@@ -56,23 +52,20 @@ fun NetworkPosts(
modifier = Modifier.align(Alignment.Center),
)
} else {
LazyColumn(
state = listState,
) {
LazyColumn(state = listState) {
items(
count = lazyPagingItems.itemCount,
key = lazyPagingItems.itemKey { it.shortId },
contentType = lazyPagingItems.itemContentType { "LobstersItem" },
) { index ->
val item = lazyPagingItems[index]
if (item != null) {
val dbModel = item.toDbModel()
ListItem(
item = dbModel,
isSaved = isPostSaved,
LobstersListItem(
item = item,
postActions = postActions,
refresh = { lazyPagingItems.refresh() },
)
Divider()
HorizontalDivider()
}
}
if (lazyPagingItems.loadState.append == LoadState.Loading) {
@@ -81,7 +74,7 @@ fun NetworkPosts(
modifier =
Modifier.fillMaxWidth()
.wrapContentWidth(Alignment.CenterHorizontally)
.padding(vertical = 16.dp),
.padding(vertical = 16.dp)
)
}
}
@@ -91,8 +84,7 @@ fun NetworkPosts(
refreshing = isRefreshing,
state = pullRefreshState,
modifier = Modifier.align(Alignment.TopCenter),
backgroundColor = MaterialTheme.colorScheme.surface,
contentColor = contentColorFor(MaterialTheme.colorScheme.surface),
shadowElevation = 6.dp, // From M2 implementation
)
}
}
@@ -0,0 +1,54 @@
/*
* 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.
*/
package dev.msfjarvis.claw.android.ui.lists
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.testTag
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 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>>,
listState: LazyListState,
postActions: PostActions,
searchQuery: String,
setSearchQuery: (String) -> Unit,
modifier: Modifier = Modifier,
) {
val lazyPagingItems = items.collectAsLazyPagingItems()
val triggerSearch = { query: String ->
setSearchQuery(query)
lazyPagingItems.refresh()
}
Column(modifier = modifier.semantics { isTraversalGroup = true }.zIndex(1f).fillMaxWidth()) {
SearchBar(
value = searchQuery,
onValueChange = setSearchQuery,
onSearch = { triggerSearch(it) },
modifier = Modifier.fillMaxWidth().padding(horizontal = 8.dp).testTag("search_bar"),
)
NetworkPosts(
lazyPagingItems = lazyPagingItems,
listState = listState,
postActions = postActions,
)
}
}
@@ -0,0 +1,45 @@
/*
* 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.
*/
package dev.msfjarvis.claw.android.ui.login
import android.webkit.CookieManager
import android.webkit.WebView
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import com.google.accompanist.web.AccompanistWebViewClient
import com.google.accompanist.web.WebView
import com.google.accompanist.web.rememberWebViewState
import dev.msfjarvis.claw.api.LobstersApi
import io.github.aakira.napier.Napier
import okhttp3.HttpUrl.Companion.toHttpUrl
@Suppress("Unused")
@Composable
fun LobstersLoginWebView(modifier: Modifier = Modifier) {
val state = rememberWebViewState(url = "https://lobste.rs/login")
val webClient = remember {
object : AccompanistWebViewClient() {
override fun onPageFinished(view: WebView, url: String?) {
super.onPageFinished(view, url)
Napier.d(tag = "WebView") { "onPageFinished(url=$url)" }
if (url != null && url.toHttpUrl() == LobstersApi.BASE_URL.toHttpUrl()) {
val cookies = CookieManager.getInstance().getCookie(LobstersApi.BASE_URL)
val trap =
cookies
.split(";")
.associate {
val split = it.split("=")
split[0] to split[1]
}["lobsters_trap"]
Napier.d(tag = "WebView") { "lobsters_trap=${trap}" }
}
}
}
}
WebView(state = state, client = webClient, modifier = modifier, captureBackPresses = false)
}
@@ -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.
@@ -9,30 +9,38 @@ package dev.msfjarvis.claw.android.ui.navigation
sealed class Destinations {
abstract val route: String
object Hottest : Destinations() {
data object Hottest : Destinations() {
override val route = "hottest"
}
object Newest : Destinations() {
data object Newest : Destinations() {
override val route = "newest"
}
object Saved : Destinations() {
data object Saved : Destinations() {
override val route = "saved"
}
object Comments : Destinations() {
const val placeholder = "{postId}"
override val route = "comments/$placeholder"
data object Comments : Destinations() {
const val PLACEHOLDER = "{postId}"
override val route = "comments/$PLACEHOLDER"
}
object User : Destinations() {
const val placeholder = "{username}"
override val route = "user/$placeholder"
data object User : Destinations() {
const val PLACEHOLDER = "{username}"
override val route = "user/$PLACEHOLDER"
}
object DataTransfer : Destinations() {
override val route: String = "datatransfer"
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 {
@@ -0,0 +1,296 @@
/*
* 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.screens
import android.content.Intent
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
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.material.icons.filled.NewReleases
import androidx.compose.material.icons.filled.Search
import androidx.compose.material.icons.filled.Tune
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.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.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.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
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.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.paging.compose.collectAsLazyPagingItems
import com.deliveryhero.whetstone.compose.injectedViewModel
import com.mikepenz.aboutlibraries.ui.compose.m3.LibrariesContainer
import dev.msfjarvis.claw.android.MainActivity
import dev.msfjarvis.claw.android.R
import dev.msfjarvis.claw.android.SearchActivity
import dev.msfjarvis.claw.android.ui.decorations.ClawNavigationBar
import dev.msfjarvis.claw.android.ui.decorations.ClawNavigationRail
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.ClawNavigationType
import dev.msfjarvis.claw.android.ui.navigation.Destinations
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.coroutines.launch
@OptIn(ExperimentalComposeUiApi::class)
@Composable
fun LobstersPostsScreen(
urlLauncher: UrlLauncher,
htmlConverter: HTMLConverter,
windowSizeClass: WindowSizeClass,
setWebUri: (String?) -> Unit,
modifier: Modifier = Modifier,
viewModel: ClawViewModel = injectedViewModel(),
) {
val hottestListState = rememberLazyListState()
val newestListState = rememberLazyListState()
val savedListState = rememberLazyListState()
val navController = rememberNavController()
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 hottestPosts = viewModel.hottestPosts.collectAsLazyPagingItems()
val newestPosts = viewModel.newestPosts.collectAsLazyPagingItems()
val savedPosts by viewModel.savedPostsByMonth.collectAsState(persistentMapOf())
val navigationType = ClawNavigationType.fromSize(windowSizeClass.widthSizeClass)
val postIdOverride = context.getActivity()?.intent?.extras?.getString(MainActivity.NAVIGATION_KEY)
LaunchedEffect(false) {
if (postIdOverride != null) {
navController.navigate(
Destinations.Comments.route.replace(Destinations.Comments.PLACEHOLDER, postIdOverride)
)
}
}
val navItems =
persistentListOf(
NavigationItem(
label = "Hottest",
route = Destinations.Hottest.route,
icon = Icons.Outlined.Whatshot,
selectedIcon = Icons.Filled.Whatshot,
) {
coroutineScope.launch { hottestListState.animateScrollToItem(index = 0) }
},
NavigationItem(
label = "Newest",
route = Destinations.Newest.route,
icon = Icons.Outlined.NewReleases,
selectedIcon = Icons.Filled.NewReleases,
) {
coroutineScope.launch { newestListState.animateScrollToItem(index = 0) }
},
NavigationItem(
label = "Saved",
route = Destinations.Saved.route,
icon = Icons.Outlined.FavoriteBorder,
selectedIcon = Icons.Filled.Favorite,
) {
coroutineScope.launch { savedListState.animateScrollToItem(index = 0) }
},
)
Scaffold(
topBar = {
ClawAppBar(
navigationIcon = {
if (
navController.previousBackStackEntry != null &&
navItems.none { it.route == currentDestination }
) {
IconButton(
onClick = { if (!navController.popBackStack()) context.getActivity()?.finish() }
) {
Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = "Go back to previous screen",
)
}
}
},
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)
}
}
},
actions = {
if (navItems.any { it.route == currentDestination }) {
IconButton(
onClick = { context.startActivity(Intent(context, SearchActivity::class.java)) }
) {
Icon(imageVector = Icons.Filled.Search, contentDescription = "Search posts")
}
IconButton(onClick = { navController.navigate(Destinations.Settings.route) }) {
Icon(imageVector = Icons.Filled.Tune, contentDescription = "Settings")
}
}
},
)
},
bottomBar = {
AnimatedVisibility(visible = navigationType == ClawNavigationType.BOTTOM_NAVIGATION) {
ClawNavigationBar(
navController = navController,
items = navItems,
isVisible = navItems.any { it.route == currentDestination },
)
}
},
snackbarHost = { SnackbarHost(snackbarHostState) },
modifier = modifier.semantics { testTagsAsResourceId = true },
) { paddingValues ->
Row(modifier = Modifier.padding(paddingValues)) {
AnimatedVisibility(visible = navigationType == ClawNavigationType.NAVIGATION_RAIL) {
ClawNavigationRail(
navController = navController,
items = navItems,
isVisible = navItems.any { it.route == currentDestination },
)
}
NavHost(
navController = navController,
startDestination = Destinations.startDestination.route,
// Make animations 2x faster than default specs
enterTransition = { fadeIn(animationSpec = tween(350)) },
exitTransition = { fadeOut(animationSpec = tween(350)) },
) {
val uri = LobstersApi.BASE_URL
composable(route = Destinations.Hottest.route) {
setWebUri("https://lobste.rs/")
NetworkPosts(
lazyPagingItems = hottestPosts,
listState = hottestListState,
postActions = postActions,
)
}
composable(route = Destinations.Newest.route) {
setWebUri("https://lobste.rs/")
NetworkPosts(
lazyPagingItems = newestPosts,
listState = newestListState,
postActions = postActions,
)
}
composable(route = Destinations.Saved.route) {
setWebUri(null)
DatabasePosts(items = savedPosts, listState = savedListState, postActions = postActions)
}
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"
}
setWebUri("https://lobste.rs/s/$postId")
CommentsPage(
postId = postId,
postActions = postActions,
htmlConverter = htmlConverter,
getSeenComments = viewModel::getSeenComments,
markSeenComments = viewModel::markSeenComments,
)
}
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"
}
setWebUri("https://lobste.rs/u/$username")
UserProfile(username = username, getProfile = viewModel::getUserProfile)
}
composable(route = Destinations.Settings.route) {
SettingsScreen(
context = context,
openLibrariesScreen = { navController.navigate(Destinations.AboutLibraries.route) },
importPosts = viewModel::importPosts,
exportPostsAsJson = viewModel::exportPostsAsJson,
exportPostsAsHtml = viewModel::exportPostsAsHtml,
snackbarHostState = snackbarHostState,
)
}
composable(route = Destinations.AboutLibraries.route) {
LibrariesContainer(modifier = Modifier.fillMaxSize())
}
}
}
}
}
@@ -0,0 +1,74 @@
/*
* 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.
*/
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.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import androidx.navigation.navArgument
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.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
@Composable
fun SearchScreen(
urlLauncher: UrlLauncher,
htmlConverter: HTMLConverter,
setWebUri: (String?) -> Unit,
modifier: Modifier = Modifier,
viewModel: ClawViewModel = injectedViewModel(),
) {
val navController = rememberNavController()
val postActions = rememberPostActions(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) {
setWebUri("https://lobste.rs/search")
SearchList(
items = viewModel.searchResults,
listState = listState,
postActions = postActions,
searchQuery = viewModel.searchQuery,
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"
}
setWebUri("https://lobste.rs/s/$postId")
CommentsPage(
postId = postId,
postActions = postActions,
htmlConverter = htmlConverter,
getSeenComments = viewModel::getSeenComments,
markSeenComments = viewModel::markSeenComments,
)
}
}
}
}
@@ -0,0 +1,209 @@
/*
* 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.screens
import android.content.Context
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.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.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.LibraryBooks
import androidx.compose.material.icons.filled.Bookmarks
import androidx.compose.material.icons.filled.Code
import androidx.compose.material.icons.filled.ImportExport
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.Icon
import androidx.compose.material3.ListItem
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedButton
import androidx.compose.material3.SnackbarHostState
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import java.io.InputStream
import java.io.OutputStream
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
private const val JSON_MIME_TYPE = "application/json"
private const val HTML_MIME_TYPE = "application/html"
@Composable
fun SettingsScreen(
context: Context,
openLibrariesScreen: () -> Unit,
snackbarHostState: SnackbarHostState,
importPosts: suspend (InputStream) -> Unit,
exportPostsAsJson: suspend (OutputStream) -> Unit,
exportPostsAsHtml: suspend (OutputStream) -> Unit,
modifier: Modifier = Modifier,
) {
val coroutineScope = rememberCoroutineScope()
Box(modifier = modifier.fillMaxSize()) {
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 = {
Icon(
imageVector = Icons.Filled.ImportExport,
contentDescription = null,
modifier = Modifier.height(32.dp),
)
},
supportingContent = {
Row(
horizontalArrangement = Arrangement.spacedBy(32.dp),
modifier = Modifier.fillMaxWidth(),
) {
ImportPosts(context, coroutineScope, snackbarHostState, importPosts)
ExportPosts(
context,
coroutineScope,
snackbarHostState,
exportPostsAsJson,
exportPostsAsHtml,
)
}
},
)
}
}
}
@Composable
private fun RowScope.ImportPosts(
context: Context,
coroutineScope: CoroutineScope,
snackbarHostState: SnackbarHostState,
importPosts: suspend (InputStream) -> Unit,
modifier: Modifier = Modifier,
) {
val importAction =
rememberLauncherForActivityResult(ActivityResultContracts.GetContent()) { uri ->
if (uri == null) {
coroutineScope.launch { snackbarHostState.showSnackbarDismissing("No file selected") }
return@rememberLauncherForActivityResult
}
coroutineScope.launch {
context.contentResolver.openInputStream(uri)?.use { stream ->
importPosts(stream)
snackbarHostState.showSnackbarDismissing("Successfully imported posts")
}
}
}
OutlinedButton(
onClick = { importAction.launch(JSON_MIME_TYPE) },
shape = MaterialTheme.shapes.extraSmall,
modifier = modifier.fillMaxWidth(0.30f).weight(0.5f),
) {
Text(text = "Import")
}
}
@Composable
private fun RowScope.ExportPosts(
context: Context,
coroutineScope: CoroutineScope,
snackbarHostState: SnackbarHostState,
exportPostsAsJson: suspend (OutputStream) -> Unit,
exportPostsAsHtml: suspend (OutputStream) -> Unit,
modifier: Modifier = Modifier,
) {
val jsonExportAction =
rememberLauncherForActivityResult(ActivityResultContracts.CreateDocument(JSON_MIME_TYPE)) { uri
->
if (uri == null) {
coroutineScope.launch { snackbarHostState.showSnackbarDismissing("No file selected") }
return@rememberLauncherForActivityResult
}
coroutineScope.launch {
context.contentResolver.openOutputStream(uri)?.use { stream ->
exportPostsAsJson(stream)
snackbarHostState.showSnackbarDismissing("Successfully exported posts")
}
}
}
val htmlExportAction =
rememberLauncherForActivityResult(ActivityResultContracts.CreateDocument(HTML_MIME_TYPE)) { uri
->
if (uri == null) {
coroutineScope.launch { snackbarHostState.showSnackbarDismissing("No file selected") }
return@rememberLauncherForActivityResult
}
coroutineScope.launch {
context.contentResolver.openOutputStream(uri)?.use { stream ->
exportPostsAsHtml(stream)
snackbarHostState.showSnackbarDismissing("Successfully exported posts")
}
}
}
var expanded by remember { mutableStateOf(false) }
OutlinedButton(
onClick = { expanded = true },
shape = MaterialTheme.shapes.extraSmall,
modifier = modifier.fillMaxWidth(0.30f).weight(0.5f),
) {
Text(text = "Export")
DropdownMenu(expanded = expanded, onDismissRequest = { expanded = false }) {
DropdownMenuItem(
text = { Text("JSON") },
onClick = {
expanded = false
jsonExportAction.launch("claw-export.json")
},
leadingIcon = {
Icon(imageVector = Icons.Filled.Code, contentDescription = "Export as JSON")
},
)
DropdownMenuItem(
text = { Text("Bookmarks") },
onClick = {
expanded = false
htmlExportAction.launch("claw-export.html")
},
leadingIcon = {
Icon(
imageVector = Icons.Filled.Bookmarks,
contentDescription = "Export as browser bookmarks",
)
},
)
}
}
}
/** Shows a Snackbar but dismisses any existing ones first. */
private suspend fun SnackbarHostState.showSnackbarDismissing(text: String) {
currentSnackbarData?.dismiss()
showSnackbar(text)
}
@@ -1,36 +0,0 @@
/*
* Copyright © 2023 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.viewmodel
import dev.msfjarvis.claw.api.injection.BaseUrl
import dev.msfjarvis.claw.core.injection.IODispatcher
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.withContext
import okhttp3.OkHttpClient
import okhttp3.Request
import org.jsoup.Jsoup
/** Helper for extracting CSRF token for authenticated requests to https://lobste.rs. */
class CSRFRepository
@Inject
constructor(
private val okHttpClient: OkHttpClient,
@IODispatcher private val dispatcher: CoroutineDispatcher,
@BaseUrl private val url: String,
) {
suspend fun extractToken(): String? {
val request = Request.Builder().url(url).get().build()
return withContext(dispatcher) {
okHttpClient.newCall(request).execute().use { response ->
val doc = Jsoup.parse(response.body?.string() ?: return@use null)
val element = doc.select("meta[name=\"csrf-token\"]").first() ?: return@use null
return@use element.attr("content")
}
}
}
}
@@ -1,35 +1,57 @@
/*
* 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.
*/
package dev.msfjarvis.claw.android.viewmodel
import androidx.lifecycle.ViewModel
import android.app.Application
import android.content.Context
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.compose.ui.text.capitalize
import androidx.compose.ui.text.intl.Locale
import androidx.glance.appwidget.updateAll
import androidx.lifecycle.AndroidViewModel
import androidx.lifecycle.viewModelScope
import androidx.paging.Pager
import androidx.paging.PagingConfig
import androidx.paging.PagingData
import androidx.paging.cachedIn
import androidx.paging.map
import com.deliveryhero.whetstone.app.ApplicationScope
import com.deliveryhero.whetstone.viewmodel.ContributesViewModel
import com.slack.eithernet.ApiResult.Failure
import com.slack.eithernet.ApiResult.Success
import com.squareup.anvil.annotations.optional.ForScope
import dev.msfjarvis.claw.android.glance.SavedPostsWidget
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.api.LobstersApi
import dev.msfjarvis.claw.core.injection.IODispatcher
import dev.msfjarvis.claw.database.local.SavedPost
import dev.msfjarvis.claw.core.injection.MainDispatcher
import dev.msfjarvis.claw.model.Comment
import dev.msfjarvis.claw.model.LobstersPost
import dev.msfjarvis.claw.model.UIPost
import dev.msfjarvis.claw.model.fromSavedPost
import dev.msfjarvis.claw.model.toSavedPost
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.Month
import java.time.ZoneId
import java.time.format.DateTimeFormatter
import javax.inject.Inject
import kotlinx.collections.immutable.ImmutableMap
import kotlinx.collections.immutable.toImmutableMap
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@@ -39,58 +61,109 @@ class ClawViewModel
@Inject
constructor(
private val api: LobstersApi,
private val savedPostsRepository: SavedPostsRepository,
private val commentsRepository: CommentsRepository,
private val readPostsRepository: ReadPostsRepository,
private val savedPostsRepository: SavedPostsRepository,
private val linkMetadataRepository: LinkMetadataRepository,
val dataTransferRepository: DataTransferRepository,
private val dataTransferRepository: DataTransferRepository,
private val pagingSourceFactory: LobstersPagingSource.Factory,
private val searchPagingSourceFactory: SearchPagingSource.Factory,
@IODispatcher private val ioDispatcher: CoroutineDispatcher,
) : ViewModel() {
private val hottestPostsPager =
Pager(PagingConfig(pageSize = PAGE_SIZE), initialKey = STARTING_PAGE_INDEX) {
pagingSourceFactory.create(api::getHottestPosts)
}
private val newestPostsPager =
Pager(PagingConfig(pageSize = PAGE_SIZE), initialKey = STARTING_PAGE_INDEX) {
pagingSourceFactory.create(api::getNewestPosts)
}
@MainDispatcher private val mainDispatcher: CoroutineDispatcher,
@ForScope(ApplicationScope::class) context: Context,
) : AndroidViewModel(context as Application) {
val hottestPosts =
Pager(
config = PagingConfig(pageSize = PAGE_SIZE),
initialKey = STARTING_PAGE_INDEX,
pagingSourceFactory = { pagingSourceFactory.create(api::getHottestPosts) },
)
.flow
.map(::mapToUIPost)
.cachedIn(viewModelScope)
val newestPosts =
Pager(
config = PagingConfig(pageSize = PAGE_SIZE),
initialKey = STARTING_PAGE_INDEX,
pagingSourceFactory = { pagingSourceFactory.create(api::getNewestPosts) },
)
.flow
.map(::mapToUIPost)
.cachedIn(viewModelScope)
val searchResults =
Pager(
PagingConfig(pageSize = PAGE_SIZE),
initialKey = STARTING_PAGE_INDEX,
pagingSourceFactory = { searchPagingSourceFactory.create { searchQuery } },
)
.flow
.map(::mapToUIPost)
val savedPosts = savedPostsRepository.savedPosts.map { it.map(UIPost.Companion::fromSavedPost) }
val savedPostsByMonth
get() = savedPosts.map(::groupSavedPosts)
val hottestPosts
get() = hottestPostsPager.flow
var searchQuery by mutableStateOf("")
val newestPosts
get() = newestPostsPager.flow
private var _readPosts = emptyList<String>()
private var _savedPosts = emptyList<String>()
private val savedPostsFlow
get() = savedPostsRepository.savedPosts
val savedPosts
get() = savedPostsFlow.map(::mapSavedPosts)
private fun mapSavedPosts(items: List<SavedPost>): ImmutableMap<Month, List<SavedPost>> {
val sorted = items.sortedByDescending { post -> post.createdAt.toLocalDateTime() }
return sorted.groupBy { post -> post.createdAt.toLocalDateTime().month }.toImmutableMap()
init {
viewModelScope.launch { savedPosts.collectLatest { _savedPosts = it.map(UIPost::shortId) } }
viewModelScope.launch { readPostsRepository.readPosts.collectLatest { _readPosts = it } }
}
suspend fun isPostSaved(post: SavedPost): Boolean {
return savedPostsFlow.first().any { savedPost -> savedPost.shortId == post.shortId }
private fun mapToUIPost(pagingData: PagingData<LobstersPost>): PagingData<UIPost> {
return pagingData.map { post ->
val uiPost = post.toUIPost()
uiPost.copy(isSaved = isPostSaved(uiPost), isRead = isPostRead(uiPost))
}
}
fun toggleSave(post: SavedPost) {
private fun groupSavedPosts(items: List<UIPost>): ImmutableMap<String, List<UIPost>> {
val sorted =
items.sortedWith { post1, post2 ->
val post1Date = post1.createdAt.toLocalDateTime()
val post2Date = post2.createdAt.toLocalDateTime()
if (post2Date.isBefore(post1Date)) {
-1
} else if (post2Date.isAfter(post1Date)) {
1
} else {
0
}
}
return sorted
.groupBy { post ->
val time = post.createdAt.toLocalDateTime()
"${time.month.name.lowercase().capitalize(Locale.current)} ${time.year}"
}
.toImmutableMap()
}
private fun isPostSaved(post: UIPost): Boolean {
return _savedPosts.contains(post.shortId)
}
private fun isPostRead(post: UIPost): Boolean {
return _readPosts.contains(post.shortId)
}
fun toggleSave(post: UIPost) {
viewModelScope.launch(ioDispatcher) {
val saved = isPostSaved(post)
if (saved) {
savedPostsRepository.removePost(post)
savedPostsRepository.removePost(post.toSavedPost())
} else {
savedPostsRepository.savePost(post)
savedPostsRepository.savePost(post.toSavedPost())
}
withContext(mainDispatcher) { SavedPostsWidget(savedPosts).updateAll(getApplication()) }
}
}
suspend fun getPostComments(postId: String) =
withContext(ioDispatcher) {
when (val result = api.getPostDetails(postId)) {
is Success -> result.value
is Success -> result.value.toUIPost()
is Failure.NetworkFailure -> throw result.error
is Failure.UnknownFailure -> throw result.error
is Failure.HttpFailure -> {
@@ -124,12 +197,25 @@ constructor(
}
}
suspend fun importPosts(input: InputStream) = dataTransferRepository.importPosts(input)
suspend fun exportPostsAsJson(output: OutputStream) =
dataTransferRepository.exportPostsAsJson(output)
suspend fun exportPostsAsHtml(output: OutputStream) =
dataTransferRepository.exportPostsAsHTML(output)
fun markPostAsRead(postId: String) {
viewModelScope.launch { readPostsRepository.markRead(postId) }
}
/**
* Parses a given [String] into a [LocalDateTime]. This method is only intended to be used for
* dates in the format returned by the Lobsters API, and is not a general purpose parsing
* solution.
*/
private fun String.toLocalDateTime(): LocalDateTime {
if (isEmpty()) return LocalDateTime.now(ZoneId.systemDefault())
return LocalDateTime.from(DateTimeFormatter.ISO_OFFSET_DATE_TIME.parse(this))
}
}
@@ -7,8 +7,8 @@
package dev.msfjarvis.claw.android.viewmodel
import dev.msfjarvis.claw.core.injection.DatabaseDispatcher
import dev.msfjarvis.claw.database.LobstersDatabase
import dev.msfjarvis.claw.database.local.PostComments
import dev.msfjarvis.claw.database.local.PostCommentsQueries
import dev.msfjarvis.claw.model.Comment
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
@@ -17,10 +17,9 @@ import kotlinx.coroutines.withContext
class CommentsRepository
@Inject
constructor(
database: LobstersDatabase,
private val postCommentsQueries: PostCommentsQueries,
@DatabaseDispatcher private val dbDispatcher: CoroutineDispatcher,
) {
private val postCommentsQueries = database.postCommentsQueries
suspend fun getSeenComments(postId: String) =
withContext(dbDispatcher) { postCommentsQueries.getCommentIds(postId).executeAsOneOrNull() }
@@ -1,20 +1,21 @@
/*
* 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.
*/
package dev.msfjarvis.claw.android.viewmodel
import dev.msfjarvis.claw.core.injection.DatabaseDispatcher
import dev.msfjarvis.claw.core.injection.IODispatcher
import dev.msfjarvis.claw.database.LobstersDatabase
import dev.msfjarvis.claw.database.SavedPostSerializer
import dev.msfjarvis.claw.database.local.SavedPost
import java.io.InputStream
import java.io.OutputStream
import java.time.Instant
import java.time.format.DateTimeFormatter
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.withContext
import kotlinx.serialization.ExperimentalSerializationApi
import kotlinx.serialization.builtins.ListSerializer
@@ -26,29 +27,69 @@ import kotlinx.serialization.json.encodeToStream
class DataTransferRepository
@Inject
constructor(
private val database: LobstersDatabase,
private val json: Json,
@DatabaseDispatcher private val dbDispatcher: CoroutineDispatcher,
private val savedPostsRepository: SavedPostsRepository,
@IODispatcher private val ioDispatcher: CoroutineDispatcher,
) {
private val serializer = ListSerializer(SavedPostSerializer)
private val savedPostQueries = database.savedPostQueries
suspend fun importPosts(input: InputStream) {
val posts: List<SavedPost> =
withContext(ioDispatcher) {
json.decodeFromStream(
serializer,
input,
)
}
withContext(dbDispatcher) {
database.transaction { posts.forEach(savedPostQueries::insertOrReplacePost) }
}
withContext(ioDispatcher) { json.decodeFromStream(serializer, input) }
savedPostsRepository.savePosts(posts)
}
suspend fun exportPosts(output: OutputStream) {
val posts = withContext(dbDispatcher) { savedPostQueries.selectAllPosts().executeAsList() }
suspend fun exportPostsAsJson(output: OutputStream) {
val posts = savedPostsRepository.savedPosts.first()
withContext(ioDispatcher) { json.encodeToStream(serializer, posts, output) }
}
suspend fun exportPostsAsHTML(output: OutputStream) {
fun computeTimestamp(post: SavedPost): Long {
val temporal = DateTimeFormatter.ISO_OFFSET_DATE_TIME.parse(post.createdAt)
val instant = Instant.from(temporal)
return instant.toEpochMilli()
}
val posts = savedPostsRepository.savedPosts.first()
val header =
"""
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
"""
.trimIndent()
val html = buildString {
append(header)
append("<DD><p>\n")
for (post in posts) {
append(
"""
<DT><A HREF="${post.url.ifEmpty { post.commentsUrl }}" ADD_DATE="${computeTimestamp(post)}" PRIVATE="0" TAGS="${post.tags.joinToString(",")}">${post.title}</A>
<DD>${post.title}
"""
.trimIndent()
)
}
append(
"""
<DT><A HREF="https://example.com/" ADD_DATE="0" PRIVATE="0" TAGS="delete,me,pls">Padding post</A>
<DD>Linkding ignores the last entry so this pads the difference for imports
"""
.trimIndent()
)
append("</DD></p>\n")
}
withContext(ioDispatcher) {
val writer = output.bufferedWriter()
writer.write(html)
writer.flush()
}
}
}
@@ -6,44 +6,21 @@
*/
package dev.msfjarvis.claw.android.viewmodel
import com.chimbori.crux.Crux
import com.chimbori.crux.api.Fields
import dev.msfjarvis.claw.core.injection.IODispatcher
import dev.msfjarvis.claw.model.LinkMetadata
import javax.inject.Inject
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
import okhttp3.OkHttpClient
import okhttp3.Request
import org.jsoup.Jsoup
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.withContext
import me.saket.unfurl.Unfurler
class LinkMetadataRepository
@Inject
constructor(
private val crux: Crux,
private val okHttpClient: OkHttpClient,
private val unfurler: Unfurler,
@IODispatcher private val dispatcher: CoroutineDispatcher,
) {
suspend fun getLinkMetadata(url: String): LinkMetadata {
return run {
val parsedUrl = url.toHttpUrlOrNull() ?: return@run null
if (!parsedUrl.isHttps) return@run null
val request = Request.Builder().url(parsedUrl).build()
val htmlContent =
okHttpClient.newCall(request).execute().use { response ->
val body = response.body ?: return@run null
body.string()
}
val extractedMetadata = crux.extractFrom(parsedUrl, Jsoup.parse(htmlContent, url))
val faviconUrl = extractedMetadata[Fields.FAVICON_URL].toString()
val readingTime = extractedMetadata[Fields.DURATION_MS].toString()
LinkMetadata(
url = url,
faviconUrl = faviconUrl,
readingTime = readingTime,
)
}
?: LinkMetadata(
url = url,
faviconUrl = null,
readingTime = null,
)
val result = withContext(dispatcher) { unfurler.unfurl(url) }
return LinkMetadata(url, result?.favicon?.toString())
}
}
@@ -0,0 +1,28 @@
/*
* 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.viewmodel
import app.cash.sqldelight.coroutines.asFlow
import app.cash.sqldelight.coroutines.mapToList
import dev.msfjarvis.claw.core.injection.DatabaseDispatcher
import dev.msfjarvis.claw.database.local.ReadPostsQueries
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.withContext
class ReadPostsRepository
@Inject
constructor(
private val readPostsQueries: ReadPostsQueries,
@DatabaseDispatcher private val dbDispatcher: CoroutineDispatcher,
) {
val readPosts = readPostsQueries.selectAllPosts().asFlow().mapToList(dbDispatcher)
suspend fun markRead(postId: String) {
withContext(dbDispatcher) { readPostsQueries.markRead(postId) }
}
}
@@ -9,8 +9,8 @@ package dev.msfjarvis.claw.android.viewmodel
import app.cash.sqldelight.coroutines.asFlow
import app.cash.sqldelight.coroutines.mapToList
import dev.msfjarvis.claw.core.injection.DatabaseDispatcher
import dev.msfjarvis.claw.database.LobstersDatabase
import dev.msfjarvis.claw.database.local.SavedPost
import dev.msfjarvis.claw.database.local.SavedPostQueries
import io.github.aakira.napier.Napier
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
@@ -19,10 +19,9 @@ import kotlinx.coroutines.withContext
class SavedPostsRepository
@Inject
constructor(
database: LobstersDatabase,
private val savedPostQueries: SavedPostQueries,
@DatabaseDispatcher private val dbDispatcher: CoroutineDispatcher,
) {
private val savedPostQueries = database.savedPostQueries
val savedPosts = savedPostQueries.selectAllPosts().asFlow().mapToList(dbDispatcher)
suspend fun savePost(post: SavedPost) {
@@ -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,18 +7,23 @@
package dev.msfjarvis.claw.android.work
import android.content.Context
import androidx.glance.appwidget.updateAll
import androidx.work.CoroutineWorker
import androidx.work.WorkerParameters
import com.deliveryhero.whetstone.ForScope
import com.deliveryhero.whetstone.worker.ContributesWorker
import com.deliveryhero.whetstone.worker.WorkerScope
import com.slack.eithernet.ApiResult.Success
import com.squareup.anvil.annotations.optional.ForScope
import dev.msfjarvis.claw.android.glance.SavedPostsWidget
import dev.msfjarvis.claw.android.viewmodel.SavedPostsRepository
import dev.msfjarvis.claw.api.LobstersApi
import dev.msfjarvis.claw.common.posts.toDbModel
import dev.msfjarvis.claw.model.LobstersPostDetails
import dev.msfjarvis.claw.model.UIPost
import dev.msfjarvis.claw.model.fromSavedPost
import dev.msfjarvis.claw.model.toSavedPost
import javax.inject.Inject
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.map
/**
* WorkManager-backed [CoroutineWorker] that gets all the posts from [SavedPostsRepository], fetches
@@ -40,8 +45,12 @@ constructor(
.first()
.map { post -> lobstersApi.getPostDetails(post.shortId) }
.filterIsInstance<Success<LobstersPostDetails>>()
.map { result -> result.value.toDbModel() }
.map { result -> result.value.toSavedPost() }
.let { savedPostsRepository.savePosts(it) }
SavedPostsWidget(
savedPostsRepository.savedPosts.map { it.map(UIPost.Companion::fromSavedPost) }
)
.updateAll(applicationContext)
return Result.success()
}
}
@@ -0,0 +1,18 @@
<!--
~ 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:colorControlNormal"
android:alpha="0.6"
android:autoMirrored="true">
<path
android:fillColor="@android:color/white"
android:pathData="M21.99,4c0,-1.1 -0.89,-2 -1.99,-2L4,2c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h14l4,4 -0.01,-18zM20,4v13.17L18.83,16L4,16L4,4h16zM6,12h12v2L6,14zM6,9h12v2L6,11zM6,6h12v2L6,8z"/>
</vector>
@@ -0,0 +1,20 @@
<!--
~ Copyright © 2023 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="1080"
android:viewportHeight="1080">
<group android:scaleX="0.7"
android:scaleY="0.7"
android:translateX="162"
android:translateY="162">
<path
android:pathData="M431.3,341.2C435.9,337 580.3,236 710.5,223.8C747.3,220.3 790.7,254.7 833.2,312.5C875.9,370.7 892.9,433.4 875.9,443C863.2,450.2 838.6,407.4 758.8,396.3C743.4,394.2 730.4,393.4 719.4,393.5C738.5,423.4 745.6,451.1 737.2,458C733.1,461.4 673.6,438.7 612.9,436.5C570.1,435 535.2,440.9 506.7,451.3C496.9,454.9 486,453.8 477.2,448.3C444.5,427.9 424.2,406.2 418.4,376.2C415.8,362.8 420.9,349.4 431.3,341.2ZM274.7,394.8C285.8,370.1 312.2,325.9 346.3,305.4C383.6,282.9 335,390.3 427.3,489.8C519.5,589.3 586.5,623.8 655.1,581.5C723.7,539.2 746.5,518.1 753,518.7C764,519.6 772.9,536.1 764.4,589.5C763,598.2 761.3,606.5 759.3,614.2C828.7,575 871.7,516.3 889,520C912,524.8 918.3,617.8 852.1,721C811.8,784 768.8,830.7 741.4,857.5C724.3,874 699.7,880 677,873.1C512,822.6 315.5,733.8 202.9,652C193.8,645.2 186.8,635.9 183,625.1C171.8,593.7 161.3,548.1 168.5,495.3C179.5,414.2 222.7,352.9 245.2,335.9C261.9,323.2 267.1,362.4 274.7,394.8Z"
android:fillColor="#FF4529"/>
</group>
</vector>
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright © 2023 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.
-->
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<monochrome android:drawable="@mipmap/ic_launcher_foreground"/>
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<bool name="use_light_status_bar">false</bool>
</resources>
-4
View File
@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<bool name="use_light_status_bar">true</bool>
</resources>
@@ -0,0 +1,9 @@
<!--
~ Copyright © 2021-2023 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.
-->
<resources>
<color name="ic_launcher_background">#540C00</color>
</resources>
+6 -1
View File
@@ -1,4 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
~ Copyright © 2021-2023 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.
-->
<resources>
<string name="app_name">Claw</string>
</resources>
+9 -12
View File
@@ -1,20 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
~ 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.
-->
<resources>
<style name="Theme.Claw.SplashScreen" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">#FF6C0000</item>
<item name="windowSplashScreenAnimatedIcon">@mipmap/ic_launcher_foreground</item>
<item name="windowSplashScreenBackground">@color/ic_launcher_background</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_launcher_foreground</item>
<item name="windowSplashScreenAnimationDuration">1000</item>
<item name="postSplashScreenTheme">@style/Theme.Claw</item>
</style>
<style name="Platform.Theme.Claw" parent="android:Theme.Material.Light.NoActionBar" />
<style name="Base.Theme.Claw" parent="Platform.Theme.Claw">
<item name="android:windowActionModeOverlay">true</item>
</style>
<style name="Theme.Claw" parent="Base.Theme.Claw">
<item name="android:windowLightStatusBar">@bool/use_light_status_bar</item>
</style>
<style name="Theme.Claw" parent="android:Theme.Material.NoActionBar" />
</resources>
@@ -1,4 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright © 2022-2023 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.
-->
<data-extraction-rules>
<cloud-backup>
<include
@@ -1,4 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright © 2022-2023 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.
-->
<full-backup-content>
<include
domain="database"
@@ -0,0 +1,15 @@
<!--
~ Copyright © 2023 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.
-->
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:initialLayout="@layout/glance_default_loading_layout"
android:minWidth="349dp"
android:minHeight="110dp"
android:minResizeWidth="349dp"
android:minResizeHeight="110dp"
android:resizeMode="vertical|horizontal"
android:updatePeriodMillis="1800000"
android:widgetCategory="home_screen" />
@@ -1,61 +0,0 @@
/*
* Copyright © 2023 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.viewmodel
import com.google.common.truth.Truth.assertThat
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.test.runTest
import okhttp3.OkHttpClient
import okhttp3.mockwebserver.Dispatcher
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
import okhttp3.mockwebserver.RecordedRequest
import org.junit.jupiter.api.BeforeAll
import org.junit.jupiter.api.Test
class CSRFRepositoryTest {
@Test
fun `correctly extracts CSRF token`() = runTest {
val repo =
CSRFRepository(
OkHttpClient.Builder().build(),
Dispatchers.Default,
server.url("/").toString(),
)
assertThat(repo.extractToken())
.isEqualTo(
"OZWykgFemPVeOSNmB53-ccKXe458X7xCInO1-qzFU6nk_9RCSrSQqS9OPmA5_pyy8qD3IYAIZ7XfAM3gdhJpkQ"
)
}
companion object {
private val server = MockWebServer()
@JvmStatic
@BeforeAll
fun setup() {
val dispatcher =
object : Dispatcher() {
override fun dispatch(request: RecordedRequest): MockResponse {
return when (val path = request.path) {
"/" ->
MockResponse()
.setResponseCode(200)
.setBody(
javaClass.classLoader!!
.getResourceAsStream("csrf_page.html")
.readAllBytes()
.decodeToString(),
)
else -> error("Invalid path: $path")
}
}
}
server.dispatcher = dispatcher
}
}
}
+2 -2
View File
@@ -1,5 +1,5 @@
#
# This file was automatically generated by 'versioning-plugin'. DO NOT EDIT MANUALLY.
#
versioning-plugin.versionCode=13000
versioning-plugin.versionName=1.30.0
versioning-plugin.versionCode=14200
versioning-plugin.versionName=1.42.0
+2
View File
@@ -24,9 +24,11 @@ dependencies {
implementation(libs.dagger)
implementation(libs.javax.inject)
implementation(libs.jsoup)
testImplementation(testFixtures(libs.eithernet))
testImplementation(libs.kotlinx.coroutines.test)
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.0.1" type="baseline" client="gradle" dependencies="false" name="AGP (8.0.1)" variant="all" version="8.0.1">
<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>
@@ -0,0 +1,9 @@
/*
* Copyright © 2022-2023 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.api
@JvmInline value class CSRFToken(val value: String)
@@ -9,32 +9,26 @@ package dev.msfjarvis.claw.api
import com.slack.eithernet.ApiResult
import dev.msfjarvis.claw.model.LobstersPost
import dev.msfjarvis.claw.model.LobstersPostDetails
import dev.msfjarvis.claw.model.Tags
import dev.msfjarvis.claw.model.User
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query
/** Simple interface defining an API for lobste.rs */
interface LobstersApi {
@GET("hottest.json")
suspend fun getHottestPosts(@Query("page") page: Int): ApiResult<List<LobstersPost>, Unit>
@GET("page/{page}.json")
suspend fun getHottestPosts(@Path("page") page: Int): ApiResult<List<LobstersPost>, Unit>
@GET("newest.json")
suspend fun getNewestPosts(@Query("page") page: Int): ApiResult<List<LobstersPost>, Unit>
@GET("newest/page/{page}.json")
suspend fun getNewestPosts(@Path("page") page: Int): ApiResult<List<LobstersPost>, Unit>
@GET("s/{postId}.json")
suspend fun getPostDetails(@Path("postId") postId: String): ApiResult<LobstersPostDetails, Unit>
@GET("u/{username}.json")
@GET("~{username}.json")
suspend fun getUser(@Path("username") username: String): ApiResult<User, Unit>
@GET("t/{tags}.json")
suspend fun getPostsByTags(
@Path("tags") tag: Tags,
@Query("page") page: Int,
): ApiResult<List<LobstersPost>, Unit>
@GET("/") suspend fun getCSRFToken(): ApiResult<CSRFToken, Unit>
companion object {
const val BASE_URL = "https://lobste.rs"
@@ -0,0 +1,20 @@
/*
* Copyright © 2023 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.api
import com.slack.eithernet.ApiResult
import dev.msfjarvis.claw.model.LobstersPost
import retrofit2.http.GET
import retrofit2.http.Query
interface LobstersSearchApi {
@GET("/search?what=stories&order=newest")
suspend fun searchPosts(
@Query("q") searchQuery: String,
@Query("page") page: Int,
): ApiResult<List<LobstersPost>, Unit>
}
@@ -0,0 +1,36 @@
/*
* Copyright © 2023 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.api.converters
import dev.msfjarvis.claw.api.CSRFToken
import dev.msfjarvis.claw.api.LobstersApi
import java.lang.reflect.Type
import okhttp3.ResponseBody
import org.jsoup.Jsoup
import retrofit2.Converter
import retrofit2.Retrofit
object CSRFTokenConverter : Converter<ResponseBody, CSRFToken> {
override fun convert(value: ResponseBody): CSRFToken {
val token =
Jsoup.parse(value.string(), LobstersApi.BASE_URL)
.select("meta[name=\"csrf-token\"]")
.first()!!
.attr("content")
return CSRFToken(token)
}
object Factory : Converter.Factory() {
override fun responseBodyConverter(
type: Type,
annotations: Array<out Annotation>,
retrofit: Retrofit,
): Converter<ResponseBody, CSRFToken> {
return CSRFTokenConverter
}
}
}
@@ -0,0 +1,65 @@
/*
* 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.
*/
package dev.msfjarvis.claw.api.converters
import dev.msfjarvis.claw.api.LobstersApi
import dev.msfjarvis.claw.model.LobstersPost
import java.lang.reflect.Type
import okhttp3.ResponseBody
import org.jsoup.Jsoup
import org.jsoup.nodes.Element
import org.jsoup.select.Elements
import retrofit2.Converter
import retrofit2.Retrofit
object SearchConverter : Converter<ResponseBody, List<LobstersPost>> {
override fun convert(value: ResponseBody): List<LobstersPost> {
val elements =
Jsoup.parse(value.string(), LobstersApi.BASE_URL).select("div.story_liner.h-entry")
return elements.map(::parsePost)
}
private fun parsePost(elem: Element): LobstersPost {
val parent = elem.parent() ?: error("$elem must have a parent")
val shortId = parent.attr("data-shortid")
val titleElement = elem.select("span.link.h-cite > a")
val title = titleElement.text()
val url = titleElement.attr("href")
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()
return LobstersPost(
shortId = shortId,
title = title,
url = url,
commentCount = commentCount,
commentsUrl = commentsUrl,
tags = tags,
submitter = submitter,
// The value of these fields is irrelevant for our use case
createdAt = "",
description = "",
)
}
private fun getCommentsData(elem: Elements): Pair<Int, String> {
val linkElement = elem.select("a")
val countString = linkElement.text().trimStart().substringBefore(" ")
val commentsUrl = LobstersApi.BASE_URL + linkElement.attr("href")
return (countString.toIntOrNull() ?: 0) to commentsUrl
}
object Factory : Converter.Factory() {
override fun responseBodyConverter(
type: Type,
annotations: Array<out Annotation>,
retrofit: Retrofit,
): Converter<ResponseBody, List<LobstersPost>> {
return SearchConverter
}
}
}
@@ -1,48 +0,0 @@
/*
* Copyright © 2021-2023 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.api.injection
import com.deliveryhero.whetstone.app.ApplicationScope
import com.slack.eithernet.ApiResultCallAdapterFactory
import com.slack.eithernet.ApiResultConverterFactory
import com.squareup.anvil.annotations.ContributesTo
import dagger.Module
import dagger.Provides
import dev.msfjarvis.claw.api.LobstersApi
import javax.inject.Qualifier
import okhttp3.OkHttpClient
import retrofit2.Converter
import retrofit2.Retrofit
import retrofit2.create
@Module
@ContributesTo(ApplicationScope::class)
object ApiModule {
@Provides
fun provideRetrofit(
client: OkHttpClient,
converterFactories: Set<@JvmSuppressWildcards Converter.Factory>,
@BaseUrl baseUrl: String,
): Retrofit {
return Retrofit.Builder()
.client(client)
.baseUrl(baseUrl)
.addConverterFactory(ApiResultConverterFactory)
.addCallAdapterFactory(ApiResultCallAdapterFactory)
.apply { converterFactories.forEach(this::addConverterFactory) }
.build()
}
@Provides
fun provideApi(retrofit: Retrofit): LobstersApi {
return retrofit.create()
}
@Provides @BaseUrl fun provideBaseUrl(): String = LobstersApi.BASE_URL
}
@Qualifier @Retention(AnnotationRetention.RUNTIME) annotation class BaseUrl
@@ -0,0 +1,100 @@
/*
* 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.
*/
package dev.msfjarvis.claw.api.injection
import com.deliveryhero.whetstone.app.ApplicationScope
import com.slack.eithernet.ApiResultCallAdapterFactory
import com.slack.eithernet.ApiResultConverterFactory
import com.squareup.anvil.annotations.ContributesTo
import dagger.Module
import dagger.Provides
import dagger.multibindings.IntKey
import dagger.multibindings.IntoMap
import dev.msfjarvis.claw.api.LobstersApi
import dev.msfjarvis.claw.api.LobstersSearchApi
import dev.msfjarvis.claw.api.converters.CSRFTokenConverter
import dev.msfjarvis.claw.api.converters.SearchConverter
import javax.inject.Named
import javax.inject.Qualifier
import okhttp3.OkHttpClient
import retrofit2.CallAdapter
import retrofit2.Converter
import retrofit2.Retrofit
import retrofit2.create
/**
* Ideally the multibindings used here would only use [dagger.multibindings.IntoSet], but its lack
* of ordering guarantees means that we roll a die on each app launch that [Converter]s and
* [CallAdapter]s are in the correct order to be able to deserialize responses. Thus, the module
* uses [IntoMap] with [IntKey]s to fake the presence of a fixed order by sorting on the key of the
* injected [Map]s when injecting them into [Retrofit].
*/
@Module
@ContributesTo(ApplicationScope::class)
object RetrofitModule {
@Provides
fun provideRetrofit(
client: OkHttpClient,
converterFactories: Map<Int, @JvmSuppressWildcards Converter.Factory>,
callAdapterFactories: Map<Int, @JvmSuppressWildcards CallAdapter.Factory>,
@Named("LobstersURL") baseUrl: String,
): Retrofit {
return Retrofit.Builder()
.client(client)
.baseUrl(baseUrl)
.apply { converterFactories.toSortedMap().values.forEach(this::addConverterFactory) }
.apply { callAdapterFactories.toSortedMap().values.forEach(this::addCallAdapterFactory) }
.build()
}
@Provides
@SearchApi
fun provideSearchApiRetrofit(
client: OkHttpClient,
@SearchApi converterFactories: List<@JvmSuppressWildcards Converter.Factory>,
callAdapterFactories: Map<Int, @JvmSuppressWildcards CallAdapter.Factory>,
@Named("LobstersURL") baseUrl: String,
): Retrofit {
return Retrofit.Builder()
.client(client)
.baseUrl(baseUrl)
.apply { converterFactories.forEach(this::addConverterFactory) }
.apply { callAdapterFactories.toSortedMap().values.forEach(this::addCallAdapterFactory) }
.addConverterFactory(SearchConverter.Factory)
.build()
}
@Provides fun provideApi(retrofit: Retrofit): LobstersApi = retrofit.create()
@Provides
fun provideSearchApi(@SearchApi retrofit: Retrofit): LobstersSearchApi = retrofit.create()
@Provides
@IntKey(0)
@IntoMap
fun provideApiResultConverter(): Converter.Factory = ApiResultConverterFactory
@Provides
@IntKey(0)
@IntoMap
fun provideApiResultCallAdapter(): CallAdapter.Factory = ApiResultCallAdapterFactory
@Provides
@IntKey(Int.MAX_VALUE)
@IntoMap
fun provideCSRFTokenConverter(): Converter.Factory = CSRFTokenConverter.Factory
@Provides
@SearchApi
fun provideConverters(): List<@JvmSuppressWildcards Converter.Factory> =
listOf(ApiResultConverterFactory, SearchConverter.Factory)
@Provides @Named("LobstersURL") fun provideLobstersUrl(): String = LobstersApi.BASE_URL
}
/** Internal Dagger [Qualifier] to identify dependencies exclusive to [LobstersSearchApi]. */
@Qualifier @Retention(AnnotationRetention.RUNTIME) private annotation class SearchApi
@@ -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,7 +11,6 @@ import com.slack.eithernet.ApiResult.Success
import com.slack.eithernet.test.newEitherNetController
import dev.msfjarvis.claw.model.LobstersPost
import dev.msfjarvis.claw.model.LobstersPostDetails
import dev.msfjarvis.claw.model.Tags
import dev.msfjarvis.claw.model.User
import dev.msfjarvis.claw.util.TestUtils.assertIs
import kotlinx.coroutines.test.runTest
@@ -34,14 +33,14 @@ class ApiTest {
val posts = api.getHottestPosts(1)
assertIs<Success<List<LobstersPost>>>(posts)
val commentsOnlyPosts = posts.value.asSequence().filter { it.url.isEmpty() }.toSet()
assertThat(commentsOnlyPosts).hasSize(2)
assertThat(commentsOnlyPosts).hasSize(1)
}
@Test
fun `post details with comments`() = runTest {
val postDetails = api.getPostDetails("tdfoqh")
assertIs<Success<LobstersPostDetails>>(postDetails)
assertThat(postDetails.value.comments).hasSize(7)
assertThat(postDetails.value.comments).hasSize(10)
}
@Test
@@ -52,23 +51,12 @@ class ApiTest {
}
@Test
fun `get posts by single tag`() = runTest {
val tags = Tags()
tags.addTag("meta")
val posts = api.getPostsByTags(tags, 1)
assertIs<Success<List<LobstersPost>>>(posts)
assertThat(posts.value).hasSize(25)
assertThat(posts.value[0].tags).contains("meta")
}
@Test
fun `get posts by multiple tags`() = runTest {
val tags = Tags()
tags.addTag("programming")
tags.addTag("rust")
val posts = api.getPostsByTags(tags, 1)
assertIs<Success<List<LobstersPost>>>(posts)
assertThat(posts.value).hasSize(25)
assertThat(posts.value[0].tags).containsAnyOf("programming", "rust")
fun `retrieve CSRF token`() = runTest {
val token = api.getCSRFToken()
assertIs<Success<CSRFToken>>(token)
assertThat(token.value.value)
.isEqualTo(
"OZWykgFemPVeOSNmB53-ccKXe458X7xCInO1-qzFU6nk_9RCSrSQqS9OPmA5_pyy8qD3IYAIZ7XfAM3gdhJpkQ"
)
}
}

Some files were not shown because too many files have changed in this diff Show More