From fbdb99019e8735832cd097f8be02325495beb547 Mon Sep 17 00:00:00 2001 From: hayaksi1 <193020925+hayaksi1@users.noreply.github.com> Date: Sun, 9 Aug 2026 15:40:20 +0300 Subject: [PATCH] Drop the MediaStore explanation from the save helper Review feedback: the retry itself is short enough to read, and the platform limit it works around belongs in the commit, not the source. The contract of the name helper keeps its one-line KDoc. --- .../element/android/libraries/androidutils/file/File.kt | 9 --------- 1 file changed, 9 deletions(-) diff --git a/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/file/File.kt b/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/file/File.kt index dd8dc4eeb0..7c5f0450e9 100644 --- a/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/file/File.kt +++ b/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/file/File.kt @@ -55,15 +55,6 @@ fun String.withFileNameSuffix(suffix: String): String { } } -/** - * Runs [saveAs] with [fileName], and runs it once more with a suffixed name if the platform failed to - * build a unique name for it. - * - * `MediaStore` de-duplicates the display name of a new file itself, but gives up after 32 conflicts - * and throws `IllegalStateException("Failed to build unique file")`, which makes saving a file with a - * common name such as `image.png` fail for good. - * See https://github.com/element-hq/element-x-android/issues/6371 - */ fun saveWithUniqueFileName( fileName: String, uniqueSuffix: () -> String = { "_${System.currentTimeMillis()}" },