mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 18:47:03 +05:30
chore(deps): update dependency com.facebook:ktfmt to v0.44 (#374)
* chore(deps): update dependency com.facebook:ktfmt to v0.44 * chore: reformat --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
61a2cefcc3
commit
b1a66bb8dd
6 changed files with 21 additions and 4 deletions
|
@ -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.
|
||||
|
@ -8,6 +8,8 @@ package dev.msfjarvis.claw.common
|
|||
|
||||
internal sealed class NetworkState {
|
||||
class Success<T>(val data: T) : NetworkState()
|
||||
|
||||
class Error(val error: Throwable, val description: String) : NetworkState()
|
||||
|
||||
object Loading : NetworkState()
|
||||
}
|
||||
|
|
|
@ -258,9 +258,13 @@ fun LobstersCardPreview() {
|
|||
postActions =
|
||||
object : PostActions {
|
||||
override fun viewPost(postUrl: String, commentsUrl: String) {}
|
||||
|
||||
override fun viewComments(postId: String) {}
|
||||
|
||||
override fun viewCommentsPage(commentsUrl: String) {}
|
||||
|
||||
override fun toggleSave(post: SavedPost) {}
|
||||
|
||||
override suspend fun getComments(postId: String): LobstersPostDetails {
|
||||
return LobstersPostDetails(
|
||||
shortId = "ooga",
|
||||
|
@ -275,6 +279,7 @@ fun LobstersCardPreview() {
|
|||
comments = emptyList(),
|
||||
)
|
||||
}
|
||||
|
||||
override suspend fun getLinkMetadata(url: String): LinkMetadata {
|
||||
return LinkMetadata("", "", "")
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
@ -14,9 +14,14 @@ import dev.msfjarvis.claw.model.LobstersPostDetails
|
|||
@Stable
|
||||
interface PostActions {
|
||||
fun viewPost(postUrl: String, commentsUrl: String)
|
||||
|
||||
fun viewComments(postId: String)
|
||||
|
||||
fun viewCommentsPage(commentsUrl: String)
|
||||
|
||||
fun toggleSave(post: SavedPost)
|
||||
|
||||
suspend fun getComments(postId: String): LobstersPostDetails
|
||||
|
||||
suspend fun getLinkMetadata(url: String): LinkMetadata
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue