Skip to content

Commit cff3834

Browse files
committed
Fix setEmptyStateComposable dark theme
1 parent c8b01a0 commit cff3834

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

app/src/main/java/org/schabi/newpipe/ui/emptystate/EmptyStateUtil.kt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
package org.schabi.newpipe.ui.emptystate
44

5+
import androidx.compose.material3.LocalContentColor
6+
import androidx.compose.material3.MaterialTheme
7+
import androidx.compose.material3.contentColorFor
8+
import androidx.compose.runtime.CompositionLocalProvider
59
import androidx.compose.ui.platform.ComposeView
610
import androidx.compose.ui.platform.ViewCompositionStrategy
711
import org.schabi.newpipe.ui.theme.AppTheme
@@ -14,9 +18,13 @@ fun ComposeView.setEmptyStateComposable(
1418
setViewCompositionStrategy(strategy)
1519
setContent {
1620
AppTheme {
17-
EmptyStateComposable(
18-
spec = spec
19-
)
21+
CompositionLocalProvider(
22+
LocalContentColor provides contentColorFor(MaterialTheme.colorScheme.background)
23+
) {
24+
EmptyStateComposable(
25+
spec = spec
26+
)
27+
}
2028
}
2129
}
2230
}

0 commit comments

Comments
 (0)