Apply suggestion:

- Added `MediaSource.safeUrl` property replacing `withCleanUrl` method.
- Made `url` private so it can't be used externally.
- Reverted code in `CoilMediaFetcher`
- Also add tests
This commit is contained in:
Jorge Martín 2026-02-27 09:33:03 +01:00
parent fecbabb0e4
commit 5fb9dcb0da
9 changed files with 50 additions and 41 deletions

View file

@ -101,7 +101,7 @@ class DefaultNotificationMediaRepo(
}
}
private fun MediaSource.cachedFile(): File? = mxcTools.mxcUri2FilePath(url)?.let {
private fun MediaSource.cachedFile(): File? = mxcTools.mxcUri2FilePath(safeUrl)?.let {
File("${cacheDir.path}/$CACHE_NOTIFICATION_SUBDIR/$it")
}
}