|
|
@ -131,7 +131,7 @@ class MainActivity : ComponentActivity() {
|
|
|
|
* Returns `true` if the Android theme should be used, as a function of the [uiState].
|
|
|
|
* Returns `true` if the Android theme should be used, as a function of the [uiState].
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Composable
|
|
|
|
@Composable
|
|
|
|
fun shouldUseAndroidTheme(
|
|
|
|
private fun shouldUseAndroidTheme(
|
|
|
|
uiState: MainActivityUiState,
|
|
|
|
uiState: MainActivityUiState,
|
|
|
|
): Boolean = when (uiState) {
|
|
|
|
): Boolean = when (uiState) {
|
|
|
|
Loading -> false
|
|
|
|
Loading -> false
|
|
|
@ -146,7 +146,7 @@ fun shouldUseAndroidTheme(
|
|
|
|
* current system context.
|
|
|
|
* current system context.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Composable
|
|
|
|
@Composable
|
|
|
|
fun shouldUseDarkTheme(
|
|
|
|
private fun shouldUseDarkTheme(
|
|
|
|
uiState: MainActivityUiState,
|
|
|
|
uiState: MainActivityUiState,
|
|
|
|
): Boolean = when (uiState) {
|
|
|
|
): Boolean = when (uiState) {
|
|
|
|
Loading -> isSystemInDarkTheme()
|
|
|
|
Loading -> isSystemInDarkTheme()
|
|
|
|