--- a/app/src/main/java/com/geekorum/ttrss/settings/manage_features/ManageFeaturesFragment.kt Sun May 21 20:34:39 2023 -0400
+++ b/app/src/main/java/com/geekorum/ttrss/settings/manage_features/ManageFeaturesFragment.kt Sun May 21 20:37:08 2023 -0400
@@ -30,7 +30,7 @@
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.itemsIndexed
-import androidx.compose.material.*
+import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
@@ -41,7 +41,7 @@
import androidx.fragment.app.viewModels
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.geekorum.ttrss.R
-import com.geekorum.ttrss.ui.AppTheme
+import com.geekorum.ttrss.ui.AppTheme3
import dagger.hilt.android.AndroidEntryPoint
@AndroidEntryPoint
@@ -52,7 +52,7 @@
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
return ComposeView(requireContext()).apply {
setContent {
- AppTheme {
+ AppTheme3 {
ManageFeaturesScreen(viewModel, onInstallFeatureClick = {
val intent = Intent(context, InstallFeatureActivity::class.java).apply {
putExtra(InstallFeatureActivity.EXTRA_FEATURES_LIST, arrayOf(it))
@@ -111,7 +111,6 @@
}
}
-@OptIn(ExperimentalMaterialApi::class)
@Composable
private fun FeatureItem(
feature: FeatureStatus,
@@ -119,7 +118,7 @@
onInstallClick: () -> Unit,
onUninstallClick: () -> Unit
) {
- ListItem(trailing = {
+ ListItem(trailingContent = {
if (feature.installed && isEditable) {
TextButton(onClick = onUninstallClick) {
Text(stringResource(R.string.btn_uninstall_feature))
@@ -129,16 +128,17 @@
Text(stringResource(R.string.btn_install_feature))
}
}
- }) {
- Text(feature.name)
- }
+ },
+ headlineContent = {
+ Text(feature.name)
+ })
}
@SuppressLint("UnusedMaterialScaffoldPaddingParameter")
@Preview
@Composable
private fun PreviewManageFeaturesScreen() {
- AppTheme {
+ AppTheme3 {
val features = listOf(
FeatureStatus("manage feeds", true),
FeatureStatus("podcast feeds", false),