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:
+22
@@ -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,
|
||||
|
||||
+5
-5
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user