style: run spotlessApply after M3 dialog migration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+26
-35
@@ -38,11 +38,14 @@ import androidx.compose.foundation.lazy.itemsIndexed
|
|||||||
import androidx.compose.foundation.pager.HorizontalPager
|
import androidx.compose.foundation.pager.HorizontalPager
|
||||||
import androidx.compose.foundation.pager.PagerState
|
import androidx.compose.foundation.pager.PagerState
|
||||||
import androidx.compose.foundation.pager.rememberPagerState
|
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.ButtonDefaults
|
||||||
import androidx.compose.material3.Card
|
import androidx.compose.material3.Card
|
||||||
import androidx.compose.material3.CardDefaults.cardElevation
|
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.ExperimentalMaterial3Api
|
||||||
import androidx.compose.material3.HorizontalDivider
|
import androidx.compose.material3.HorizontalDivider
|
||||||
import androidx.compose.material3.IconButton
|
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.LocalCache
|
||||||
import com.vitorpamplona.amethyst.model.User
|
import com.vitorpamplona.amethyst.model.User
|
||||||
import com.vitorpamplona.amethyst.ui.components.ClickableBox
|
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.EmptyNav
|
||||||
import com.vitorpamplona.amethyst.ui.navigation.navs.INav
|
import com.vitorpamplona.amethyst.ui.navigation.navs.INav
|
||||||
import com.vitorpamplona.amethyst.ui.navigation.routes.Route
|
import com.vitorpamplona.amethyst.ui.navigation.routes.Route
|
||||||
@@ -416,15 +422,16 @@ private fun ListActionsMenuButton(
|
|||||||
onClick = { isActionListOpen.value = true },
|
onClick = { isActionListOpen.value = true },
|
||||||
) {
|
) {
|
||||||
VerticalDotsIcon()
|
VerticalDotsIcon()
|
||||||
|
}
|
||||||
|
|
||||||
DropdownMenu(
|
if (isActionListOpen.value) {
|
||||||
expanded = isActionListOpen.value,
|
|
||||||
onDismissRequest = { isActionListOpen.value = false },
|
|
||||||
) {
|
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
DropdownMenuItem(
|
M3ActionDialog(
|
||||||
text = { Text(stringRes(R.string.quick_action_share)) },
|
title = stringRes(R.string.list_actions_dialog_title),
|
||||||
onClick = {
|
onDismiss = { isActionListOpen.value = false },
|
||||||
|
) {
|
||||||
|
M3ActionSection {
|
||||||
|
M3ActionRow(icon = Icons.Outlined.Share, text = stringRes(R.string.quick_action_share)) {
|
||||||
val sendIntent =
|
val sendIntent =
|
||||||
Intent().apply {
|
Intent().apply {
|
||||||
action = Intent.ACTION_SEND
|
action = Intent.ACTION_SEND
|
||||||
@@ -443,38 +450,22 @@ private fun ListActionsMenuButton(
|
|||||||
Intent.createChooser(sendIntent, stringRes(context, R.string.quick_action_share))
|
Intent.createChooser(sendIntent, stringRes(context, R.string.quick_action_share))
|
||||||
ContextCompat.startActivity(context, shareIntent, null)
|
ContextCompat.startActivity(context, shareIntent, null)
|
||||||
isActionListOpen.value = false
|
isActionListOpen.value = false
|
||||||
},
|
}
|
||||||
)
|
M3ActionRow(icon = Icons.Outlined.Edit, text = stringRes(R.string.follow_set_edit_list_metadata)) {
|
||||||
HorizontalDivider(thickness = DividerThickness)
|
|
||||||
DropdownMenuItem(
|
|
||||||
text = {
|
|
||||||
Text(stringRes(R.string.follow_set_edit_list_metadata))
|
|
||||||
},
|
|
||||||
onClick = {
|
|
||||||
onEditList()
|
onEditList()
|
||||||
isActionListOpen.value = false
|
isActionListOpen.value = false
|
||||||
},
|
}
|
||||||
)
|
M3ActionRow(icon = Icons.Outlined.CellTower, text = stringRes(R.string.follow_set_broadcast)) {
|
||||||
HorizontalDivider(thickness = DividerThickness)
|
|
||||||
DropdownMenuItem(
|
|
||||||
text = {
|
|
||||||
Text(stringRes(R.string.follow_set_broadcast))
|
|
||||||
},
|
|
||||||
onClick = {
|
|
||||||
onBroadcastList()
|
onBroadcastList()
|
||||||
isActionListOpen.value = false
|
isActionListOpen.value = false
|
||||||
},
|
}
|
||||||
)
|
}
|
||||||
HorizontalDivider(thickness = DividerThickness)
|
M3ActionSection {
|
||||||
DropdownMenuItem(
|
M3ActionRow(icon = Icons.Outlined.Delete, text = stringRes(R.string.follow_set_delete), isDestructive = true) {
|
||||||
text = {
|
|
||||||
Text(stringRes(R.string.follow_set_delete))
|
|
||||||
},
|
|
||||||
onClick = {
|
|
||||||
onDeleteList()
|
onDeleteList()
|
||||||
isActionListOpen.value = false
|
isActionListOpen.value = false
|
||||||
},
|
}
|
||||||
)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user