fix: 评论渲染异常、评论总数
This commit is contained in:
@ -28,6 +28,7 @@ class VideoReplyController extends GetxController {
|
|||||||
bool isLoadingMore = false;
|
bool isLoadingMore = false;
|
||||||
RxString noMore = ''.obs;
|
RxString noMore = ''.obs;
|
||||||
int ps = 20;
|
int ps = 20;
|
||||||
|
RxInt count = 0.obs;
|
||||||
// 当前回复的回复
|
// 当前回复的回复
|
||||||
ReplyItemModel? currentReplyItem;
|
ReplyItemModel? currentReplyItem;
|
||||||
|
|
||||||
@ -96,6 +97,7 @@ class VideoReplyController extends GetxController {
|
|||||||
replyList.addAll(replies);
|
replyList.addAll(replies);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
count.value = res['data'].page.count;
|
||||||
isLoadingMore = false;
|
isLoadingMore = false;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
@ -160,9 +160,9 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
scale: animation, child: child);
|
scale: animation, child: child);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
_videoReplyController.sortTypeTitle.value,
|
'共${_videoReplyController.count.value}条回复',
|
||||||
key: ValueKey<String>(
|
key: ValueKey<int>(
|
||||||
_videoReplyController.sortTypeTitle.value),
|
_videoReplyController.count.value),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -591,7 +591,8 @@ InlineSpan buildContent(
|
|||||||
if (content.jumpUrl.isNotEmpty && hasMatchMember) {
|
if (content.jumpUrl.isNotEmpty && hasMatchMember) {
|
||||||
List urlKeys = content.jumpUrl.keys.toList();
|
List urlKeys = content.jumpUrl.keys.toList();
|
||||||
matchUrl = matchMember.splitMapJoin(
|
matchUrl = matchMember.splitMapJoin(
|
||||||
RegExp("(?:${urlKeys.join("|")})"),
|
/// RegExp.escape() 转义特殊字符
|
||||||
|
RegExp(RegExp.escape(urlKeys.join("|"))),
|
||||||
onMatch: (Match match) {
|
onMatch: (Match match) {
|
||||||
String matchStr = match[0]!;
|
String matchStr = match[0]!;
|
||||||
spanChilds.add(
|
spanChilds.add(
|
||||||
|
Reference in New Issue
Block a user