diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SettingsScreen.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SettingsScreen.kt index ef5250424a9e..f17548eeb60f 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SettingsScreen.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/compose/screen/SettingsScreen.kt @@ -27,7 +27,6 @@ import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.SharedFlow import me.onebone.toolbar.ScrollStrategy import me.onebone.toolbar.rememberCollapsingToolbarScaffoldState -import net.mullvad.mullvadvpn.BuildConfig import net.mullvad.mullvadvpn.R import net.mullvad.mullvadvpn.compose.cell.DefaultExternalLinkView import net.mullvad.mullvadvpn.compose.cell.NavigationCellBody @@ -38,7 +37,7 @@ import net.mullvad.mullvadvpn.compose.component.drawVerticalScrollbar import net.mullvad.mullvadvpn.compose.extensions.itemWithDivider import net.mullvad.mullvadvpn.compose.state.SettingsUiState import net.mullvad.mullvadvpn.compose.test.LAZY_LIST_TEST_TAG -import net.mullvad.mullvadvpn.lib.common.constant.BuildTypes +import net.mullvad.mullvadvpn.constant.IS_PLAY_BUILD import net.mullvad.mullvadvpn.lib.common.util.openLink import net.mullvad.mullvadvpn.lib.theme.Dimens import net.mullvad.mullvadvpn.util.appendHideNavOnPlayBuild @@ -138,7 +137,7 @@ fun SettingsScreen( }, bodyView = @Composable { - if (BuildConfig.BUILD_TYPE != BuildTypes.RELEASE) { + if (IS_PLAY_BUILD.not()) { NavigationCellBody( content = uiState.appVersion, contentBodyDescription = @@ -154,7 +153,7 @@ fun SettingsScreen( } }, showWarning = uiState.isUpdateAvailable, - isRowEnabled = BuildConfig.BUILD_TYPE != BuildTypes.RELEASE + isRowEnabled = IS_PLAY_BUILD.not() ) } if (uiState.isUpdateAvailable) { @@ -183,7 +182,7 @@ fun SettingsScreen( ) } - if (BuildConfig.BUILD_TYPE != BuildTypes.RELEASE) { + if (IS_PLAY_BUILD.not()) { itemWithDivider { val faqGuideLabel = stringResource(id = R.string.faqs_and_guides) NavigationComposeCell( diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/OutOfTimeFragment.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/OutOfTimeFragment.kt index 1a59f19ff760..c5a5ee76346f 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/OutOfTimeFragment.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/OutOfTimeFragment.kt @@ -16,10 +16,9 @@ import kotlinx.coroutines.flow.emptyFlow import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.map import kotlinx.coroutines.launch -import net.mullvad.mullvadvpn.BuildConfig import net.mullvad.mullvadvpn.R import net.mullvad.mullvadvpn.constant.ACCOUNT_EXPIRY_POLL_INTERVAL -import net.mullvad.mullvadvpn.lib.common.constant.BuildTypes +import net.mullvad.mullvadvpn.constant.IS_PLAY_BUILD import net.mullvad.mullvadvpn.lib.common.util.JobTracker import net.mullvad.mullvadvpn.lib.common.util.openAccountPageInBrowser import net.mullvad.mullvadvpn.model.TunnelState @@ -78,7 +77,7 @@ class OutOfTimeFragment : BaseFragment() { view.findViewById(R.id.account_credit_has_expired).text = buildString { append(requireActivity().getString(R.string.account_credit_has_expired)) - if (BuildConfig.BUILD_TYPE != BuildTypes.RELEASE) { + if (IS_PLAY_BUILD.not()) { append(" ") append(requireActivity().getString(R.string.add_time_to_account)) } @@ -106,7 +105,7 @@ class OutOfTimeFragment : BaseFragment() { isEnabled = true } - sitePaymentButton.isVisible = BuildTypes.RELEASE != BuildConfig.BUILD_TYPE + sitePaymentButton.isVisible = IS_PLAY_BUILD.not() redeemButton = view.findViewById(R.id.redeem_voucher).apply { diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/WelcomeFragment.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/WelcomeFragment.kt index 706bbc48586a..6c9fa0c4c75d 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/WelcomeFragment.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/fragment/WelcomeFragment.kt @@ -6,10 +6,9 @@ import android.view.View import android.view.ViewGroup import androidx.compose.runtime.collectAsState import androidx.compose.ui.platform.ComposeView -import net.mullvad.mullvadvpn.BuildConfig import net.mullvad.mullvadvpn.R import net.mullvad.mullvadvpn.compose.screen.WelcomeScreen -import net.mullvad.mullvadvpn.lib.common.constant.BuildTypes +import net.mullvad.mullvadvpn.constant.IS_PLAY_BUILD import net.mullvad.mullvadvpn.lib.theme.AppTheme import net.mullvad.mullvadvpn.ui.MainActivity import net.mullvad.mullvadvpn.viewmodel.WelcomeViewModel @@ -29,7 +28,7 @@ class WelcomeFragment : BaseFragment() { AppTheme { val state = vm.uiState.collectAsState().value WelcomeScreen( - showSitePayment = BuildTypes.RELEASE != BuildConfig.BUILD_TYPE, + showSitePayment = IS_PLAY_BUILD.not(), uiState = state, viewActions = vm.viewActions, onSitePaymentClick = vm::onSitePaymentClick,