Only allow edit cover of favorited entries (#785)
* allow edit cover only if manga is favorite * correctly using `is` condition
This commit is contained in:
parent
f0d9eb0a61
commit
43c0940fa9
2 changed files with 3 additions and 3 deletions
|
|
@ -99,13 +99,13 @@ fun ExtensionIcon(
|
|||
is Extension.Installed -> {
|
||||
val icon by extension.getIcon(density)
|
||||
when (icon) {
|
||||
Result.Loading -> Box(modifier = modifier)
|
||||
is Result.Loading -> Box(modifier = modifier)
|
||||
is Result.Success -> Image(
|
||||
bitmap = (icon as Result.Success<ImageBitmap>).value,
|
||||
contentDescription = null,
|
||||
modifier = modifier,
|
||||
)
|
||||
Result.Error -> Image(
|
||||
is Result.Error -> Image(
|
||||
bitmap = ImageBitmap.imageResource(id = R.mipmap.ic_default_source),
|
||||
contentDescription = null,
|
||||
modifier = modifier,
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ fun MangaCoverDialog(
|
|||
),
|
||||
),
|
||||
)
|
||||
if (onEditClick != null) {
|
||||
if (onEditClick != null && manga.favorite) {
|
||||
Box {
|
||||
var expanded by remember { mutableStateOf(false) }
|
||||
IconButton(
|
||||
|
|
|
|||
Loading…
Reference in a new issue