From c9afec47cd312b1037f6c915205d7a49cfeedc43 Mon Sep 17 00:00:00 2001 From: davotoula Date: Fri, 20 Mar 2026 19:24:49 +0100 Subject: [PATCH] style: run spotlessApply after M3 dialog migration Co-Authored-By: Claude Opus 4.6 --- .../lists/display/lists/PeopleListScreen.kt | 61 ++++++++----------- 1 file changed, 26 insertions(+), 35 deletions(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/lists/display/lists/PeopleListScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/lists/display/lists/PeopleListScreen.kt index 5c0c0602a..95b23a2ae 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/lists/display/lists/PeopleListScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/lists/display/lists/PeopleListScreen.kt @@ -38,11 +38,14 @@ import androidx.compose.foundation.lazy.itemsIndexed import androidx.compose.foundation.pager.HorizontalPager import androidx.compose.foundation.pager.PagerState import androidx.compose.foundation.pager.rememberPagerState +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.outlined.CellTower +import androidx.compose.material.icons.outlined.Delete +import androidx.compose.material.icons.outlined.Edit +import androidx.compose.material.icons.outlined.Share import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Card import androidx.compose.material3.CardDefaults.cardElevation -import androidx.compose.material3.DropdownMenu -import androidx.compose.material3.DropdownMenuItem import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.IconButton @@ -75,6 +78,9 @@ import com.vitorpamplona.amethyst.model.AddressableNote import com.vitorpamplona.amethyst.model.LocalCache import com.vitorpamplona.amethyst.model.User import com.vitorpamplona.amethyst.ui.components.ClickableBox +import com.vitorpamplona.amethyst.ui.components.M3ActionDialog +import com.vitorpamplona.amethyst.ui.components.M3ActionRow +import com.vitorpamplona.amethyst.ui.components.M3ActionSection import com.vitorpamplona.amethyst.ui.navigation.navs.EmptyNav import com.vitorpamplona.amethyst.ui.navigation.navs.INav import com.vitorpamplona.amethyst.ui.navigation.routes.Route @@ -416,15 +422,16 @@ private fun ListActionsMenuButton( onClick = { isActionListOpen.value = true }, ) { VerticalDotsIcon() + } - DropdownMenu( - expanded = isActionListOpen.value, - onDismissRequest = { isActionListOpen.value = false }, + if (isActionListOpen.value) { + val context = LocalContext.current + M3ActionDialog( + title = stringRes(R.string.list_actions_dialog_title), + onDismiss = { isActionListOpen.value = false }, ) { - val context = LocalContext.current - DropdownMenuItem( - text = { Text(stringRes(R.string.quick_action_share)) }, - onClick = { + M3ActionSection { + M3ActionRow(icon = Icons.Outlined.Share, text = stringRes(R.string.quick_action_share)) { val sendIntent = Intent().apply { action = Intent.ACTION_SEND @@ -443,38 +450,22 @@ private fun ListActionsMenuButton( Intent.createChooser(sendIntent, stringRes(context, R.string.quick_action_share)) ContextCompat.startActivity(context, shareIntent, null) isActionListOpen.value = false - }, - ) - HorizontalDivider(thickness = DividerThickness) - DropdownMenuItem( - text = { - Text(stringRes(R.string.follow_set_edit_list_metadata)) - }, - onClick = { + } + M3ActionRow(icon = Icons.Outlined.Edit, text = stringRes(R.string.follow_set_edit_list_metadata)) { onEditList() isActionListOpen.value = false - }, - ) - HorizontalDivider(thickness = DividerThickness) - DropdownMenuItem( - text = { - Text(stringRes(R.string.follow_set_broadcast)) - }, - onClick = { + } + M3ActionRow(icon = Icons.Outlined.CellTower, text = stringRes(R.string.follow_set_broadcast)) { onBroadcastList() isActionListOpen.value = false - }, - ) - HorizontalDivider(thickness = DividerThickness) - DropdownMenuItem( - text = { - Text(stringRes(R.string.follow_set_delete)) - }, - onClick = { + } + } + M3ActionSection { + M3ActionRow(icon = Icons.Outlined.Delete, text = stringRes(R.string.follow_set_delete), isDestructive = true) { onDeleteList() isActionListOpen.value = false - }, - ) + } + } } } }