-
Notifications
You must be signed in to change notification settings - Fork 3
/
StatusUpdated.kt
52 lines (49 loc) · 1.91 KB
/
StatusUpdated.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package social.firefly.core.ui.notifications.cards
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import social.firefly.common.utils.StringFactory
import social.firefly.core.ui.common.utils.PreviewTheme
import social.firefly.core.ui.notifications.NotificationCard
import social.firefly.core.ui.notifications.NotificationInteractionsNoOp
import social.firefly.core.ui.notifications.NotificationUiState
import social.firefly.core.ui.postcard.PostCardInteractions
import social.firefly.core.ui.postcard.PostCardInteractionsNoOp
import social.firefly.core.ui.postcard.PostContentUiState
import social.firefly.core.ui.postcard.components.PostContent
@Composable
internal fun StatusUpdatedNotificationContent(
uiState: NotificationUiState.StatusUpdated,
postCardInteractions: PostCardInteractions,
) {
PostContent(
uiState = uiState.postContentUiState,
postCardInteractions = postCardInteractions,
)
}
@Preview
@Composable
private fun StatusUpdatedNotificationPreview() {
PreviewTheme {
NotificationCard(
uiState = NotificationUiState.StatusUpdated(
id = 1,
timeStamp = StringFactory.literal("1 day ago"),
title = StringFactory.literal("John has updated their post:"),
avatarUrl = "",
postContentUiState = PostContentUiState(
pollUiState = null,
statusTextHtml = "this is a status",
mediaAttachments = emptyList(),
mentions = emptyList(),
previewCard = null,
contentWarning = "",
),
accountId = "",
statusId = "",
accountName = "",
),
postCardInteractions = PostCardInteractionsNoOp,
notificationInteractions = NotificationInteractionsNoOp,
)
}
}