vc=32 fix: drop SearchItem.uploader_avatar — not on StreamInfoItem
I confused StreamInfo (the big single-video struct, has uploader_avatars: ImageSet) with StreamInfoItem (the card struct used in search results / channel video lists / related streams — no uploader_avatars field). cargoBuildHost caught it: E0609 no field `uploader_avatars`. Drop the field from SearchItem (and from the Kotlin construction sites). For the subs feed and "more from this channel" we already use the channel-level avatar from ChannelInfo.avatar, which is the right granularity anyway (every video from one channel shares one avatar). Per-card uploader avatars on search/related stay null until strawcore-core extracts them on StreamInfoItem too.
This commit is contained in:
parent
544035b30c
commit
2afdcf3d5c
5 changed files with 3 additions and 11 deletions
|
|
@ -42,7 +42,7 @@ class ChannelViewModel : ViewModel() {
|
|||
title = v.title.ifBlank { "(no title)" },
|
||||
uploader = v.uploader,
|
||||
uploaderUrl = v.uploaderUrl,
|
||||
uploaderAvatar = v.uploaderAvatar ?: ch.avatar,
|
||||
uploaderAvatar = ch.avatar,
|
||||
thumbnail = v.thumbnail,
|
||||
durationSeconds = v.durationSeconds,
|
||||
viewCount = v.viewCount,
|
||||
|
|
|
|||
|
|
@ -129,7 +129,6 @@ class VideoDetailViewModel : ViewModel() {
|
|||
title = r.title.ifBlank { "(no title)" },
|
||||
uploader = r.uploader,
|
||||
uploaderUrl = r.uploaderUrl,
|
||||
uploaderAvatar = r.uploaderAvatar,
|
||||
thumbnail = r.thumbnail,
|
||||
durationSeconds = r.durationSeconds,
|
||||
viewCount = r.viewCount,
|
||||
|
|
@ -153,7 +152,7 @@ class VideoDetailViewModel : ViewModel() {
|
|||
title = v.title.ifBlank { "(no title)" },
|
||||
uploader = v.uploader.ifBlank { uploader },
|
||||
uploaderUrl = v.uploaderUrl ?: uploaderUrl,
|
||||
uploaderAvatar = v.uploaderAvatar ?: ch.avatar,
|
||||
uploaderAvatar = ch.avatar,
|
||||
thumbnail = v.thumbnail,
|
||||
durationSeconds = v.durationSeconds,
|
||||
viewCount = v.viewCount,
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ class SubscriptionFeedViewModel : ViewModel() {
|
|||
title = v.title.ifBlank { "(no title)" },
|
||||
uploader = v.uploader.ifBlank { ch.name },
|
||||
uploaderUrl = v.uploaderUrl ?: ch.url,
|
||||
uploaderAvatar = v.uploaderAvatar ?: freshAvatar ?: ch.avatar,
|
||||
uploaderAvatar = freshAvatar ?: ch.avatar,
|
||||
thumbnail = v.thumbnail,
|
||||
durationSeconds = v.durationSeconds,
|
||||
viewCount = v.viewCount,
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ class SearchViewModel : ViewModel() {
|
|||
title = r.title.ifBlank { "(no title)" },
|
||||
uploader = r.uploader,
|
||||
uploaderUrl = r.uploaderUrl,
|
||||
uploaderAvatar = r.uploaderAvatar,
|
||||
thumbnail = r.thumbnail,
|
||||
durationSeconds = r.durationSeconds,
|
||||
viewCount = r.viewCount,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue