From fcec1581b702bc01d33d71898d91e0552c24af0e Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 30 Oct 2022 10:48:21 -0400 Subject: [PATCH] Fix share menu item not appearing for entries not in library --- .../manga/components/MangaToolbar.kt | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/manga/components/MangaToolbar.kt b/app/src/main/java/eu/kanade/presentation/manga/components/MangaToolbar.kt index 9c92800ef3..d5dee6a646 100644 --- a/app/src/main/java/eu/kanade/presentation/manga/components/MangaToolbar.kt +++ b/app/src/main/java/eu/kanade/presentation/manga/components/MangaToolbar.kt @@ -156,7 +156,7 @@ fun MangaToolbar( Icon(Icons.Outlined.FilterList, contentDescription = stringResource(R.string.action_filter), tint = filterTint) } - if (onClickEditCategory != null && onClickMigrate != null) { + if (onClickEditCategory != null || onClickMigrate != null || onClickShare != null) { var moreExpanded by remember { mutableStateOf(false) } Box { IconButton(onClick = { moreExpanded = !moreExpanded }) { @@ -170,20 +170,24 @@ fun MangaToolbar( expanded = moreExpanded, onDismissRequest = onDismissRequest, ) { - DropdownMenuItem( - text = { Text(text = stringResource(R.string.action_edit_categories)) }, - onClick = { - onClickEditCategory() - onDismissRequest() - }, - ) - DropdownMenuItem( - text = { Text(text = stringResource(R.string.action_migrate)) }, - onClick = { - onClickMigrate() - onDismissRequest() - }, - ) + if (onClickEditCategory != null) { + DropdownMenuItem( + text = { Text(text = stringResource(R.string.action_edit_categories)) }, + onClick = { + onClickEditCategory() + onDismissRequest() + }, + ) + } + if (onClickMigrate != null) { + DropdownMenuItem( + text = { Text(text = stringResource(R.string.action_migrate)) }, + onClick = { + onClickMigrate() + onDismissRequest() + }, + ) + } if (onClickShare != null) { DropdownMenuItem( text = { Text(text = stringResource(R.string.action_share)) },