From cbc114608b76a083b4db8f66abde456a32b61638 Mon Sep 17 00:00:00 2001 From: FourTOne5 <59261191+FourTOne5@users.noreply.github.com> Date: Mon, 16 May 2022 22:04:54 +0600 Subject: [PATCH] Fix both warning banner appearing for unofficial ext (#7150) --- .../browse/ExtensionDetailsScreen.kt | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt index fdfd9ece1..c18d573e6 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/ExtensionDetailsScreen.kt @@ -68,16 +68,15 @@ fun ExtensionDetailsScreen( modifier = Modifier.nestedScroll(nestedScrollInterop), contentPadding = WindowInsets.navigationBars.asPaddingValues(), ) { - if (extension.isObsolete) { - item { - WarningBanner(R.string.obsolete_extension_message) - } - } - - if (extension.isUnofficial) { - item { - WarningBanner(R.string.unofficial_extension_message) - } + when { + extension.isUnofficial -> + item { + WarningBanner(R.string.unofficial_extension_message) + } + extension.isObsolete -> + item { + WarningBanner(R.string.obsolete_extension_message) + } } item {