Skip to content

Commit

Permalink
remove expect/actual SystemBarColorEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
StageGuard committed Feb 10, 2025
1 parent c438e02 commit 49847ef
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import android.os.Build
import androidx.activity.ComponentActivity
import androidx.activity.SystemBarStyle
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.ColorScheme
import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compose.material3.dynamicLightColorScheme
Expand All @@ -22,6 +23,7 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import com.materialkolor.PaletteStyle
import com.materialkolor.dynamicColorScheme
import me.him188.ani.app.data.models.preference.DarkMode
import me.him188.ani.app.platform.findActivity

@Composable
Expand Down Expand Up @@ -55,7 +57,13 @@ actual fun appColorScheme(
}

@Composable
actual fun SystemBarColorEffect(isDark: Boolean) {
fun SystemBarColorEffect(
isDark: Boolean = when (LocalThemeSettings.current.darkMode) {
DarkMode.LIGHT -> false
DarkMode.DARK -> true
DarkMode.AUTO -> isSystemInDarkTheme()
},
) {
// Set statusBarStyle & navigationBarStyle
val activity = LocalContext.current.findActivity() as? ComponentActivity
if (activity != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,4 @@ actual fun appColorScheme(
modifyColorSchemeForBlackBackground(colorScheme, isDark, useBlackBackground)
},
)
}

@Composable
actual fun SystemBarColorEffect(isDark: Boolean) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,4 @@ actual fun appColorScheme(
modifyColorSchemeForBlackBackground(colorScheme, isDark, useBlackBackground)
},
)
}

@Composable
actual fun SystemBarColorEffect(isDark: Boolean) {
}

0 comments on commit 49847ef

Please sign in to comment.