mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
fixing a crash at updating the widget
This commit is contained in:
parent
a9bbe65999
commit
82ca23935a
1 changed files with 2 additions and 2 deletions
|
@ -40,9 +40,9 @@ class MyWidgetProvider : AppWidgetProvider() {
|
||||||
setText(R.id.widget_folder_name, context.getFolderNameFromPath(it.folderPath))
|
setText(R.id.widget_folder_name, context.getFolderNameFromPath(it.folderPath))
|
||||||
}
|
}
|
||||||
|
|
||||||
val path = context.directoryDB.getDirectoryThumbnail(it.folderPath)
|
val path = context.directoryDB.getDirectoryThumbnail(it.folderPath) ?: return@forEach
|
||||||
val options = RequestOptions()
|
val options = RequestOptions()
|
||||||
.signature(path!!.getFileSignature())
|
.signature(path.getFileSignature())
|
||||||
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
|
||||||
if (context.config.cropThumbnails) options.centerCrop() else options.fitCenter()
|
if (context.config.cropThumbnails) options.centerCrop() else options.fitCenter()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue