mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 07:13:00 +00:00 
			
		
		
		
	Fix content color in comment replies fragment
This commit is contained in:
		| @@ -6,10 +6,13 @@ import androidx.compose.foundation.lazy.LazyColumn | ||||
| import androidx.compose.foundation.lazy.rememberLazyListState | ||||
| import androidx.compose.material3.ExperimentalMaterial3Api | ||||
| import androidx.compose.material3.HorizontalDivider | ||||
| import androidx.compose.material3.LocalContentColor | ||||
| import androidx.compose.material3.MaterialTheme | ||||
| import androidx.compose.material3.ModalBottomSheet | ||||
| import androidx.compose.material3.Text | ||||
| import androidx.compose.material3.contentColorFor | ||||
| import androidx.compose.runtime.Composable | ||||
| import androidx.compose.runtime.CompositionLocalProvider | ||||
| import androidx.compose.runtime.remember | ||||
| import androidx.compose.runtime.rememberCoroutineScope | ||||
| import androidx.compose.ui.Modifier | ||||
| @@ -67,6 +70,12 @@ private fun CommentRepliesDialog( | ||||
|     val state = rememberLazyListState() | ||||
|  | ||||
|     ModalBottomSheet(onDismissRequest = onDismissRequest) { | ||||
|         CompositionLocalProvider( | ||||
|             // contentColorFor(MaterialTheme.colorScheme.containerColor), i.e. ModalBottomSheet's | ||||
|             // default background color, does not resolve correctly, so need to manually set the | ||||
|             // content color for MaterialTheme.colorScheme.background instead | ||||
|             LocalContentColor provides contentColorFor(MaterialTheme.colorScheme.background) | ||||
|         ) { | ||||
|             LazyColumnScrollbar( | ||||
|                 state = state, | ||||
|                 settings = ScrollbarSettings.Default.copy( | ||||
| @@ -104,7 +113,10 @@ private fun CommentRepliesDialog( | ||||
|                         if (comments.itemCount >= 0) { | ||||
|                             item { | ||||
|                                 Text( | ||||
|                                 modifier = Modifier.padding(horizontal = 12.dp, vertical = 4.dp), | ||||
|                                     modifier = Modifier.padding( | ||||
|                                         horizontal = 12.dp, | ||||
|                                         vertical = 4.dp | ||||
|                                     ), | ||||
|                                     text = pluralStringResource( | ||||
|                                         R.plurals.replies, comments.itemCount, comments.itemCount | ||||
|                                     ), | ||||
| @@ -120,6 +132,7 @@ private fun CommentRepliesDialog( | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
| @Preview(name = "Light mode", uiMode = Configuration.UI_MODE_NIGHT_NO) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Stypox
					Stypox