Fix setEmptyStateComposable dark theme

This commit is contained in:
Stypox 2024-11-21 13:17:33 +01:00
parent c8b01a06b0
commit cff3834fde
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
1 changed files with 11 additions and 3 deletions

View File

@ -2,6 +2,10 @@
package org.schabi.newpipe.ui.emptystate
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.contentColorFor
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.platform.ComposeView
import androidx.compose.ui.platform.ViewCompositionStrategy
import org.schabi.newpipe.ui.theme.AppTheme
@ -14,9 +18,13 @@ fun ComposeView.setEmptyStateComposable(
setViewCompositionStrategy(strategy)
setContent {
AppTheme {
EmptyStateComposable(
spec = spec
)
CompositionLocalProvider(
LocalContentColor provides contentColorFor(MaterialTheme.colorScheme.background)
) {
EmptyStateComposable(
spec = spec
)
}
}
}
}