Merge branch 'fix' into alpha

This commit is contained in:
guozhigq
2023-10-05 10:30:26 +08:00
3 changed files with 19 additions and 13 deletions

View File

@ -28,6 +28,7 @@ class DynamicsHttp {
'data': DynamicsDataModel.fromJson(res.data['data']),
};
} catch (err) {
print(err);
return {
'status': false,
'data': [],

View File

@ -244,7 +244,9 @@ class Vote {
choiceCnt = json['choice_cnt'];
share = json['share'];
defaultShare = json['default_share'];
endTime = json['end_time'];
endTime = json['end_time'] is int
? json['end_time']
: int.parse(json['end_time']);
joinNum = json['join_num'];
status = json['status'];
type = json['type'];

View File

@ -27,8 +27,9 @@ InlineSpan richNode(item, context) {
} else {
for (var i in richTextNodes) {
/// fix 渲染专栏时内容会重复
if (item.modules.moduleDynamic.major.opus.title == null &&
i.type == 'RICH_TEXT_NODE_TYPE_TEXT') {
// if (item.modules.moduleDynamic.major.opus.title == null &&
// i.type == 'RICH_TEXT_NODE_TYPE_TEXT') {
if (i.type == 'RICH_TEXT_NODE_TYPE_TEXT') {
spanChilds.add(
TextSpan(text: i.origText, style: const TextStyle(height: 1.65)));
}
@ -109,6 +110,7 @@ InlineSpan richNode(item, context) {
alignment: PlaceholderAlignment.middle,
child: GestureDetector(
onTap: () {
try {
String dynamicId = item.basic['comment_id_str'];
Get.toNamed(
'/webview',
@ -119,6 +121,7 @@ InlineSpan richNode(item, context) {
'pageTitle': '投票'
},
);
} catch (_) {}
},
child: Text(
'投票:${i.text}',