Switch to seconds for DATE_MODIFIED of saved pages (#552)

While most Android skins are seemingly able to handle the millisecond
format, the documentation technically specifies seconds. This seems to
be causing issues on Samsung devices using the Samsung Gallery app,
which renders the millisecond timestamps as if they were second ones,
causing the dates to be set at some point in the year 56189.

This change should fix that issue on Samsung devices and have no real
impact on the rest.

(cherry picked from commit 0ea0138a73466af3d371a48e344753844e9bc3d8)
This commit is contained in:
MajorTanya 2024-03-21 06:37:17 +01:00 committed by Jobobby04
parent 5a71889679
commit 8762b20ab6

View File

@ -79,7 +79,7 @@ class ImageSaver(
MediaStore.Images.Media.RELATIVE_PATH to relativePath,
MediaStore.Images.Media.DISPLAY_NAME to image.name,
MediaStore.Images.Media.MIME_TYPE to type.mime,
MediaStore.Images.Media.DATE_MODIFIED to Instant.now().toEpochMilli(),
MediaStore.Images.Media.DATE_MODIFIED to Instant.now().epochSecond,
)
val picture = findUriOrDefault(relativePath, filename) {