fix: share dyn

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-30 09:57:40 +08:00
parent 8d4bbc1a1c
commit f8caa46eab
2 changed files with 5 additions and 7 deletions

View File

@@ -358,7 +358,6 @@ class BangumiIntroController
"url": item.shareUrl,
"headline": title,
"source": 16,
"extra": {},
"thumb": item.cover,
"source_desc": switch (bangumiItem!.type) {
1 => '番剧',

View File

@@ -335,10 +335,10 @@ class AuthorPanel extends StatelessWidget {
throw UnsupportedError(
'error getting title: {"type": ${item.basic!.commentType}, "id": $id}');
}
String thumb = isDyn
? item.modules.moduleAuthor!.face!
: item.modules.moduleDynamic!.major!.opus!.pics!.first
.url!;
String? thumb = isDyn
? item.modules.moduleAuthor?.face
: item.modules.moduleDynamic?.major?.opus?.pics
?.firstOrNull?.url;
PageUtils.pmShare(
context,
content: {
@@ -346,8 +346,7 @@ class AuthorPanel extends StatelessWidget {
"title": title,
"headline": "",
"source": source,
"extra": {},
"thumb": thumb,
if (thumb?.isNotEmpty == true) "thumb": thumb,
"author": item.modules.moduleAuthor!.name,
"author_id": item.modules.moduleAuthor!.mid.toString()
},