summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorAditya Wasan <adityawasan55@gmail.com>2021-11-03 18:09:38 +0530
committerAditya Wasan <adityawasan55@gmail.com>2021-11-03 18:09:38 +0530
commit2cf3ddf2aadad011f62ecafbbbf939fd0104cb43 (patch)
tree45fb72f8e737535f0e92cc7045d54da7db4c93e5 /app/src/main
parenta3f3ad184b7a44f3efb25ee8b1e611389bce85ba (diff)
Revert "app: add dynamic colors support to Compose"
This reverts commit 2a9d2177a5985a76020a5dc6b9248343d18e26bc.
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/ui/theme/Theme.kt17
1 files changed, 5 insertions, 12 deletions
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/theme/Theme.kt b/app/src/main/java/dev/msfjarvis/aps/ui/theme/Theme.kt
index b4f47cb2..55fb600d 100644
--- a/app/src/main/java/dev/msfjarvis/aps/ui/theme/Theme.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/ui/theme/Theme.kt
@@ -1,11 +1,8 @@
package dev.msfjarvis.aps.ui.theme
-import android.content.Context
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.darkColorScheme
-import androidx.compose.material3.dynamicDarkColorScheme
-import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.material3.lightColorScheme
import androidx.compose.runtime.Composable
@@ -67,16 +64,12 @@ private val DarkThemeColors =
)
@Composable
-fun APSTheme(
- useDynamicColors: Boolean = true,
- useDarkTheme: Boolean = isSystemInDarkTheme(),
- context: Context,
- content: @Composable () -> Unit,
-) {
+fun APSTheme(useDarkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) {
val colors =
- when (useDarkTheme) {
- true -> if (useDynamicColors) dynamicDarkColorScheme(context) else DarkThemeColors
- false -> if (useDynamicColors) dynamicLightColorScheme(context) else LightThemeColors
+ if (!useDarkTheme) {
+ LightThemeColors
+ } else {
+ DarkThemeColors
}
MaterialTheme(colorScheme = colors, typography = AppTypography, content = content)