mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-11 21:39:26 +02:00
Fixes caching of time display.
This commit is contained in:
parent
9e2b2cedd6
commit
a26c7e3d97
@ -2237,14 +2237,14 @@ fun MoreOptionsButton(
|
||||
|
||||
@Composable
|
||||
fun TimeAgo(note: Note) {
|
||||
val time = remember { note.createdAt() } ?: return
|
||||
val time = remember(note) { note.createdAt() } ?: return
|
||||
TimeAgo(time)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun TimeAgo(time: Long) {
|
||||
val context = LocalContext.current
|
||||
val timeStr by remember { mutableStateOf(timeAgo(time, context = context)) }
|
||||
val timeStr by remember(time) { mutableStateOf(timeAgo(time, context = context)) }
|
||||
|
||||
Text(
|
||||
text = timeStr,
|
||||
|
Loading…
x
Reference in New Issue
Block a user