Remove debug switch
This commit is contained in:
parent
e7b9269ab0
commit
dec32634b5
@ -29,11 +29,6 @@ fun FavoritesScreen(viewModel: FavouritesViewModel) {
|
||||
|
||||
@Composable
|
||||
fun Favorites(favoritesViewModel: FavouritesViewModel) {
|
||||
// Function to toggle debug mode
|
||||
val toggleDebugMode: () -> Unit = {
|
||||
favoritesViewModel.toggleDebugMode()
|
||||
}
|
||||
|
||||
LaunchedEffect(Unit) {
|
||||
favoritesViewModel.loadFavourites()
|
||||
}
|
||||
@ -72,11 +67,6 @@ fun Favorites(favoritesViewModel: FavouritesViewModel) {
|
||||
)
|
||||
}
|
||||
|
||||
Text(
|
||||
text = "Toggle Debug Mode",
|
||||
modifier = Modifier.clickable { toggleDebugMode() }
|
||||
)
|
||||
|
||||
favorites?.let { favoritesList ->
|
||||
if (favoritesList.isNotEmpty()) {
|
||||
LazyVerticalGrid(
|
||||
|
@ -27,10 +27,6 @@ class FavouritesViewModel(private val favouritesRepository: FavouritesRepository
|
||||
private val _pokemonDetails = MutableStateFlow<List<PokemonDetails>?>(null)
|
||||
val pokemonDetails: StateFlow<List<PokemonDetails>?> = _pokemonDetails.asStateFlow()
|
||||
val accessCheckFailed: MutableState<Boolean> = mutableStateOf(false)
|
||||
|
||||
fun toggleDebugMode() {
|
||||
featureManager.setPaidFeatureEnabled(!featureManager.hasAccessToPaidFeature())
|
||||
}
|
||||
fun loadFavourites() {
|
||||
// featureManager.setPaidFeatureEnabled(false) enable and disable acccess
|
||||
// Ugly workaround to make sure all the favourites are loaded before displaying them
|
||||
|
Loading…
x
Reference in New Issue
Block a user