Merge branch 'fix-replyRepeat'
This commit is contained in:
@ -114,7 +114,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
final VideoDetailController videoDetailCtr =
|
final VideoDetailController videoDetailCtr =
|
||||||
Get.find<VideoDetailController>(tag: heroTag);
|
Get.find<VideoDetailController>(tag: heroTag);
|
||||||
if (replyItem != null) {
|
if (replyItem != null) {
|
||||||
videoDetailCtr.oid = replyItem.oid;
|
videoDetailCtr.oid.value = replyItem.oid;
|
||||||
videoDetailCtr.fRpid = replyItem.rpid!;
|
videoDetailCtr.fRpid = replyItem.rpid!;
|
||||||
videoDetailCtr.firstFloor = replyItem;
|
videoDetailCtr.firstFloor = replyItem;
|
||||||
videoDetailCtr.showReplyReplyPanel();
|
videoDetailCtr.showReplyReplyPanel();
|
||||||
|
@ -739,6 +739,47 @@ InlineSpan buildContent(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (content.jumpUrl.keys.isNotEmpty) {
|
||||||
|
List<String> unmatchedItems = content.jumpUrl.keys
|
||||||
|
.toList()
|
||||||
|
.where((item) => !content.message.contains(item))
|
||||||
|
.toList();
|
||||||
|
if (unmatchedItems.isNotEmpty) {
|
||||||
|
for (int i = 0; i < unmatchedItems.length; i++) {
|
||||||
|
String patternStr = unmatchedItems[i];
|
||||||
|
spanChilds.addAll(
|
||||||
|
[
|
||||||
|
if (content.jumpUrl[patternStr]?['prefix_icon'] != null) ...[
|
||||||
|
WidgetSpan(
|
||||||
|
child: Image.network(
|
||||||
|
content.jumpUrl[patternStr]['prefix_icon'],
|
||||||
|
height: 19,
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
TextSpan(
|
||||||
|
text: content.jumpUrl[patternStr]['title'],
|
||||||
|
style: TextStyle(
|
||||||
|
color: Theme.of(context).colorScheme.primary,
|
||||||
|
),
|
||||||
|
recognizer: TapGestureRecognizer()
|
||||||
|
..onTap = () {
|
||||||
|
Get.toNamed(
|
||||||
|
'/webview',
|
||||||
|
parameters: {
|
||||||
|
'url': patternStr,
|
||||||
|
'type': 'url',
|
||||||
|
'pageTitle': content.jumpUrl[patternStr]['title']
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// 图片渲染
|
// 图片渲染
|
||||||
if (content.pictures.isNotEmpty) {
|
if (content.pictures.isNotEmpty) {
|
||||||
final List<String> picList = <String>[];
|
final List<String> picList = <String>[];
|
||||||
@ -753,11 +794,15 @@ InlineSpan buildContent(
|
|||||||
builder: (BuildContext context, BoxConstraints box) {
|
builder: (BuildContext context, BoxConstraints box) {
|
||||||
double maxHeight = box.maxWidth * 0.6; // 设置最大高度
|
double maxHeight = box.maxWidth * 0.6; // 设置最大高度
|
||||||
// double width = (box.maxWidth / 2).truncateToDouble();
|
// double width = (box.maxWidth / 2).truncateToDouble();
|
||||||
double height = ((box.maxWidth /
|
double height = 100;
|
||||||
2 *
|
try {
|
||||||
pictureItem['img_height'] /
|
height = ((box.maxWidth /
|
||||||
pictureItem['img_width']))
|
2 *
|
||||||
.truncateToDouble();
|
pictureItem['img_height'] /
|
||||||
|
pictureItem['img_width']))
|
||||||
|
.truncateToDouble();
|
||||||
|
} catch (_) {}
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showDialog(
|
showDialog(
|
||||||
|
Reference in New Issue
Block a user