For #25209: Avoid trying to download wallpapers without a server URL.
This commit is contained in:
parent
c1d7d0b29c
commit
9a27030f87
|
@ -34,6 +34,10 @@ class WallpaperDownloader(
|
|||
* <WALLPAPER_URL>/<resolution>/<orientation>/<app theme>/<wallpaper theme>/<wallpaper name>.png
|
||||
*/
|
||||
suspend fun downloadWallpaper(wallpaper: Wallpaper.Remote) = withContext(Dispatchers.IO) {
|
||||
if (remoteHost.isNullOrEmpty()) {
|
||||
return@withContext
|
||||
}
|
||||
|
||||
for (metadata in wallpaper.toMetadata(context)) {
|
||||
val localFile = File(context.filesDir.absolutePath, metadata.localPath)
|
||||
if (localFile.exists()) continue
|
||||
|
|
Loading…
Reference in New Issue
Block a user