feat: add 3-dot options menu to video/picture/file feed cards

Adds MoreOptionsButton (the same menu used in NoteCompose) to
UserCardHeader, shown to the right of TimeAgo. This gives users
the same follow/copy/share/bookmark/report actions on video,
picture, and file-header feed cards that they have on text notes.

https://claude.ai/code/session_01DrsvnguWHdZMgsRqNS8BUz
This commit is contained in:
Claude
2026-04-15 03:20:50 +00:00
parent de94b28fc2
commit 8a276d6f1d
4 changed files with 15 additions and 3 deletions
@@ -65,7 +65,7 @@ fun PictureCardCompose(
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),
) { ) {
// Author header row // Author header row
UserCardHeader(baseNote, accountViewModel, nav) UserCardHeader(baseNote, accountViewModel, nav, editState)
// Image content // Image content
PictureCardImage(baseNote, event, backgroundColor, accountViewModel) PictureCardImage(baseNote, event, backgroundColor, accountViewModel)
@@ -69,7 +69,7 @@ fun VideoCardCompose(
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),
) { ) {
// Author header row // Author header row
UserCardHeader(baseNote, accountViewModel, nav) UserCardHeader(baseNote, accountViewModel, nav, editState)
// Image content // Image content
VideoCardImage(baseNote, event, backgroundColor, accountViewModel) VideoCardImage(baseNote, event, backgroundColor, accountViewModel)
@@ -68,7 +68,7 @@ fun FileHeaderCardCompose(
modifier = Modifier.fillMaxWidth(), modifier = Modifier.fillMaxWidth(),
) { ) {
// Author header row // Author header row
UserCardHeader(baseNote, accountViewModel, nav) UserCardHeader(baseNote, accountViewModel, nav, editState)
// Image content // Image content
FileHeaderCardImage(baseNote, event, backgroundColor, accountViewModel) FileHeaderCardImage(baseNote, event, backgroundColor, accountViewModel)
@@ -27,15 +27,19 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.State
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import com.vitorpamplona.amethyst.model.Note import com.vitorpamplona.amethyst.model.Note
import com.vitorpamplona.amethyst.ui.components.GenericLoadable
import com.vitorpamplona.amethyst.ui.navigation.navs.INav import com.vitorpamplona.amethyst.ui.navigation.navs.INav
import com.vitorpamplona.amethyst.ui.navigation.routes.routeFor import com.vitorpamplona.amethyst.ui.navigation.routes.routeFor
import com.vitorpamplona.amethyst.ui.note.NoteAuthorPicture import com.vitorpamplona.amethyst.ui.note.NoteAuthorPicture
import com.vitorpamplona.amethyst.ui.note.NoteUsernameDisplay import com.vitorpamplona.amethyst.ui.note.NoteUsernameDisplay
import com.vitorpamplona.amethyst.ui.note.elements.MoreOptionsButton
import com.vitorpamplona.amethyst.ui.note.elements.TimeAgo import com.vitorpamplona.amethyst.ui.note.elements.TimeAgo
import com.vitorpamplona.amethyst.ui.note.types.EditState
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.amethyst.ui.theme.Size35dp import com.vitorpamplona.amethyst.ui.theme.Size35dp
@@ -44,6 +48,7 @@ fun UserCardHeader(
baseNote: Note, baseNote: Note,
accountViewModel: AccountViewModel, accountViewModel: AccountViewModel,
nav: INav, nav: INav,
editState: State<GenericLoadable<EditState>>? = null,
) { ) {
Row( Row(
modifier = modifier =
@@ -74,5 +79,12 @@ fun UserCardHeader(
} }
TimeAgo(baseNote) TimeAgo(baseNote)
MoreOptionsButton(
baseNote = baseNote,
editState = editState,
accountViewModel = accountViewModel,
nav = nav,
)
} }
} }