feat(android): switch comments page to a swipe action

This commit is contained in:
Harsh Shandilya 2023-08-02 01:28:48 +05:30
parent 45b6f3c4d5
commit bae671ad23
No known key found for this signature in database
4 changed files with 26 additions and 12 deletions

View file

@ -7,10 +7,8 @@
package dev.msfjarvis.claw.common.posts
import androidx.compose.animation.Crossfade
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
@ -62,7 +60,6 @@ import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.toImmutableList
@Composable
@OptIn(ExperimentalFoundationApi::class)
fun LobstersCard(
post: SavedPost,
isSaved: Boolean,
@ -102,10 +99,9 @@ fun LobstersCard(
CommentsButton(
commentCount = post.commentCount,
modifier =
Modifier.combinedClickable(
Modifier.clickable(
role = Role.Button,
onClick = { postActions.viewComments(post.shortId) },
onLongClick = { postActions.viewCommentsPage(post.commentsUrl) },
),
)
}