Merge pull request #3090 from kiwix/Issue#2772

This commit is contained in:
Kelson 2022-09-28 17:56:16 +02:00 committed by GitHub
commit 0030e2e28a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 2 additions and 0 deletions

View File

@ -24,11 +24,13 @@ import androidx.annotation.ColorInt
import androidx.annotation.DrawableRes
import androidx.core.content.ContextCompat
import androidx.core.widget.ImageViewCompat
import org.kiwix.kiwixmobile.core.R
import org.kiwix.kiwixmobile.core.downloader.model.Base64String
fun ImageView.setBitmap(base64String: Base64String) {
base64String.toBitmap()
?.let(::setImageBitmap)
?: kotlin.run { setImageDrawableCompat(R.drawable.default_zim_file_icon) }
}
// methods that accept inline classes as parameters are not allowed to be called from java

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB