mirror of
https://github.com/LiveFastEatTrashRaccoon/RaccoonForLemmy.git
synced 2025-02-09 11:38:40 +01:00
parent
b6b3468847
commit
d153083819
@ -21,6 +21,7 @@ import com.github.diegoberaldin.raccoonforlemmy.core.appearance.data.VoteFormat
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.appearance.di.getThemeRepository
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.appearance.theme.IconSize
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.appearance.theme.Spacing
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.utils.compose.onClick
|
||||
import com.github.diegoberaldin.raccoonforlemmy.core.utils.toLocalDp
|
||||
import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.CommentModel
|
||||
import com.github.diegoberaldin.raccoonforlemmy.domain.lemmy.data.UserModel
|
||||
@ -34,6 +35,7 @@ fun CollapsedCommentCard(
|
||||
autoLoadImages: Boolean = true,
|
||||
actionButtonsActive: Boolean = true,
|
||||
options: List<Option> = emptyList(),
|
||||
onClick: (() -> Unit)? = null,
|
||||
onOpenCreator: ((UserModel) -> Unit)? = null,
|
||||
onUpVote: (() -> Unit)? = null,
|
||||
onDownVote: (() -> Unit)? = null,
|
||||
@ -52,7 +54,9 @@ fun CollapsedCommentCard(
|
||||
endColor = MaterialTheme.colorScheme.background,
|
||||
)
|
||||
Column(
|
||||
modifier = modifier
|
||||
modifier = modifier.onClick(
|
||||
onClick = onClick ?: {},
|
||||
)
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier.padding(
|
||||
|
@ -666,6 +666,13 @@ class PostDetailScreen(
|
||||
)
|
||||
)
|
||||
},
|
||||
onClick = rememberCallback(model) {
|
||||
model.reduce(
|
||||
PostDetailMviModel.Intent.ToggleExpandComment(
|
||||
comment.id
|
||||
)
|
||||
)
|
||||
},
|
||||
onDoubleClick = if (!uiState.doubleTapActionEnabled) {
|
||||
null
|
||||
} else {
|
||||
@ -878,6 +885,14 @@ class PostDetailScreen(
|
||||
comment = comment,
|
||||
actionButtonsActive = uiState.isLogged,
|
||||
onToggleExpanded = rememberCallback(model) {
|
||||
model.reduce(
|
||||
PostDetailMviModel.Intent.ToggleExpandComment(
|
||||
comment.id
|
||||
)
|
||||
|
||||
)
|
||||
},
|
||||
onClick = rememberCallback(model) {
|
||||
model.reduce(
|
||||
PostDetailMviModel.Intent.ToggleExpandComment(
|
||||
comment.id
|
||||
|
Loading…
x
Reference in New Issue
Block a user