fix: A/B test 18: music playlist facepile avatar model

This commit is contained in:
ThetaDev 2024-11-25 16:42:00 +01:00
parent a846b729e3
commit 6c8108c94a
No known key found for this signature in database
GPG key ID: E319D3C5148D65B6
10 changed files with 9765 additions and 31 deletions

View file

@ -113,6 +113,12 @@ pub(crate) struct ImageView {
pub image: Thumbnails,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub(crate) struct AvatarViewModel {
pub avatar_view_model: ImageView,
}
/// List of images in different resolutions.
/// Not only used for thumbnails, but also for avatars and banners.
#[derive(Default, Debug, Deserialize)]
@ -203,7 +209,7 @@ pub(crate) struct TextBox {
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub(crate) struct TextComponentBox {
#[serde_as(deserialize_as = "AttributedText")]
#[serde_as(as = "AttributedText")]
pub text: TextComponent,
}
@ -591,7 +597,7 @@ pub(crate) struct PhMetadataRow {
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub(crate) enum MetadataPart {
Text(#[serde_as(deserialize_as = "AttributedText")] TextComponent),
Text(#[serde_as(as = "AttributedText")] TextComponent),
#[serde(rename_all = "camelCase")]
AvatarStack {
avatar_stack_view_model: TextComponentBox,