Update the error management
This commit is contained in:
parent
a55e2c8162
commit
4123eaeccd
10 changed files with 152 additions and 109 deletions
|
|
@ -32,6 +32,7 @@ import androidx.compose.ui.unit.dp
|
|||
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
|
||||
import androidx.core.view.WindowCompat
|
||||
import com.pixelized.rplexicon.ui.composable.BlurredOverlayHost
|
||||
import com.pixelized.rplexicon.ui.composable.error.HandleFetchError
|
||||
import com.pixelized.rplexicon.ui.navigation.ScreenNavHost
|
||||
import com.pixelized.rplexicon.ui.screens.rolls.BlurredRollOverlayHostState
|
||||
import com.pixelized.rplexicon.ui.screens.rolls.RollOverlay
|
||||
|
|
@ -124,6 +125,7 @@ class MainActivity : ComponentActivity() {
|
|||
),
|
||||
content = {
|
||||
Text(
|
||||
modifier = Modifier.padding(vertical = 8.dp),
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
text = it.visuals.message,
|
||||
)
|
||||
|
|
@ -137,11 +139,10 @@ class MainActivity : ComponentActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(key1 = "LauncherError") {
|
||||
launcherViewModel.error.collect {
|
||||
snack.showSnackbar(message = it)
|
||||
}
|
||||
}
|
||||
HandleFetchError(
|
||||
snack = snack,
|
||||
errors = launcherViewModel.error,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue