Small refactoring before release.
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
package com.vitorpamplona.amethyst.ui.layouts
|
package com.vitorpamplona.amethyst.ui.layouts
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import androidx.compose.foundation.Image
|
import androidx.compose.foundation.Image
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
@@ -13,7 +12,6 @@ import androidx.compose.material3.Divider
|
|||||||
import androidx.compose.material3.ListItem
|
import androidx.compose.material3.ListItem
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.getValue
|
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
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.amethyst.ui.theme.StdTopPadding
|
||||||
import com.vitorpamplona.quartz.utils.TimeUtils
|
import com.vitorpamplona.quartz.utils.TimeUtils
|
||||||
|
|
||||||
@SuppressLint("UnrememberedMutableState")
|
|
||||||
@Composable
|
@Composable
|
||||||
@Preview
|
@Preview
|
||||||
fun ChannelNamePreview() {
|
fun ChannelNamePreview() {
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ fun ChatroomHeaderCompose(
|
|||||||
if (hasEvent) {
|
if (hasEvent) {
|
||||||
ChatroomComposeChannelOrUser(baseNote, accountViewModel, nav)
|
ChatroomComposeChannelOrUser(baseNote, accountViewModel, nav)
|
||||||
} else {
|
} else {
|
||||||
BlankNote(Modifier)
|
BlankNote()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -394,7 +394,7 @@ private fun WatchNotificationChanges(
|
|||||||
accountViewModel: AccountViewModel,
|
accountViewModel: AccountViewModel,
|
||||||
onNewStatus: (Boolean) -> Unit
|
onNewStatus: (Boolean) -> Unit
|
||||||
) {
|
) {
|
||||||
LaunchedEffect(key1 = note, accountViewModel.accountMarkAsReadUpdates.value) {
|
LaunchedEffect(key1 = note, accountViewModel.accountMarkAsReadUpdates.intValue) {
|
||||||
launch(Dispatchers.IO) {
|
launch(Dispatchers.IO) {
|
||||||
note.event?.createdAt()?.let {
|
note.event?.createdAt()?.let {
|
||||||
val lastTime = accountViewModel.account.loadLastRead(route)
|
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
|
@Composable
|
||||||
private fun TimeAgo(channelLastTime: Long?) {
|
private fun TimeAgo(channelLastTime: Long?) {
|
||||||
if (channelLastTime == null) return
|
if (channelLastTime == null) return
|
||||||
|
|||||||
Reference in New Issue
Block a user