Merge branch 'main' into fix
This commit is contained in:
@ -77,14 +77,14 @@ class Stat {
|
||||
this.danmu,
|
||||
});
|
||||
@HiveField(0)
|
||||
int? view;
|
||||
String? view;
|
||||
@HiveField(1)
|
||||
int? like;
|
||||
@HiveField(2)
|
||||
int? danmu;
|
||||
|
||||
Stat.fromJson(Map<String, dynamic> json) {
|
||||
view = json["view"];
|
||||
view = Utils.numFormat(json["view"]);
|
||||
like = json["like"];
|
||||
danmu = json['danmaku'];
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ class StatAdapter extends TypeAdapter<Stat> {
|
||||
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
|
||||
};
|
||||
return Stat(
|
||||
view: fields[0] as int?,
|
||||
view: fields[0] as String?,
|
||||
like: fields[1] as int?,
|
||||
danmu: fields[2] as int?,
|
||||
);
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:pilipala/common/widgets/network_img_layer.dart';
|
||||
import 'package:pilipala/http/search.dart';
|
||||
|
||||
// 富文本
|
||||
InlineSpan richNode(item, context) {
|
||||
@ -191,6 +193,39 @@ InlineSpan richNode(item, context) {
|
||||
),
|
||||
);
|
||||
}
|
||||
// 投稿
|
||||
if (i.type == 'RICH_TEXT_NODE_TYPE_BV') {
|
||||
spanChilds.add(
|
||||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
child: Icon(
|
||||
Icons.play_circle_outline_outlined,
|
||||
size: 16,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
),
|
||||
);
|
||||
spanChilds.add(
|
||||
WidgetSpan(
|
||||
alignment: PlaceholderAlignment.middle,
|
||||
child: GestureDetector(
|
||||
onTap: () async {
|
||||
try {
|
||||
int cid = await SearchHttp.ab2c(bvid: i.rid);
|
||||
Get.toNamed('/video?bvid=${i.rid}&cid=$cid',
|
||||
arguments: {'pic': null, 'heroTag': i.rid});
|
||||
} catch (err) {
|
||||
SmartDialog.showToast(err.toString());
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
'${i.text} ',
|
||||
style: authorStyle,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
// if (contentType == 'major' &&
|
||||
// item.modules.moduleDynamic.major.opus.pics.isNotEmpty) {
|
||||
|
||||
Reference in New Issue
Block a user