fix(mobile): show memory and folder dates in local time (#28941)

This commit is contained in:
Santo Shakil
2026-06-09 21:55:43 +06:00
committed by GitHub
parent a665cec920
commit fe9ca4f40a
2 changed files with 3 additions and 3 deletions
@@ -197,7 +197,7 @@ class FolderContent extends HookConsumerWidget {
style: context.textTheme.titleSmall?.copyWith(fontWeight: FontWeight.w600),
),
subtitle: Text(
"${asset.exifInfo.fileSize != null ? formatBytes(asset.exifInfo.fileSize ?? 0) : ""}${DateFormat.yMMMd().format(asset.createdAt)}",
"${asset.exifInfo.fileSize != null ? "${formatBytes(asset.exifInfo.fileSize ?? 0)}" : ""}${DateFormat.yMMMd().format(asset.createdAt.toLocal())}",
style: context.textTheme.bodyMedium?.copyWith(color: context.colorScheme.onSurfaceSecondary),
),
),
@@ -30,7 +30,7 @@ class DriftMemoryBottomInfo extends StatelessWidget {
style: TextStyle(color: Colors.grey[400], fontSize: 13.0, fontWeight: FontWeight.w500),
),
Text(
df.format(fileCreatedDate),
df.format(fileCreatedDate.toLocal()),
style: const TextStyle(color: Colors.white, fontSize: 15.0, fontWeight: FontWeight.w500),
),
],
@@ -41,7 +41,7 @@ class DriftMemoryBottomInfo extends StatelessWidget {
minWidth: 0,
onPressed: () async {
await context.router.navigate(const TabShellRoute(children: [MainTimelineRoute()]));
EventStream.shared.emit(ScrollToDateEvent(fileCreatedDate));
EventStream.shared.emit(ScrollToDateEvent(fileCreatedDate.toLocal()));
},
shape: const CircleBorder(),
color: Colors.white.withValues(alpha: 0.2),