Compare commits
3 Commits
alpha
...
fix-articl
Author | SHA1 | Date | |
---|---|---|---|
a9d73a9f1b | |||
0b5397ec00 | |||
466214b26a |
@ -45,7 +45,9 @@ class _ContentState extends State<Content> {
|
|||||||
if (len == 1) {
|
if (len == 1) {
|
||||||
OpusPicsModel pictureItem = pics.first;
|
OpusPicsModel pictureItem = pics.first;
|
||||||
picList.add(pictureItem.url!);
|
picList.add(pictureItem.url!);
|
||||||
spanChilds.add(const TextSpan(text: '\n'));
|
|
||||||
|
/// 图片上方的空白间隔
|
||||||
|
// spanChilds.add(const TextSpan(text: '\n'));
|
||||||
spanChilds.add(
|
spanChilds.add(
|
||||||
WidgetSpan(
|
WidgetSpan(
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
|
@ -19,6 +19,17 @@ InlineSpan richNode(item, context) {
|
|||||||
// 动态页面 richTextNodes 层级可能与主页动态层级不同
|
// 动态页面 richTextNodes 层级可能与主页动态层级不同
|
||||||
richTextNodes =
|
richTextNodes =
|
||||||
item.modules.moduleDynamic.major.opus.summary.richTextNodes;
|
item.modules.moduleDynamic.major.opus.summary.richTextNodes;
|
||||||
|
if (item.modules.moduleDynamic.major.opus.title != null) {
|
||||||
|
spanChilds.add(
|
||||||
|
TextSpan(
|
||||||
|
text: item.modules.moduleDynamic.major.opus.title + '\n',
|
||||||
|
style: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.titleMedium!
|
||||||
|
.copyWith(fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (richTextNodes == null || richTextNodes.isEmpty) {
|
if (richTextNodes == null || richTextNodes.isEmpty) {
|
||||||
return spacer;
|
return spacer;
|
||||||
|
@ -58,6 +58,9 @@ class _HomePageState extends State<HomePage>
|
|||||||
return Scaffold(
|
return Scaffold(
|
||||||
extendBody: true,
|
extendBody: true,
|
||||||
extendBodyBehindAppBar: true,
|
extendBodyBehindAppBar: true,
|
||||||
|
appBar: _homeController.enableGradientBg
|
||||||
|
? null
|
||||||
|
: AppBar(toolbarHeight: 0, elevation: 0),
|
||||||
body: Stack(
|
body: Stack(
|
||||||
children: [
|
children: [
|
||||||
// gradient background
|
// gradient background
|
||||||
|
@ -462,6 +462,9 @@ class ReplyItemRow extends StatelessWidget {
|
|||||||
|
|
||||||
InlineSpan buildContent(
|
InlineSpan buildContent(
|
||||||
BuildContext context, replyItem, replyReply, fReplyItem) {
|
BuildContext context, replyItem, replyReply, fReplyItem) {
|
||||||
|
final String routePath = Get.currentRoute;
|
||||||
|
bool isVideoPage = routePath.startsWith('/video/detail');
|
||||||
|
|
||||||
// replyItem 当前回复内容
|
// replyItem 当前回复内容
|
||||||
// replyReply 查看二楼回复(回复详情)回调
|
// replyReply 查看二楼回复(回复详情)回调
|
||||||
// fReplyItem 父级回复内容,用作二楼回复(回复详情)展示
|
// fReplyItem 父级回复内容,用作二楼回复(回复详情)展示
|
||||||
@ -571,21 +574,26 @@ InlineSpan buildContent(
|
|||||||
spanChilds.add(
|
spanChilds.add(
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: ' $matchStr ',
|
text: ' $matchStr ',
|
||||||
style: TextStyle(
|
style: isVideoPage
|
||||||
color: Theme.of(context).colorScheme.primary,
|
? TextStyle(
|
||||||
),
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
)
|
||||||
|
: null,
|
||||||
recognizer: TapGestureRecognizer()
|
recognizer: TapGestureRecognizer()
|
||||||
..onTap = () {
|
..onTap = () {
|
||||||
// 跳转到指定位置
|
// 跳转到指定位置
|
||||||
try {
|
if (isVideoPage) {
|
||||||
SmartDialog.showToast('跳转至:$matchStr');
|
try {
|
||||||
Get.find<VideoDetailController>(tag: Get.arguments['heroTag'])
|
SmartDialog.showToast('跳转至:$matchStr');
|
||||||
.plPlayerController
|
Get.find<VideoDetailController>(
|
||||||
.seekTo(
|
tag: Get.arguments['heroTag'])
|
||||||
Duration(seconds: Utils.duration(matchStr)),
|
.plPlayerController
|
||||||
);
|
.seekTo(
|
||||||
} catch (e) {
|
Duration(seconds: Utils.duration(matchStr)),
|
||||||
SmartDialog.showToast('跳转失败: $e');
|
);
|
||||||
|
} catch (e) {
|
||||||
|
SmartDialog.showToast('跳转失败: $e');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user