compose: download: Fix downloadedAt date formatting

We should be consistent with date formatting across the app

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2025-12-16 17:08:09 +08:00
parent 368dfb4ea1
commit 9868f3f468

View File

@@ -49,7 +49,6 @@ import com.aurora.store.data.room.download.Download
import com.aurora.store.util.CommonUtil.getETAString import com.aurora.store.util.CommonUtil.getETAString
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import java.util.Date
/** /**
* Composable to display details of a download in a list * Composable to display details of a download in a list
@@ -157,10 +156,10 @@ fun DownloadListItem(
text = if (status in DownloadStatus.running) { text = if (status in DownloadStatus.running) {
"$progress$speed$eta" "$progress$speed$eta"
} else { } else {
DateUtils.getRelativeTimeSpanString( DateUtils.formatDateTime(
LocalContext.current,
download.downloadedAt, download.downloadedAt,
Date().time, DateUtils.FORMAT_SHOW_DATE
DateUtils.DAY_IN_MILLIS
).toString() ).toString()
} }
) )