Modern Apps git

← Modern-Apps.git

photos: format taken-on date via DateString

Commit
58ec6af39b98a68fe90fc1a166672bf215a38b30
Author
Vayun Mathur <[email protected]>
When
2026-08-10 18:56 UTC (3 months ago)
Parents
c456234

Diff

photos/src/main/java/com/vayunmathur/photos/ui/PhotoPage.kt
diff --git a/photos/src/main/java/com/vayunmathur/photos/ui/PhotoPage.kt b/photos/src/main/java/com/vayunmathur/photos/ui/PhotoPage.ktindex c938aa4728..e794a46523 100644--- a/photos/src/main/java/com/vayunmathur/photos/ui/PhotoPage.kt+++ b/photos/src/main/java/com/vayunmathur/photos/ui/PhotoPage.kt@@ -2,8 +2,7 @@ package com.vayunmathur.photos.ui  import com.vayunmathur.library.ui.ExternalIntents import com.vayunmathur.library.ui.R as UiR-import com.vayunmathur.library.util.DateNameStyle-import com.vayunmathur.library.util.localizedMonthNames+import com.vayunmathur.library.ui.DateString import android.app.Activity import android.content.Context import android.content.Intent@@ -96,13 +95,10 @@ import androidx.lifecycle.LifecycleEventObserver import androidx.lifecycle.compose.LocalLifecycleOwner import kotlin.math.absoluteValue import kotlin.time.Instant-import kotlinx.coroutines.Dispatchers-import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.filter import kotlinx.coroutines.withContext-import kotlinx.datetime.TimeZone-import kotlinx.datetime.number-import kotlinx.datetime.toLocalDateTime+import kotlinx.coroutines.Dispatchers+import kotlinx.coroutines.flow.distinctUntilChanged  // Helper class to store zoom information data class ZoomState(val scale: Float = 1f, val offset: Offset = Offset.Zero)@@ -480,11 +476,7 @@ fun PhotoDetailView(                  val dateFormatted =                         remember(photo.date) {-                            Instant.fromEpochMilliseconds(photo.date)-                                    .toLocalDateTime(TimeZone.currentSystemDefault())-                                    .let {-                                        "${it.day} ${localizedMonthNames(DateNameStyle.FULL)[it.month.number - 1]} ${it.year}"-                                    }+                            DateString.dateLong(Instant.fromEpochMilliseconds(photo.date))                         }                  Text(