Skip to content

Commit

Permalink
Merge pull request #81 from lazzzis/notification-click
Browse files Browse the repository at this point in the history
feat(ui): polish notification basic event
  • Loading branch information
whitescent authored Feb 28, 2024
2 parents b39bec6 + 69fc725 commit fe743a7
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package com.github.whitescent.mastify.screen.notification.event

import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -59,6 +58,7 @@ import com.github.whitescent.mastify.ui.component.LocalizedAnnotatedText
import com.github.whitescent.mastify.ui.component.WidthSpacer
import com.github.whitescent.mastify.ui.theme.AppTheme
import com.github.whitescent.mastify.utils.FormatFactory.getRelativeTimeSpanString
import com.github.whitescent.mastify.utils.clickableWithoutIndication
import kotlinx.datetime.toInstant

@OptIn(ExperimentalLayoutApi::class)
Expand All @@ -75,6 +75,7 @@ fun BasicEvent(
Row(
modifier = modifier
.fillMaxWidth()
.clickableWithoutIndication { navigateToDetail(status.actionable) },
) {
Column(horizontalAlignment = Alignment.CenterHorizontally) {
CircleShapeAsyncImage(
Expand Down Expand Up @@ -142,16 +143,13 @@ fun BasicEvent(
)
}
HeightSpacer(value = 4.dp)
when (status.content.isNotBlank()) {
when (status.hasVisibleText) {
true -> {
Column {
Box(
modifier = Modifier
.fillMaxWidth()
.clip(AppTheme.shape.smallAvatar)
.clickable {
navigateToDetail(status.actionable)
}
.background(
color = when (event !is Notification.Type.Mention) {
true -> AppTheme.colors.secondaryBackground
Expand Down

0 comments on commit fe743a7

Please sign in to comment.