mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-21 11:41:48 +01:00
ScanlatorFilterDialog: Fix crash when no scanlator (#10111)
This commit is contained in:
parent
8f22480ec9
commit
d7442d771b
@ -106,27 +106,27 @@ fun ScanlatorFilterDialog(
|
|||||||
usePlatformDefaultWidth = true,
|
usePlatformDefaultWidth = true,
|
||||||
),
|
),
|
||||||
confirmButton = {
|
confirmButton = {
|
||||||
FlowRow {
|
if (sortedAvailableScanlators.isEmpty()) {
|
||||||
if (sortedAvailableScanlators.isEmpty()) {
|
|
||||||
TextButton(onClick = onDismissRequest) {
|
|
||||||
Text(text = stringResource(R.string.action_cancel))
|
|
||||||
}
|
|
||||||
return@FlowRow
|
|
||||||
}
|
|
||||||
TextButton(onClick = mutableExcludedScanlators::clear) {
|
|
||||||
Text(text = stringResource(R.string.action_reset))
|
|
||||||
}
|
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
|
||||||
TextButton(onClick = onDismissRequest) {
|
TextButton(onClick = onDismissRequest) {
|
||||||
Text(text = stringResource(R.string.action_cancel))
|
Text(text = stringResource(R.string.action_cancel))
|
||||||
}
|
}
|
||||||
TextButton(
|
} else {
|
||||||
onClick = {
|
FlowRow {
|
||||||
onConfirm(mutableExcludedScanlators.toSet())
|
TextButton(onClick = mutableExcludedScanlators::clear) {
|
||||||
onDismissRequest()
|
Text(text = stringResource(R.string.action_reset))
|
||||||
},
|
}
|
||||||
) {
|
Spacer(modifier = Modifier.weight(1f))
|
||||||
Text(text = stringResource(R.string.action_ok))
|
TextButton(onClick = onDismissRequest) {
|
||||||
|
Text(text = stringResource(R.string.action_cancel))
|
||||||
|
}
|
||||||
|
TextButton(
|
||||||
|
onClick = {
|
||||||
|
onConfirm(mutableExcludedScanlators.toSet())
|
||||||
|
onDismissRequest()
|
||||||
|
},
|
||||||
|
) {
|
||||||
|
Text(text = stringResource(R.string.action_ok))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user