Merge pull request #2397 from vitorpamplona/claude/add-video-feed-options-menu-EfqQl
Make editState parameter optional in ReactionsRow and related components
This commit is contained in:
@@ -197,7 +197,7 @@ fun ReactionsRow(
|
||||
baseNote: Note,
|
||||
showReactionDetail: Boolean,
|
||||
addPadding: Boolean,
|
||||
editState: State<GenericLoadable<EditState>>,
|
||||
editState: State<GenericLoadable<EditState>>?,
|
||||
accountViewModel: AccountViewModel,
|
||||
nav: INav,
|
||||
) {
|
||||
@@ -219,7 +219,7 @@ private fun InnerReactionRow(
|
||||
showReactionDetail: Boolean,
|
||||
addPadding: Boolean,
|
||||
wantsToSeeReactions: MutableState<Boolean>,
|
||||
editState: State<GenericLoadable<EditState>>,
|
||||
editState: State<GenericLoadable<EditState>>?,
|
||||
accountViewModel: AccountViewModel,
|
||||
nav: INav,
|
||||
) {
|
||||
@@ -666,7 +666,7 @@ private fun WatchZapAndRenderGallery(
|
||||
@Composable
|
||||
private fun BoostWithDialog(
|
||||
baseNote: Note,
|
||||
editState: State<GenericLoadable<EditState>>,
|
||||
editState: State<GenericLoadable<EditState>>?,
|
||||
grayTint: Color,
|
||||
accountViewModel: AccountViewModel,
|
||||
nav: INav,
|
||||
@@ -682,7 +682,7 @@ private fun BoostWithDialog(
|
||||
Route.NewShortNote(
|
||||
quote = baseNote.idHex,
|
||||
version =
|
||||
(editState.value as? GenericLoadable.Loaded)
|
||||
(editState?.value as? GenericLoadable.Loaded)
|
||||
?.loaded
|
||||
?.modificationToShow
|
||||
?.value
|
||||
@@ -704,7 +704,7 @@ private fun BoostWithDialog(
|
||||
baseReplyTo = replyTo?.idHex,
|
||||
fork = baseNote.idHex,
|
||||
version =
|
||||
(editState.value as? GenericLoadable.Loaded)
|
||||
(editState?.value as? GenericLoadable.Loaded)
|
||||
?.loaded
|
||||
?.modificationToShow
|
||||
?.value
|
||||
|
||||
+1
-3
@@ -45,7 +45,6 @@ import com.vitorpamplona.amethyst.ui.components.SensitivityWarning
|
||||
import com.vitorpamplona.amethyst.ui.components.ZoomableContentView
|
||||
import com.vitorpamplona.amethyst.ui.navigation.navs.INav
|
||||
import com.vitorpamplona.amethyst.ui.note.ReactionsRow
|
||||
import com.vitorpamplona.amethyst.ui.note.observeEdits
|
||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
|
||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.video.UserCardHeader
|
||||
import com.vitorpamplona.quartz.nip68Picture.PictureEvent
|
||||
@@ -59,7 +58,6 @@ fun PictureCardCompose(
|
||||
) {
|
||||
val event = (baseNote.event as? PictureEvent) ?: return
|
||||
val backgroundColor = remember { mutableStateOf(Color.Transparent) }
|
||||
val editState = observeEdits(baseNote = baseNote, accountViewModel = accountViewModel)
|
||||
|
||||
Column(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
@@ -75,7 +73,7 @@ fun PictureCardCompose(
|
||||
baseNote = baseNote,
|
||||
showReactionDetail = true,
|
||||
addPadding = true,
|
||||
editState = editState,
|
||||
editState = null,
|
||||
accountViewModel = accountViewModel,
|
||||
nav = nav,
|
||||
)
|
||||
|
||||
+1
-3
@@ -47,7 +47,6 @@ import com.vitorpamplona.amethyst.ui.components.SensitivityWarning
|
||||
import com.vitorpamplona.amethyst.ui.components.ZoomableContentView
|
||||
import com.vitorpamplona.amethyst.ui.navigation.navs.INav
|
||||
import com.vitorpamplona.amethyst.ui.note.ReactionsRow
|
||||
import com.vitorpamplona.amethyst.ui.note.observeEdits
|
||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
|
||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.video.UserCardHeader
|
||||
import com.vitorpamplona.quartz.nip01Core.core.Event
|
||||
@@ -63,7 +62,6 @@ fun VideoCardCompose(
|
||||
) {
|
||||
val event = (baseNote.event as? VideoEvent) ?: return
|
||||
val backgroundColor = remember { mutableStateOf(Color.Transparent) }
|
||||
val editState = observeEdits(baseNote = baseNote, accountViewModel = accountViewModel)
|
||||
|
||||
Column(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
@@ -79,7 +77,7 @@ fun VideoCardCompose(
|
||||
baseNote = baseNote,
|
||||
showReactionDetail = true,
|
||||
addPadding = true,
|
||||
editState = editState,
|
||||
editState = null,
|
||||
accountViewModel = accountViewModel,
|
||||
nav = nav,
|
||||
)
|
||||
|
||||
+1
-3
@@ -47,7 +47,6 @@ import com.vitorpamplona.amethyst.ui.components.SensitivityWarning
|
||||
import com.vitorpamplona.amethyst.ui.components.ZoomableContentView
|
||||
import com.vitorpamplona.amethyst.ui.navigation.navs.INav
|
||||
import com.vitorpamplona.amethyst.ui.note.ReactionsRow
|
||||
import com.vitorpamplona.amethyst.ui.note.observeEdits
|
||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
|
||||
import com.vitorpamplona.quartz.nip01Core.core.Event
|
||||
import com.vitorpamplona.quartz.nip31Alts.alt
|
||||
@@ -62,7 +61,6 @@ fun FileHeaderCardCompose(
|
||||
) {
|
||||
val event = (baseNote.event as? FileHeaderEvent) ?: return
|
||||
val backgroundColor = remember { mutableStateOf(Color.Transparent) }
|
||||
val editState = observeEdits(baseNote = baseNote, accountViewModel = accountViewModel)
|
||||
|
||||
Column(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
@@ -78,7 +76,7 @@ fun FileHeaderCardCompose(
|
||||
baseNote = baseNote,
|
||||
showReactionDetail = true,
|
||||
addPadding = true,
|
||||
editState = editState,
|
||||
editState = null,
|
||||
accountViewModel = accountViewModel,
|
||||
nav = nav,
|
||||
)
|
||||
|
||||
+8
@@ -35,6 +35,7 @@ import com.vitorpamplona.amethyst.ui.navigation.navs.INav
|
||||
import com.vitorpamplona.amethyst.ui.navigation.routes.routeFor
|
||||
import com.vitorpamplona.amethyst.ui.note.NoteAuthorPicture
|
||||
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.screen.loggedIn.AccountViewModel
|
||||
import com.vitorpamplona.amethyst.ui.theme.Size35dp
|
||||
@@ -74,5 +75,12 @@ fun UserCardHeader(
|
||||
}
|
||||
|
||||
TimeAgo(baseNote)
|
||||
|
||||
MoreOptionsButton(
|
||||
baseNote = baseNote,
|
||||
editState = null,
|
||||
accountViewModel = accountViewModel,
|
||||
nav = nav,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user