Using banner without the user header for Follow packs because the user is already listed in the bottom of the card.

This commit is contained in:
Vitor Pamplona
2025-12-02 18:33:10 -05:00
parent 1125c4e8f5
commit cc679e3d6b
2 changed files with 27 additions and 5 deletions
@@ -60,6 +60,17 @@ fun DefaultImageHeader(
}
}
@Composable
fun DefaultImageBanner(
note: Note,
accountViewModel: AccountViewModel,
modifier: Modifier = SimpleHeaderImage,
) {
WatchAuthor(baseNote = note, accountViewModel) {
BannerImage(it, modifier, accountViewModel)
}
}
@Composable
fun DefaultImageHeaderBackground(
note: Note,
@@ -77,6 +88,17 @@ fun DefaultImageHeaderBackground(
}
}
@Composable
fun DefaultImageBannerBackground(
note: Note,
accountViewModel: AccountViewModel,
modifier: Modifier = SimpleHeaderImage,
) {
WatchAuthor(baseNote = note, accountViewModel) {
BannerImage(it, modifier.blur(Size16dp), accountViewModel)
}
}
@Composable
fun BannerImage(
author: User,
@@ -49,8 +49,8 @@ import com.vitorpamplona.amethyst.ui.note.LikeReaction
import com.vitorpamplona.amethyst.ui.note.UserPicture
import com.vitorpamplona.amethyst.ui.note.UsernameDisplay
import com.vitorpamplona.amethyst.ui.note.ZapReaction
import com.vitorpamplona.amethyst.ui.note.elements.DefaultImageHeader
import com.vitorpamplona.amethyst.ui.note.elements.DefaultImageHeaderBackground
import com.vitorpamplona.amethyst.ui.note.elements.DefaultImageBanner
import com.vitorpamplona.amethyst.ui.note.elements.DefaultImageBannerBackground
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.amethyst.ui.screen.loggedIn.mockAccountViewModel
import com.vitorpamplona.amethyst.ui.stringRes
@@ -177,10 +177,10 @@ fun RenderFollowSetThumb(
mainImageModifier = FollowSetImageModifier,
loadedImageModifier = Modifier,
accountViewModel = accountViewModel,
onLoadingBackground = { DefaultImageHeaderBackground(baseNote, accountViewModel) },
onError = { DefaultImageHeader(baseNote, accountViewModel) },
onLoadingBackground = { DefaultImageBannerBackground(baseNote, accountViewModel) },
onError = { DefaultImageBanner(baseNote, accountViewModel) },
)
} ?: run { DefaultImageHeader(baseNote, accountViewModel, FollowSetImageModifier) }
} ?: run { DefaultImageBanner(baseNote, accountViewModel, FollowSetImageModifier) }
GalleryUnloaded(card.users, StdPadding, accountViewModel, nav)
}