fix: link color

This commit is contained in:
FunkyMuse 2023-09-20 10:38:47 +02:00
parent 8c7f434438
commit 9a4d13e279
1 changed files with 2 additions and 3 deletions

View File

@ -5,7 +5,6 @@ import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import com.simplemobiletools.commons.compose.extensions.enableEdgeToEdgeSimple
import com.simplemobiletools.commons.compose.extensions.onEventValue
import com.simplemobiletools.commons.compose.theme.AppThemeSurface
@ -24,7 +23,7 @@ class MainActivity : ComponentActivity() {
enableEdgeToEdgeSimple()
setContent {
AppThemeSurface {
val linkColor = rememberLinkColor()
val linkColor = linkColor()
val showMoreApps = onEventValue { !resources.getBoolean(R.bool.hide_google_relations) }
MainScreen(
linkColor = linkColor,
@ -40,7 +39,7 @@ class MainActivity : ComponentActivity() {
}
@Composable
private fun rememberLinkColor() = remember {
private fun linkColor() = onEventValue {
when {
isWhiteTheme() || isBlackAndWhiteTheme() -> baseConfig.accentColor
else -> getProperPrimaryColor()