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, "url": item.shareUrl,
"headline": title, "headline": title,
"source": 16, "source": 16,
"extra": {},
"thumb": item.cover, "thumb": item.cover,
"source_desc": switch (bangumiItem!.type) { "source_desc": switch (bangumiItem!.type) {
1 => '番剧', 1 => '番剧',

View File

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