fix: 正确处理“我追的合集 / 收藏夹”中的收藏夹条目,以及一些样式、文本调整 (#553)

This commit is contained in:
ᴀᴍᴛᴏᴀᴇʀ
2025-12-05 16:38:10 +08:00
committed by GitHub
parent f37d9af678
commit b5ef76b0ed
14 changed files with 277 additions and 242 deletions

View File

@@ -92,47 +92,48 @@ where
}
#[derive(Serialize)]
pub struct FavoriteWithSubscriptionStatus {
pub title: String,
pub media_count: i64,
pub fid: i64,
pub mid: i64,
pub subscribed: bool,
}
#[derive(Serialize)]
pub struct CollectionWithSubscriptionStatus {
pub title: String,
pub sid: i64,
pub mid: i64,
pub invalid: bool,
pub subscribed: bool,
}
#[derive(Serialize)]
pub struct UpperWithSubscriptionStatus {
pub mid: i64,
pub uname: String,
pub face: String,
pub sign: String,
pub invalid: bool,
pub subscribed: bool,
#[serde(tag = "type", rename_all = "snake_case")]
pub enum Followed {
Favorite {
title: String,
media_count: i64,
fid: i64,
mid: i64,
invalid: bool,
subscribed: bool,
},
Collection {
title: String,
sid: i64,
mid: i64,
media_count: i64,
invalid: bool,
subscribed: bool,
},
Upper {
mid: i64,
uname: String,
face: String,
sign: String,
invalid: bool,
subscribed: bool,
},
}
#[derive(Serialize)]
pub struct FavoritesResponse {
pub favorites: Vec<FavoriteWithSubscriptionStatus>,
pub favorites: Vec<Followed>,
}
#[derive(Serialize)]
pub struct CollectionsResponse {
pub collections: Vec<CollectionWithSubscriptionStatus>,
pub collections: Vec<Followed>,
pub total: i64,
}
#[derive(Serialize)]
pub struct UppersResponse {
pub uppers: Vec<UpperWithSubscriptionStatus>,
pub uppers: Vec<Followed>,
pub total: i64,
}