mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 11:07:04 +05:30
fix(common): use SystemClock
for getting current millis
This commit is contained in:
parent
44be6eacbb
commit
42cc852a20
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
package dev.msfjarvis.claw.common.comments
|
package dev.msfjarvis.claw.common.comments
|
||||||
|
|
||||||
|
import android.os.SystemClock
|
||||||
import android.text.format.DateUtils
|
import android.text.format.DateUtils
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
|
@ -191,7 +192,7 @@ fun buildCommenterString(
|
||||||
createdAt: TemporalAccessor,
|
createdAt: TemporalAccessor,
|
||||||
updatedAt: TemporalAccessor,
|
updatedAt: TemporalAccessor,
|
||||||
): AnnotatedString {
|
): AnnotatedString {
|
||||||
val now = System.currentTimeMillis()
|
val now = SystemClock.elapsedRealtime()
|
||||||
val createdRelative =
|
val createdRelative =
|
||||||
remember(createdAt) {
|
remember(createdAt) {
|
||||||
DateUtils.getRelativeTimeSpanString(
|
DateUtils.getRelativeTimeSpanString(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue