Don't set text colors when creating compose theme (#7316)
This avoids compose snackbar text color issue
This commit is contained in:
parent
017f6b22f0
commit
4ef337f1e9
@ -14,7 +14,6 @@ fun TachiyomiTheme(content: @Composable () -> Unit) {
|
||||
val (colorScheme, typography) = createMdc3Theme(
|
||||
context = context,
|
||||
layoutDirection = layoutDirection,
|
||||
setTextColors = true,
|
||||
)
|
||||
|
||||
MaterialTheme(
|
||||
|
@ -4,7 +4,10 @@ import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.compose.foundation.layout.consumeWindowInsets
|
||||
import androidx.compose.material3.LocalContentColor
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.ui.input.nestedscroll.NestedScrollConnection
|
||||
import androidx.compose.ui.platform.ViewCompositionStrategy
|
||||
import androidx.compose.ui.platform.rememberNestedScrollInteropConnection
|
||||
@ -32,12 +35,14 @@ abstract class ComposeController<P : Presenter<*>>(bundle: Bundle? = null) :
|
||||
setContent {
|
||||
val nestedScrollInterop = rememberNestedScrollInteropConnection()
|
||||
TachiyomiTheme {
|
||||
CompositionLocalProvider(LocalContentColor provides MaterialTheme.colorScheme.onBackground) {
|
||||
ComposeContent(nestedScrollInterop)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Basic Compose controller without a presenter.
|
||||
@ -58,12 +63,14 @@ abstract class BasicComposeController :
|
||||
setContent {
|
||||
val nestedScrollInterop = rememberNestedScrollInteropConnection()
|
||||
TachiyomiTheme {
|
||||
CompositionLocalProvider(LocalContentColor provides MaterialTheme.colorScheme.onBackground) {
|
||||
ComposeContent(nestedScrollInterop)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
abstract class SearchableComposeController<P : BasePresenter<*>>(bundle: Bundle? = null) :
|
||||
SearchableNucleusController<ComposeControllerBinding, P>(bundle),
|
||||
@ -81,12 +88,14 @@ abstract class SearchableComposeController<P : BasePresenter<*>>(bundle: Bundle?
|
||||
setContent {
|
||||
val nestedScrollInterop = rememberNestedScrollInteropConnection()
|
||||
TachiyomiTheme {
|
||||
CompositionLocalProvider(LocalContentColor provides MaterialTheme.colorScheme.onBackground) {
|
||||
ComposeContent(nestedScrollInterop)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface ComposeContentController {
|
||||
@Composable fun ComposeContent(nestedScrollInterop: NestedScrollConnection)
|
||||
|
Loading…
Reference in New Issue
Block a user