Small refactoring before release.

This commit is contained in:
Vitor Pamplona 2023-12-22 11:32:54 -05:00
parent e42d2dca04
commit 6c33dae498
2 changed files with 2 additions and 13 deletions

View File

@ -1,6 +1,5 @@
package com.vitorpamplona.amethyst.ui.layouts
import android.annotation.SuppressLint
import androidx.compose.foundation.Image
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
@ -13,7 +12,6 @@ import androidx.compose.material3.Divider
import androidx.compose.material3.ListItem
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@ -32,7 +30,6 @@ import com.vitorpamplona.amethyst.ui.theme.Size55Modifier
import com.vitorpamplona.amethyst.ui.theme.StdTopPadding
import com.vitorpamplona.quartz.utils.TimeUtils
@SuppressLint("UnrememberedMutableState")
@Composable
@Preview
fun ChannelNamePreview() {

View File

@ -71,7 +71,7 @@ fun ChatroomHeaderCompose(
if (hasEvent) {
ChatroomComposeChannelOrUser(baseNote, accountViewModel, nav)
} else {
BlankNote(Modifier)
BlankNote()
}
}
@ -394,7 +394,7 @@ private fun WatchNotificationChanges(
accountViewModel: AccountViewModel,
onNewStatus: (Boolean) -> Unit
) {
LaunchedEffect(key1 = note, accountViewModel.accountMarkAsReadUpdates.value) {
LaunchedEffect(key1 = note, accountViewModel.accountMarkAsReadUpdates.intValue) {
launch(Dispatchers.IO) {
note.event?.createdAt()?.let {
val lastTime = accountViewModel.account.loadLastRead(route)
@ -495,14 +495,6 @@ fun ChannelName(
)
}
@Composable
private fun FirstRow(
channelTitle: @Composable (Modifier) -> Unit,
channelLastTime: Long?,
modifier: Modifier
) {
}
@Composable
private fun TimeAgo(channelLastTime: Long?) {
if (channelLastTime == null) return