Compare commits

..

1 Commits

Author SHA1 Message Date
296f4108b8 Merge branch 'main' into feature-ad 2024-03-26 22:15:30 +08:00
4 changed files with 15 additions and 45 deletions

View File

@ -437,8 +437,7 @@ class SearchArticleItemModel {
pubTime = json['pub_time'];
like = json['like'];
title = Em.regTitle(json['title']);
subTitle =
Em.decodeHtmlEntities(json['title'].replaceAll(RegExp(r'<[^>]*>'), ''));
subTitle = json['title'].replaceAll(RegExp(r'<[^>]*>'), '');
rankOffset = json['rank_offset'];
mid = json['mid'];
imageUrls = json['image_urls'];

View File

@ -185,7 +185,7 @@ class HistoryItem extends StatelessWidget {
? '已看完'
: '${Utils.timeFormat(videoItem.progress!)}/${Utils.timeFormat(videoItem.duration!)}',
right: 6.0,
bottom: 8.0,
bottom: 6.0,
type: 'gray',
),
// 右上角
@ -258,27 +258,6 @@ class HistoryItem extends StatelessWidget {
),
),
),
videoItem.progress != 0
? Positioned(
left: 3,
right: 3,
bottom: 0,
child: ClipRRect(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(
StyleString.imgRadius.x),
bottomRight: Radius.circular(
StyleString.imgRadius.x),
),
child: LinearProgressIndicator(
value: videoItem.progress == -1
? 100
: videoItem.progress /
videoItem.duration,
),
),
)
: const SizedBox()
],
),
VideoContent(videoItem: videoItem, ctr: ctr)

View File

@ -149,16 +149,13 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
delegate: _MySliverPersistentHeaderDelegate(
child: Container(
height: 40,
padding: const EdgeInsets.fromLTRB(12, 0, 6, 0),
color: Theme.of(context).colorScheme.surface,
padding: const EdgeInsets.fromLTRB(12, 6, 6, 0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Obx(
() => Text(
'${_videoReplyController.sortTypeLabel.value}评论',
style: const TextStyle(fontSize: 13),
),
Text(
'${_videoReplyController.sortTypeLabel.value}评论',
style: const TextStyle(fontSize: 13),
),
SizedBox(
height: 35,

View File

@ -19,7 +19,15 @@ class Em {
return regCate(matchStr);
}, onNonMatch: (String str) {
if (str != '') {
str = decodeHtmlEntities(str);
str = str
.replaceAll('&lt;', '<')
.replaceAll('&gt;', '>')
.replaceAll('&#34;', '"')
.replaceAll('&#39;', "'")
.replaceAll('&quot;', '"')
.replaceAll('&apos;', "'")
.replaceAll('&nbsp;', " ")
.replaceAll('&amp;', "&");
Map map = {'type': 'text', 'text': str};
res.add(map);
}
@ -27,17 +35,4 @@ class Em {
});
return res;
}
static String decodeHtmlEntities(String title) {
return title
.replaceAll('&lt;', '<')
.replaceAll('&gt;', '>')
.replaceAll('&#34;', '"')
.replaceAll('&#39;', "'")
.replaceAll('&quot;', '"')
.replaceAll('&apos;', "'")
.replaceAll('&nbsp;', " ")
.replaceAll('&amp;', "&")
.replaceAll('&#x27;', "'");
}
}