diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt index 910533be3..dc96d0375 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/NoteCompose.kt @@ -728,57 +728,23 @@ private fun RenderNoteRow( ) { val noteEvent = baseNote.event when (noteEvent) { - is AppDefinitionEvent -> { - RenderAppDefinition(baseNote, accountViewModel, nav) - } - is AudioTrackEvent -> { - RenderAudioTrack(baseNote, accountViewModel, nav) - } - is AudioHeaderEvent -> { - RenderAudioHeader(baseNote, accountViewModel, nav) - } - is ReactionEvent -> { - RenderReaction(baseNote, quotesLeft, backgroundColor, accountViewModel, nav) - } - is RepostEvent -> { - RenderRepost(baseNote, quotesLeft, backgroundColor, accountViewModel, nav) - } - is GenericRepostEvent -> { - RenderRepost(baseNote, quotesLeft, backgroundColor, accountViewModel, nav) - } - is ReportEvent -> { - RenderReport(baseNote, quotesLeft, backgroundColor, accountViewModel, nav) - } - is LongTextNoteEvent -> { - RenderLongFormContent(baseNote, accountViewModel, nav) - } - is WikiNoteEvent -> { - RenderWikiContent(baseNote, accountViewModel, nav) - } - is BadgeAwardEvent -> { - RenderBadgeAward(baseNote, backgroundColor, accountViewModel, nav) - } - is FhirResourceEvent -> { - RenderFhirResource(baseNote, accountViewModel, nav) - } - is PeopleListEvent -> { - DisplayPeopleList(baseNote, backgroundColor, accountViewModel, nav) - } - is RelaySetEvent -> { - DisplayRelaySet(baseNote, backgroundColor, accountViewModel, nav) - } - is PinListEvent -> { - RenderPinListEvent(baseNote, backgroundColor, accountViewModel, nav) - } - is EmojiPackEvent -> { - RenderEmojiPack(baseNote, true, backgroundColor, accountViewModel) - } - is LiveActivitiesEvent -> { - RenderLiveActivityEvent(baseNote, accountViewModel, nav) - } - is GitRepositoryEvent -> { - RenderGitRepositoryEvent(baseNote, accountViewModel, nav) - } + is AppDefinitionEvent -> RenderAppDefinition(baseNote, accountViewModel, nav) + is AudioTrackEvent -> RenderAudioTrack(baseNote, accountViewModel, nav) + is AudioHeaderEvent -> RenderAudioHeader(baseNote, accountViewModel, nav) + is ReactionEvent -> RenderReaction(baseNote, quotesLeft, backgroundColor, accountViewModel, nav) + is RepostEvent -> RenderRepost(baseNote, quotesLeft, backgroundColor, accountViewModel, nav) + is GenericRepostEvent -> RenderRepost(baseNote, quotesLeft, backgroundColor, accountViewModel, nav) + is ReportEvent -> RenderReport(baseNote, quotesLeft, backgroundColor, accountViewModel, nav) + is LongTextNoteEvent -> RenderLongFormContent(baseNote, accountViewModel, nav) + is WikiNoteEvent -> RenderWikiContent(baseNote, accountViewModel, nav) + is BadgeAwardEvent -> RenderBadgeAward(baseNote, backgroundColor, accountViewModel, nav) + is FhirResourceEvent -> RenderFhirResource(baseNote, accountViewModel, nav) + is PeopleListEvent -> DisplayPeopleList(baseNote, backgroundColor, accountViewModel, nav) + is RelaySetEvent -> DisplayRelaySet(baseNote, backgroundColor, accountViewModel, nav) + is PinListEvent -> RenderPinListEvent(baseNote, backgroundColor, accountViewModel, nav) + is EmojiPackEvent -> RenderEmojiPack(baseNote, true, backgroundColor, accountViewModel) + is LiveActivitiesEvent -> RenderLiveActivityEvent(baseNote, accountViewModel, nav) + is GitRepositoryEvent -> RenderGitRepositoryEvent(baseNote, accountViewModel, nav) is GitPatchEvent -> { RenderGitPatchEvent( baseNote, @@ -842,18 +808,10 @@ private fun RenderNoteRow( nav, ) } - is FileHeaderEvent -> { - FileHeaderDisplay(baseNote, true, accountViewModel) - } - is VideoHorizontalEvent -> { - VideoDisplay(baseNote, makeItShort, canPreview, backgroundColor, accountViewModel, nav) - } - is VideoVerticalEvent -> { - VideoDisplay(baseNote, makeItShort, canPreview, backgroundColor, accountViewModel, nav) - } - is FileStorageHeaderEvent -> { - FileStorageHeaderDisplay(baseNote, true, accountViewModel) - } + is FileHeaderEvent -> FileHeaderDisplay(baseNote, true, accountViewModel) + is VideoHorizontalEvent -> VideoDisplay(baseNote, makeItShort, canPreview, backgroundColor, accountViewModel, nav) + is VideoVerticalEvent -> VideoDisplay(baseNote, makeItShort, canPreview, backgroundColor, accountViewModel, nav) + is FileStorageHeaderEvent -> FileStorageHeaderDisplay(baseNote, true, accountViewModel) is CommunityPostApprovalEvent -> { RenderPostApproval( baseNote, diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/types/Git.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/types/Git.kt index 9707b8d51..a56501a82 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/types/Git.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/types/Git.kt @@ -325,10 +325,10 @@ private fun RenderGitRepositoryEvent( accountViewModel: AccountViewModel, nav: (String) -> Unit, ) { - val title = remember(noteEvent) { noteEvent.name() ?: noteEvent.dTag() } - val summary = remember(noteEvent) { noteEvent.description() } - val web = remember(noteEvent) { noteEvent.web() } - val clone = remember(noteEvent) { noteEvent.clone() } + val title = noteEvent.name() ?: noteEvent.dTag() + val summary = noteEvent.description() + val web = noteEvent.web() + val clone = noteEvent.clone() Row( modifier =