fix(nests): wire kebab to NoteDropDownMenu instead of QuickAction
The kebab on a NoteCompose card opens the comprehensive NoteDropDownMenu (Follow/Unfollow, Copy text/pubkey/note id, Share, Edit, Broadcast, Timestamp, Pin, Bookmark, Delete/Report) — not the smaller LongPressToQuickAction popup. The previous nests commit wired the kebab to the wrong menu. Replace the manual ClickableBox + VerticalDotsIcon + showQuickAction plumbing with the existing MoreOptionsButton composable, which already wraps the icon and triggers NoteDropDownMenu for both card variants. Long-press still opens NoteQuickActionMenu via the outer LongPressToQuickAction wrapper, matching NoteCompose's two-tier gesture model exactly. Drops the onMore parameter threading on ObserveAndRenderSpace, RenderLiveSpacesThumb, and SpaceHostAndReactions — MoreOptionsButton is self-contained, so the trailing optional parameter is no longer needed.
This commit is contained in:
+14
-24
@@ -65,7 +65,6 @@ import com.vitorpamplona.amethyst.model.LocalCache
|
||||
import com.vitorpamplona.amethyst.model.Note
|
||||
import com.vitorpamplona.amethyst.service.relayClient.reqCommand.event.observeNoteAndMap
|
||||
import com.vitorpamplona.amethyst.ui.actions.CrossfadeIfEnabled
|
||||
import com.vitorpamplona.amethyst.ui.components.ClickableBox
|
||||
import com.vitorpamplona.amethyst.ui.components.SensitivityWarning
|
||||
import com.vitorpamplona.amethyst.ui.layouts.rememberFeedContentPadding
|
||||
import com.vitorpamplona.amethyst.ui.navigation.navs.INav
|
||||
@@ -77,8 +76,8 @@ import com.vitorpamplona.amethyst.ui.note.LikeReaction
|
||||
import com.vitorpamplona.amethyst.ui.note.LongPressToQuickAction
|
||||
import com.vitorpamplona.amethyst.ui.note.UserPicture
|
||||
import com.vitorpamplona.amethyst.ui.note.UsernameDisplay
|
||||
import com.vitorpamplona.amethyst.ui.note.VerticalDotsIcon
|
||||
import com.vitorpamplona.amethyst.ui.note.ZapReaction
|
||||
import com.vitorpamplona.amethyst.ui.note.elements.MoreOptionsButton
|
||||
import com.vitorpamplona.amethyst.ui.note.timeAgoNoDot
|
||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
|
||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.chats.publicChannels.nip53LiveActivities.EndedFlag
|
||||
@@ -99,7 +98,6 @@ import com.vitorpamplona.amethyst.ui.theme.QuoteBorder
|
||||
import com.vitorpamplona.amethyst.ui.theme.RowColSpacing
|
||||
import com.vitorpamplona.amethyst.ui.theme.Size34dp
|
||||
import com.vitorpamplona.amethyst.ui.theme.Size35dp
|
||||
import com.vitorpamplona.amethyst.ui.theme.Size40dp
|
||||
import com.vitorpamplona.amethyst.ui.theme.Size55dp
|
||||
import com.vitorpamplona.amethyst.ui.theme.StdHorzSpacer
|
||||
import com.vitorpamplona.amethyst.ui.theme.StdPadding
|
||||
@@ -316,7 +314,7 @@ private fun NestFeedCard(
|
||||
note = baseNote,
|
||||
accountViewModel = accountViewModel,
|
||||
) {
|
||||
ObserveAndRenderSpace(addressableNote, accountViewModel, nav, showQuickAction)
|
||||
ObserveAndRenderSpace(addressableNote, accountViewModel, nav)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -416,12 +414,12 @@ private fun NestEndedCompactCard(
|
||||
)
|
||||
}
|
||||
|
||||
ClickableBox(
|
||||
modifier = Modifier.size(Size40dp),
|
||||
onClick = showQuickAction,
|
||||
) {
|
||||
VerticalDotsIcon()
|
||||
}
|
||||
Spacer(modifier = Modifier.width(8.dp))
|
||||
MoreOptionsButton(
|
||||
baseNote = baseNote,
|
||||
accountViewModel = accountViewModel,
|
||||
nav = nav,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -466,7 +464,6 @@ fun ObserveAndRenderSpace(
|
||||
baseNote: AddressableNote,
|
||||
accountViewModel: AccountViewModel,
|
||||
nav: INav,
|
||||
onMore: (() -> Unit)? = null,
|
||||
) {
|
||||
val card by observeNoteAndMap(baseNote, accountViewModel) {
|
||||
when (val noteEvent = it.event) {
|
||||
@@ -496,7 +493,6 @@ fun ObserveAndRenderSpace(
|
||||
baseNote,
|
||||
accountViewModel,
|
||||
nav,
|
||||
onMore,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -595,7 +591,6 @@ fun RenderLiveSpacesThumb(
|
||||
baseNote: AddressableNote,
|
||||
accountViewModel: AccountViewModel,
|
||||
nav: INav,
|
||||
onMore: (() -> Unit)? = null,
|
||||
) {
|
||||
Column(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
@@ -665,7 +660,6 @@ fun RenderLiveSpacesThumb(
|
||||
baseNote,
|
||||
accountViewModel,
|
||||
nav,
|
||||
onMore,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -676,7 +670,6 @@ fun SpaceHostAndReactions(
|
||||
baseNote: AddressableNote,
|
||||
accountViewModel: AccountViewModel,
|
||||
nav: INav,
|
||||
onMore: (() -> Unit)? = null,
|
||||
) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
val creator = baseNote.author
|
||||
@@ -737,15 +730,12 @@ fun SpaceHostAndReactions(
|
||||
accountViewModel = accountViewModel,
|
||||
nav = nav,
|
||||
)
|
||||
if (onMore != null) {
|
||||
Spacer(modifier = StdHorzSpacer)
|
||||
ClickableBox(
|
||||
modifier = Modifier.size(Size35dp),
|
||||
onClick = onMore,
|
||||
) {
|
||||
VerticalDotsIcon()
|
||||
}
|
||||
}
|
||||
Spacer(modifier = StdHorzSpacer)
|
||||
MoreOptionsButton(
|
||||
baseNote = baseNote,
|
||||
accountViewModel = accountViewModel,
|
||||
nav = nav,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user