diff --git a/lib/common/widgets/html_render.dart b/lib/common/widgets/html_render.dart
index 86c3b666e..ea0b9f460 100644
--- a/lib/common/widgets/html_render.dart
+++ b/lib/common/widgets/html_render.dart
@@ -36,7 +36,15 @@ Widget htmlRender({
if (isMall) {
return const SizedBox.shrink();
}
-
+ // bool inTable =
+ // extensionContext.element!.previousElementSibling == null ||
+ // extensionContext.element!.nextElementSibling == null;
+ // imgUrl = Utils().imageUrl(imgUrl!);
+ // return CachedNetworkImage(
+ // imageUrl: imgUrl,
+ // width: isEmote ? 22 : null,
+ // height: isEmote ? 22 : null,
+ // );
String? clazz = attributes['class'];
String? height = RegExp(r'max-height:(\d+)px')
.firstMatch('${attributes['style']}')
@@ -81,6 +89,7 @@ Widget htmlRender({
lineHeight: LineHeight.percent(160),
letterSpacing: 0.3,
),
+ // 'br': Style(margin: Margins.zero, padding: HtmlPaddings.zero),
'body': Style(margin: Margins.zero, padding: HtmlPaddings.zero),
'a': Style(
color: Theme.of(context).colorScheme.primary,
@@ -91,6 +100,7 @@ Widget htmlRender({
),
'p': Style(
margin: Margins.only(bottom: 4),
+ // margin: Margins.zero,
),
'span': Style(
fontSize: FontSize.large,
@@ -118,6 +128,7 @@ Widget htmlRender({
'figcaption': Style(
fontSize: FontSize.large,
textAlign: TextAlign.center,
+ // margin: Margins.only(top: 4),
),
'strong': Style(fontWeight: FontWeight.bold),
'figure': Style(
diff --git a/lib/common/widgets/interactiveviewer_gallery/interactiveviewer_gallery.dart b/lib/common/widgets/interactiveviewer_gallery/interactiveviewer_gallery.dart
index d846d7809..6b00551c7 100644
--- a/lib/common/widgets/interactiveviewer_gallery/interactiveviewer_gallery.dart
+++ b/lib/common/widgets/interactiveviewer_gallery/interactiveviewer_gallery.dart
@@ -458,6 +458,23 @@ class _InteractiveviewerGalleryState extends State
imageUrl: Utils.thumbnailImgUrl(widget.sources[index].url),
);
},
+ // fit: BoxFit.contain,
+ // progressIndicatorBuilder: (context, url, progress) {
+ // return Center(
+ // child: SizedBox(
+ // width: 150.0,
+ // child:
+ // LinearProgressIndicator(value: progress.progress ?? 0),
+ // ),
+ // );
+ // },
+ // errorListener: (value) {
+ // WidgetsBinding.instance.addPostFrameCallback((_) {
+ // setState(() {
+ // _thumbList[index] = false;
+ // });
+ // });
+ // },
),
SourceType.livePhoto => Obx(() => currentIndex.value == index
? IgnorePointer(
diff --git a/lib/common/widgets/network_img_layer.dart b/lib/common/widgets/network_img_layer.dart
index 8dbb861ba..3635811ac 100644
--- a/lib/common/widgets/network_img_layer.dart
+++ b/lib/common/widgets/network_img_layer.dart
@@ -106,6 +106,7 @@ class NetworkImgLayer extends StatelessWidget {
width: width,
height: height,
cacheWidth: width.cacheSize(context),
+ // cacheHeight: height.cacheSize(context),
),
),
);
diff --git a/lib/common/widgets/video_card_v.dart b/lib/common/widgets/video_card_v.dart
index ac92d0722..077cd0370 100644
--- a/lib/common/widgets/video_card_v.dart
+++ b/lib/common/widgets/video_card_v.dart
@@ -45,6 +45,7 @@ class VideoCardV extends StatelessWidget {
PageUtils.toVideoPage(
'bvid=$bvid&cid=$cid',
arguments: {
+ // 'videoItem': videoItem,
'pic': videoItem.pic,
'heroTag': heroTag,
},
@@ -57,6 +58,7 @@ class VideoCardV extends StatelessWidget {
String uri = videoItem.uri!;
String id = '';
if (uri.startsWith('bilibili://article/')) {
+ // https://www.bilibili.com/read/cv27063554
dynamicType = 'read';
RegExp regex = RegExp(r'\d+');
Match match = regex.firstMatch(uri)!;
diff --git a/lib/common/widgets/video_popup_menu.dart b/lib/common/widgets/video_popup_menu.dart
index e7fa3faf3..2adb6a785 100644
--- a/lib/common/widgets/video_popup_menu.dart
+++ b/lib/common/widgets/video_popup_menu.dart
@@ -60,6 +60,7 @@ class VideoCustomActions {
Icon(MdiIcons.accountCircleOutline, size: 16),
() async {
Get.toNamed('/member?mid=${videoItem.owner.mid}', arguments: {
+ // 'face': videoItem.owner.face,
'heroTag': '${videoItem.owner.mid}',
});
},
@@ -144,6 +145,8 @@ class VideoCustomActions {
onPressed: () async {
SmartDialog.showLoading(msg: '正在提交');
var res = await VideoHttp.feedDislikeCancel(
+ // reasonId: r?.id,
+ // feedbackId: f?.id,
id: v.param!,
goto: v.goto!,
);
diff --git a/lib/http/msg.dart b/lib/http/msg.dart
index 185458aa2..96acac1d1 100644
--- a/lib/http/msg.dart
+++ b/lib/http/msg.dart
@@ -556,5 +556,36 @@ class MsgHttp {
static String getDevId() {
return Uuid().v4();
+ // final List b = [
+ // '0',
+ // '1',
+ // '2',
+ // '3',
+ // '4',
+ // '5',
+ // '6',
+ // '7',
+ // '8',
+ // '9',
+ // 'A',
+ // 'B',
+ // 'C',
+ // 'D',
+ // 'E',
+ // 'F'
+ // ];
+ // final List s = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".split('');
+ // for (int i = 0; i < s.length; i++) {
+ // if ('-' == s[i] || '4' == s[i]) {
+ // continue;
+ // }
+ // final int randomInt = Random().nextInt(16);
+ // if ('x' == s[i]) {
+ // s[i] = b[randomInt];
+ // } else {
+ // s[i] = b[3 & randomInt | 8];
+ // }
+ // }
+ // return s.join();
}
}
diff --git a/lib/http/user.dart b/lib/http/user.dart
index 75b5d1dd9..3476eef1f 100644
--- a/lib/http/user.dart
+++ b/lib/http/user.dart
@@ -418,6 +418,30 @@ class UserHttp {
return {'status': false, 'msg': res.data['message']};
}
}
+ // // 相互关系查询
+ // static Future relationSearch(int mid) async {
+ // Map params = await WbiSign.makSign({
+ // 'mid': mid,
+ // 'token': '',
+ // 'platform': 'web',
+ // 'web_location': 1550101,
+ // });
+ // var res = await Request().get(
+ // Api.relationSearch,
+ // data: {
+ // 'mid': mid,
+ // 'w_rid': params['w_rid'],
+ // 'wts': params['wts'],
+ // },
+ // );
+ // if (res.data['code'] == 0) {
+ // // relation 主动状态
+ // // 被动状态
+ // return {'status': true, 'data': res.data['data']};
+ // } else {
+ // return {'status': false, 'msg': res.data['message']};
+ // }
+ // }
// 搜索历史记录
static Future> searchHistory(
diff --git a/lib/http/video.dart b/lib/http/video.dart
index f0f58c912..b45d8de2b 100644
--- a/lib/http/video.dart
+++ b/lib/http/video.dart
@@ -24,6 +24,9 @@ import 'api.dart';
import 'init.dart';
import 'login.dart';
+/// res.data['code'] == 0 请求正常返回结果
+/// res.data['data'] 为结果
+/// 返回{'status': bool, 'data': List}
/// view层根据 status 判断渲染逻辑
class VideoHttp {
static bool enableRcmdDynamic =
@@ -371,6 +374,28 @@ class VideoHttp {
}
}
+ // 获取点赞状态
+ // static Future hasLikeVideo({required String bvid}) async {
+ // var res =
+ // await Request().get(Api.hasLikeVideo, queryParameters: {'bvid': bvid});
+ // if (res.data['code'] == 0) {
+ // return {'status': true, 'data': res.data['data']};
+ // } else {
+ // return {'status': false, 'msg': res.data['message']};
+ // }
+ // }
+
+ // 获取投币状态
+ // static Future hasCoinVideo({required String bvid}) async {
+ // var res =
+ // await Request().get(Api.hasCoinVideo, queryParameters: {'bvid': bvid});
+ // if (res.data['code'] == 0) {
+ // return {'status': true, 'data': res.data['data']};
+ // } else {
+ // return {'status': false, 'msg': res.data['message']};
+ // }
+ // }
+
// 投币
static Future coinVideo({
required String bvid,
@@ -395,6 +420,17 @@ class VideoHttp {
}
}
+ // 获取收藏状态
+ // static Future hasFavVideo({required int aid}) async {
+ // var res =
+ // await Request().get(Api.hasFavVideo, queryParameters: {'aid': aid});
+ // if (res.data['code'] == 0) {
+ // return {'status': true, 'data': res.data['data']};
+ // } else {
+ // return {'status': false, 'msg': res.data['message']};
+ // }
+ // }
+
// 一键三连 bangumi
static Future triple({dynamic epId, required dynamic seasonId}) async {
var res = await Request().post(
@@ -456,6 +492,11 @@ class VideoHttp {
'like': type ? '0' : '1',
},
options: Options(contentType: Headers.formUrlEncodedContentType),
+ // queryParameters: {
+ // 'bvid': bvid,
+ // 'like': type ? 1 : 2,
+ // 'csrf': Accounts.main.csrf,
+ // },
);
if (res.data['code'] == 0) {
return {'status': true, 'data': res.data['data']};
@@ -500,6 +541,7 @@ class VideoHttp {
var res = await Request().get(Api.feedDislike, queryParameters: {
'goto': goto,
'id': id,
+ // 'mid': mid,
if (reasonId != null) 'reason_id': reasonId,
if (feedbackId != null) 'feedback_id': feedbackId,
'build': '1',
@@ -521,9 +563,11 @@ class VideoHttp {
if (Accounts.get(AccountType.recommend).accessKey.isNullOrEmpty) {
return {'status': false, 'msg': "请退出账号后重新登录"};
}
+ // assert ((reasonId != null) ^ (feedbackId != null));
var res = await Request().get(Api.feedDislikeCancel, queryParameters: {
'goto': goto,
'id': id,
+ // 'mid': mid,
if (reasonId != null) 'reason_id': reasonId,
if (feedbackId != null) 'feedback_id': feedbackId,
'build': '1',
@@ -583,6 +627,33 @@ class VideoHttp {
}
}
+ // (取消)收藏 bangumi
+ // static Future favBangumi({
+ // required dynamic epId,
+ // String? addIds,
+ // String? delIds,
+ // }) async {
+ // var res = await Request().post(
+ // Api.favBangumi,
+ // data: {
+ // 'resources': '$epId:24',
+ // 'add_media_ids': addIds ?? '',
+ // 'del_media_ids': delIds ?? '',
+ // 'csrf': Accounts.main.csrf,
+ // },
+ // options: Options(
+ // headers: {
+ // 'Content-Type': Headers.formUrlEncodedContentType,
+ // },
+ // ),
+ // );
+ // if (res.data['code'] == 0) {
+ // return {'status': true, 'data': res.data['data']};
+ // } else {
+ // return {'status': false, 'msg': res.data['message']};
+ // }
+ // }
+
static Future copyOrMoveFav({
required bool isCopy,
required bool isFav,
@@ -782,6 +853,7 @@ class VideoHttp {
subType,
}) async {
await Request().post(Api.heartBeat, queryParameters: {
+ // 'aid': aid,
'bvid': bvid,
'cid': cid,
if (epid != null) 'epid': epid,
@@ -917,10 +989,26 @@ class VideoHttp {
);
if (res.data['code'] == 0) {
dynamic data = res.data['data'];
+ /*
+ [
+ {
+ "id": 1430455228267894300,
+ "lan": "ai-zh",
+ "lan_doc": "中文(自动生成)",
+ "is_lock": false,
+ "subtitle_url": "//aisubtitle.hdslb.com/bfs/ai_subtitle/prod/15508958271448462983dacf99a49f40ccdf91a4df8d925e2b58?auth_key=1708941835-aaa0e44844594386ad356795733983a2-0-89af73c6aad5a1fca43b02113fa9d485",
+ "type": 1,
+ "id_str": "1430455228267894272",
+ "ai_type": 0,
+ "ai_status": 2
+ }
+ ]
+ */
return {
'status': true,
'subtitles': data['subtitle']['subtitles'],
'view_points': data['view_points'],
+ // 'last_play_time': data['last_play_time'],
'last_play_cid': data['last_play_cid'],
'interaction': data['interaction'],
};
diff --git a/lib/models/user/fav_detail.dart b/lib/models/user/fav_detail.dart
index 01a8f4306..ebef6c5bd 100644
--- a/lib/models/user/fav_detail.dart
+++ b/lib/models/user/fav_detail.dart
@@ -62,4 +62,7 @@ class FavDetailItemData extends BaseVideoItemModel with MultiSelectData {
static final _digitRegExp = RegExp(r'\d+');
String resolveEpId(String url) => _digitRegExp.firstMatch(url)!.group(0)!;
+
+ // @override
+ // bool isFollowed;
}
diff --git a/lib/models/video/play/quality.dart b/lib/models/video/play/quality.dart
index e41faa9c4..34cb858d3 100644
--- a/lib/models/video/play/quality.dart
+++ b/lib/models/video/play/quality.dart
@@ -59,6 +59,7 @@ extension VideoQualityDesc on VideoQuality {
String get description => _descList[index];
}
+///
enum AudioQuality { k64, k132, k192, dolby, hiRes }
extension AudioQualityCode on AudioQuality {
diff --git a/lib/models/video/play/url.dart b/lib/models/video/play/url.dart
index 268e709b3..4a6ed23f1 100644
--- a/lib/models/video/play/url.dart
+++ b/lib/models/video/play/url.dart
@@ -16,6 +16,7 @@ class PlayUrlModel {
this.seekType,
this.dash,
this.supportFormats,
+ // this.highFormat,
this.lastPlayTime,
this.lastPlayCid,
});
@@ -35,6 +36,7 @@ class PlayUrlModel {
Dash? dash;
List? durl;
List? supportFormats;
+ // String? highFormat;
int? lastPlayTime;
int? lastPlayCid;
@@ -173,9 +175,8 @@ class VideoItem {
baseUrl = json['baseUrl'];
var backupUrls = json['backupUrl']?.toList() ?? [];
backupUrl = backupUrls.isNotEmpty
- ? backupUrls.firstWhere((i) => !_isMCDNorPCDN(i),
- orElse: () => backupUrls.first)
- : '';
+ ? backupUrls.firstWhere((i) => !_isMCDNorPCDN(i), orElse: () => backupUrls.first)
+ : '';
bandWidth = json['bandWidth'];
mimeType = json['mime_type'];
codecs = json['codecs'];
@@ -247,9 +248,8 @@ class AudioItem {
baseUrl = json['baseUrl'];
var backupUrls = json['backupUrl']?.toList() ?? [];
backupUrl = backupUrls.isNotEmpty
- ? backupUrls.firstWhere((i) => !_isMCDNorPCDN(i),
- orElse: () => backupUrls.first)
- : '';
+ ? backupUrls.firstWhere((i) => !_isMCDNorPCDN(i), orElse: () => backupUrls.first)
+ : '';
bandWidth = json['bandWidth'];
mimeType = json['mime_type'];
codecs = json['codecs'];
diff --git a/lib/pages/about/index.dart b/lib/pages/about/index.dart
index 66885b077..d47315187 100644
--- a/lib/pages/about/index.dart
+++ b/lib/pages/about/index.dart
@@ -254,6 +254,14 @@ Commit Hash: ${BuildConfig.commitHash}''',
Get.back();
String res = jsonEncode(Accounts.account.toMap());
Utils.copyText(res);
+ // if (context.mounted) {
+ // showDialog(
+ // context: context,
+ // builder: (context) => AlertDialog(
+ // content: SelectableText('$res'),
+ // ),
+ // );
+ // }
},
),
ListTile(
diff --git a/lib/pages/bangumi/introduction/controller.dart b/lib/pages/bangumi/introduction/controller.dart
index 3f2e98a74..be172827b 100644
--- a/lib/pages/bangumi/introduction/controller.dart
+++ b/lib/pages/bangumi/introduction/controller.dart
@@ -103,6 +103,7 @@ class BangumiIntroController
var result = await UserHttp.videoTags(bvid: bvid);
if (result['status']) {
videoTags = result['data'];
+ // debugPrint('tags: ${result['data']}');
}
}
@@ -561,6 +562,10 @@ class BangumiIntroController
scriptContent['props']['pageProps']['followState']['isFollowed'];
followStatus.value =
scriptContent['props']['pageProps']['followState']['followStatus'];
+ // int progress = scriptContent['props']['pageProps']['dehydratedState']
+ // ['queries'][0]['state']['data']['result']
+ // ['play_view_business_info']['user_status']['watch_progress']
+ // ['current_watch_progress'];
}
} catch (_) {}
}
diff --git a/lib/pages/bangumi/introduction/view.dart b/lib/pages/bangumi/introduction/view.dart
index 05e14aaaf..26251ecfa 100644
--- a/lib/pages/bangumi/introduction/view.dart
+++ b/lib/pages/bangumi/introduction/view.dart
@@ -394,6 +394,16 @@ class _BangumiInfoState extends State {
],
),
const SizedBox(height: 6),
+ // 点赞收藏转发 布局样式1
+ // SingleChildScrollView(
+ // padding: const EdgeInsets.only(top: 7, bottom: 7),
+ // scrollDirection: Axis.horizontal,
+ // child: actionRow(
+ // context,
+ // bangumiIntroController,
+ // videoDetailCtr,
+ // ),
+ // ),
// 点赞收藏转发 布局样式2
actionGrid(context, bangumiIntroController),
// 番剧分p
diff --git a/lib/pages/bangumi/widgets/bangumi_panel.dart b/lib/pages/bangumi/widgets/bangumi_panel.dart
index 863abec71..3d497db53 100644
--- a/lib/pages/bangumi/widgets/bangumi_panel.dart
+++ b/lib/pages/bangumi/widgets/bangumi_panel.dart
@@ -68,8 +68,24 @@ class _BangumiPanelState extends State {
super.dispose();
}
+ // void changeFucCall(item, i) async {
+ // if (item.badge != null && item.badge == '会员' && vipStatus != 1) {
+ // SmartDialog.showToast('需要大会员');
+ // return;
+ // }
+ // await widget.changeFuc!(
+ // item.bvid,
+ // item.cid,
+ // item.aid,
+ // );
+ // currentIndex = i;
+ // setState(() {});
+ // scrollToIndex();
+ // }
+
void scrollToIndex() {
WidgetsBinding.instance.addPostFrameCallback((_) {
+ // 在回调函数中获取更新后的状态
listViewScrollCtr.animateTo(
(currentIndex * 150.0).clamp(listViewScrollCtr.position.minScrollExtent,
listViewScrollCtr.position.maxScrollExtent),
@@ -132,12 +148,11 @@ class _BangumiPanelState extends State {
scrollDirection: Axis.horizontal,
itemCount: widget.pages.length,
itemExtent: 150,
- itemBuilder: (BuildContext context, int index) {
- final item = widget.pages[index];
+ itemBuilder: (BuildContext context, int i) {
return Container(
width: 150,
margin: EdgeInsets.only(
- right: index == widget.pages.length - 1 ? 0 : 10,
+ right: i == widget.pages.length - 1 ? 0 : 10,
),
child: Material(
color: Theme.of(context).colorScheme.onInverseSurface,
@@ -145,19 +160,24 @@ class _BangumiPanelState extends State {
clipBehavior: Clip.hardEdge,
child: InkWell(
onTap: () {
- if (item.badge != null &&
- item.badge == '会员' &&
+ if (widget.pages[i].badge != null &&
+ widget.pages[i].badge == '会员' &&
vipStatus != 1) {
SmartDialog.showToast('需要大会员');
+ // return;
}
widget.changeFuc(
- item.epId,
- item.bvid,
- item.cid,
- item.aid,
- item.cover,
+ widget.pages[i].epId,
+ widget.pages[i].bvid,
+ widget.pages[i].cid,
+ widget.pages[i].aid,
+ widget.pages[i].cover,
);
+ // currentIndex = i;
+ // setState(() {});
+ // scrollToIndex();
},
+ //changeFucCall(widget.pages[i], i),
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 8, horizontal: 10),
@@ -166,7 +186,7 @@ class _BangumiPanelState extends State {
children: [
Row(
children: [
- if (index == currentIndex) ...[
+ if (i == currentIndex) ...[
Image.asset(
'assets/images/live.png',
color: Theme.of(context).colorScheme.primary,
@@ -177,32 +197,32 @@ class _BangumiPanelState extends State {
],
Expanded(
child: Text(
- item.title ?? '第${index + 1}话',
- maxLines: (item.longTitle != null &&
- item.longTitle != '')
+ widget.pages[i].title ?? '第${i + 1}话',
+ maxLines: (widget.pages[i].longTitle != null &&
+ widget.pages[i].longTitle != '')
? 1
: 2,
style: TextStyle(
fontSize: 13,
- color: index == currentIndex
+ color: i == currentIndex
? Theme.of(context).colorScheme.primary
: Theme.of(context)
.colorScheme
.onSurface),
)),
const SizedBox(width: 2),
- if (item.badge != null) ...[
+ if (widget.pages[i].badge != null) ...[
const Spacer(),
- if (item.badge == '会员') ...[
+ if (widget.pages[i].badge == '会员') ...[
Image.asset(
'assets/images/big-vip.png',
height: 16,
semanticLabel: "大会员",
),
],
- if (item.badge != '会员') ...[
+ if (widget.pages[i].badge != '会员') ...[
Text(
- item.badge!,
+ widget.pages[i].badge!,
style: TextStyle(
fontSize: 11,
color:
@@ -213,15 +233,15 @@ class _BangumiPanelState extends State {
]
],
),
- if (item.longTitle != null &&
- item.longTitle != '') ...[
+ if (widget.pages[i].longTitle != null &&
+ widget.pages[i].longTitle != '') ...[
const SizedBox(height: 3),
Text(
- item.longTitle!,
+ widget.pages[i].longTitle!,
maxLines: 1,
style: TextStyle(
fontSize: 13,
- color: index == currentIndex
+ color: i == currentIndex
? Theme.of(context).colorScheme.primary
: Theme.of(context)
.colorScheme
diff --git a/lib/pages/danmaku_block/view.dart b/lib/pages/danmaku_block/view.dart
index 27a88d607..545da3fcf 100644
--- a/lib/pages/danmaku_block/view.dart
+++ b/lib/pages/danmaku_block/view.dart
@@ -70,6 +70,7 @@ class _DanmakuBlockPageState extends State {
TextField(
controller: textController,
autofocus: true,
+ //decoration: InputDecoration(hintText: hintText),
)
]),
actions: [
diff --git a/lib/pages/dynamics/controller.dart b/lib/pages/dynamics/controller.dart
index 5d89c16bc..12dc339cf 100644
--- a/lib/pages/dynamics/controller.dart
+++ b/lib/pages/dynamics/controller.dart
@@ -70,6 +70,7 @@ class DynamicsController extends GetxController
Future queryFollowing2() async {
if (upData.value.upList != null &&
upData.value.upList!.length >= allFollowedUpsTotal) {
+ // SmartDialog.showToast('没有更多了');
return;
}
var res = await FollowHttp.followings(
@@ -186,6 +187,7 @@ class DynamicsController extends GetxController
await controller.onRefresh();
}
+ // 返回顶部并刷新
@override
void animateToTop() async {
controller.animateToTop();
diff --git a/lib/pages/dynamics/detail/view.dart b/lib/pages/dynamics/detail/view.dart
index 839f63e85..5a8d18320 100644
--- a/lib/pages/dynamics/detail/view.dart
+++ b/lib/pages/dynamics/detail/view.dart
@@ -31,6 +31,7 @@ import '../../../utils/grid.dart';
import '../widgets/dynamic_panel.dart';
class DynamicDetailPage extends StatefulWidget {
+ // const DynamicDetailPage({super.key});
const DynamicDetailPage({super.key});
@override
@@ -42,6 +43,7 @@ class _DynamicDetailPageState extends State
late DynamicDetailController _dynamicDetailController;
AnimationController? _fabAnimationCtr;
final RxBool _visibleTitle = false.obs;
+ // String? action;
// 回复类型
late int replyType;
bool _isFabVisible = true;
@@ -122,6 +124,8 @@ class _DynamicDetailPageState extends State
Map args = Get.arguments;
// 楼层
int floor = args['floor'];
+ // 从action栏点击进入
+ // action = args.containsKey('action') ? args['action'] : null;
// 评论类型
int commentType = args['item'].basic!['comment_type'] ?? 11;
replyType = (commentType == 0) ? 11 : commentType;
diff --git a/lib/pages/dynamics/tab/view.dart b/lib/pages/dynamics/tab/view.dart
index 402a66489..629785a1a 100644
--- a/lib/pages/dynamics/tab/view.dart
+++ b/lib/pages/dynamics/tab/view.dart
@@ -144,7 +144,10 @@ class _DynamicsTabPageState
sliver: dynamicsWaterfallFlow
? SliverWaterfallFlow.extent(
maxCrossAxisExtent: Grid.smallCardWidth * 2,
+ //cacheExtent: 0.0,
crossAxisSpacing: StyleString.cardSpace / 2,
+ // mainAxisSpacing: StyleString.cardSpace / 2,
+
lastChildLayoutTypeBuilder: (index) {
if (index == loadingState.response!.length - 1) {
controller.onLoadMore();
@@ -160,6 +163,7 @@ class _DynamicsTabPageState
DynamicPanel(
item: i,
onRemove: controller.onRemove,
+ // onSetTop: controller.onSetTop,
),
] else ...[
for (var i in loadingState.response!)
@@ -168,6 +172,7 @@ class _DynamicsTabPageState
DynamicPanel(
item: i,
onRemove: controller.onRemove,
+ // onSetTop: controller.onSetTop,
),
]
],
@@ -193,6 +198,7 @@ class _DynamicsTabPageState
return DynamicPanel(
item: item,
onRemove: controller.onRemove,
+ // onSetTop: controller.onSetTop,
);
}
return const SizedBox.shrink();
diff --git a/lib/pages/dynamics/widgets/additional_panel.dart b/lib/pages/dynamics/widgets/additional_panel.dart
index 4a6d9d8c6..9c7147b8c 100644
--- a/lib/pages/dynamics/widgets/additional_panel.dart
+++ b/lib/pages/dynamics/widgets/additional_panel.dart
@@ -131,6 +131,7 @@ Widget addWidget(item, context, type, {floor = 1}) {
)
],
),
+ // TextButton(onPressed: () {}, child: Text('123'))
),
),
)
@@ -139,6 +140,60 @@ Widget addWidget(item, context, type, {floor = 1}) {
case 'ADDITIONAL_TYPE_GOODS':
// 商品
return const SizedBox();
+ // return Padding(
+ // padding: const EdgeInsets.only(top: 6),
+ // child: InkWell(
+ // onTap: () {},
+ // child: Container(
+ // padding:
+ // const EdgeInsets.only(left: 12, top: 8, right: 12, bottom: 8),
+ // decoration: BoxDecoration(
+ // color: bgColor,
+ // borderRadius: const BorderRadius.all(Radius.circular(6)),
+ // ),
+ // child: Row(
+ // children: [
+ // NetworkImgLayer(
+ // width: 75,
+ // height: 75,
+ // src: dynamicProperty[type].items.first.cover,
+ // ),
+ // const SizedBox(width: 10),
+ // Expanded(
+ // child: Column(
+ // crossAxisAlignment: CrossAxisAlignment.start,
+ // mainAxisAlignment: MainAxisAlignment.start,
+ // children: [
+ // Text(
+ // dynamicProperty[type].items.first.name,
+ // maxLines: 1,
+ // overflow: TextOverflow.ellipsis,
+ // ),
+ // Text(
+ // dynamicProperty[type].items.first.brief,
+ // maxLines: 1,
+ // style: TextStyle(
+ // color: Theme.of(context).colorScheme.outline,
+ // fontSize: Theme.of(context)
+ // .textTheme
+ // .labelMedium!
+ // .fontSize,
+ // ),
+ // ),
+ // const SizedBox(height: 2),
+ // Text(
+ // dynamicProperty[type].items.first.price,
+ // style: TextStyle(
+ // color: Theme.of(context).colorScheme.primary,
+ // ),
+ // ),
+ // ],
+ // ),
+ // ),
+ // ],
+ // ),
+ // ),
+ // ),);
case 'ADDITIONAL_TYPE_MATCH':
return const SizedBox();
case 'ADDITIONAL_TYPE_COMMON':
diff --git a/lib/pages/dynamics/widgets/author_panel.dart b/lib/pages/dynamics/widgets/author_panel.dart
index 35bf123cc..ed13bf8b0 100644
--- a/lib/pages/dynamics/widgets/author_panel.dart
+++ b/lib/pages/dynamics/widgets/author_panel.dart
@@ -84,6 +84,7 @@ class AuthorPanel extends StatelessWidget {
children: [
Text(
item.modules.moduleAuthor.name,
+ // semanticsLabel: "UP主:${item.modules.moduleAuthor.name}",
style: TextStyle(
color: item.modules.moduleAuthor!.vip != null &&
item.modules.moduleAuthor!.vip['status'] > 0 &&
@@ -144,6 +145,20 @@ class AuthorPanel extends StatelessWidget {
? Row(
mainAxisSize: MainAxisSize.min,
children: [
+ // GestureDetector(
+ // onTap:
+ // item.modules.moduleAuthor.decorate['jump_url'] != null
+ // ? () {
+ // Get.toNamed(
+ // '/webview',
+ // parameters: {
+ // 'url':
+ // '${item.modules.moduleAuthor.decorate['jump_url']}'
+ // },
+ // );
+ // }
+ // : null,
+ // child:
Stack(
clipBehavior: Clip.none,
alignment: Alignment.centerRight,
@@ -183,6 +198,7 @@ class AuthorPanel extends StatelessWidget {
),
],
),
+ // ),
_moreWidget(context),
],
)
@@ -266,6 +282,7 @@ class AuthorPanel extends StatelessWidget {
}
},
minLeadingWidth: 0,
+ // dense: true,
leading: const Icon(Icons.watch_later_outlined, size: 19),
title: Text(
'稍后再看',
diff --git a/lib/pages/dynamics/widgets/content_panel.dart b/lib/pages/dynamics/widgets/content_panel.dart
index e9a5ae950..ef123e4d5 100644
--- a/lib/pages/dynamics/widgets/content_panel.dart
+++ b/lib/pages/dynamics/widgets/content_panel.dart
@@ -66,6 +66,7 @@ Widget content(bool isSave, BuildContext context, item, source, callback) {
item.modules.moduleDynamic.major.opus.pics.isNotEmpty)
Text.rich(
picsNodes(),
+ // semanticsLabel: '动态图片',
),
],
),
diff --git a/lib/pages/dynamics/widgets/dynamic_panel.dart b/lib/pages/dynamics/widgets/dynamic_panel.dart
index e1579c088..901bd428f 100644
--- a/lib/pages/dynamics/widgets/dynamic_panel.dart
+++ b/lib/pages/dynamics/widgets/dynamic_panel.dart
@@ -29,6 +29,9 @@ class DynamicPanel extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
+ // padding: source == 'detail'
+ // ? const EdgeInsets.only(bottom: 12)
+ // : EdgeInsets.zero,
decoration: isSave ||
(source == 'detail' &&
Get.context!.orientation == Orientation.landscape)
@@ -43,7 +46,11 @@ class DynamicPanel extends StatelessWidget {
),
child: Material(
elevation: 0,
+ // clipBehavior: Clip.hardEdge,
color: Colors.transparent,
+ // shape: RoundedRectangleBorder(
+ // borderRadius: BorderRadius.circular(5),
+ // ),
child: InkWell(
onTap: source == 'detail' &&
[
diff --git a/lib/pages/dynamics/widgets/forward_panel.dart b/lib/pages/dynamics/widgets/forward_panel.dart
index 89ad61651..6756f88ae 100644
--- a/lib/pages/dynamics/widgets/forward_panel.dart
+++ b/lib/pages/dynamics/widgets/forward_panel.dart
@@ -106,6 +106,22 @@ Widget forWard(bool isSave, item, BuildContext context, source, callback,
],
),
const SizedBox(height: 2),
+
+ /// fix #话题跟content重复
+ // if (item.modules.moduleDynamic.topic != null) ...[
+ // Padding(
+ // padding: floor == 2
+ // ? EdgeInsets.zero
+ // : const EdgeInsets.only(left: 12, right: 12),
+ // child: GestureDetector(
+ // child: Text(
+ // '#${item.modules.moduleDynamic.topic.name}',
+ // style: authorStyle,
+ // ),
+ // ),
+ // ),
+ // ],
+
if (richNodes != null)
Text.rich(
richNodes,
@@ -124,7 +140,10 @@ Widget forWard(bool isSave, item, BuildContext context, source, callback,
if (hasPics) ...[
Text.rich(
picsNodes(item.modules.moduleDynamic.major.opus.pics, callback),
+ // semanticsLabel: '动态图片',
),
+ // if (item.modules.moduleDynamic.additional != null)
+ // const SizedBox(height: 4),
],
const SizedBox(height: 4),
],
@@ -187,6 +206,11 @@ Widget forWard(bool isSave, item, BuildContext context, source, callback,
: const SizedBox.shrink(),
_ => const SizedBox.shrink(),
};
+ // return Container(
+ // padding:
+ // const EdgeInsets.only(left: 10, top: 12, right: 10, bottom: 10),
+ // color: Theme.of(context).dividerColor.withOpacity(0.08),
+ // child: articlePanel(item, context, floor: floor));
// 转发
case 'DYNAMIC_TYPE_FORWARD':
return InkWell(
diff --git a/lib/pages/dynamics/widgets/rich_node_panel.dart b/lib/pages/dynamics/widgets/rich_node_panel.dart
index 607ff74fe..ef6acd2c8 100644
--- a/lib/pages/dynamics/widgets/rich_node_panel.dart
+++ b/lib/pages/dynamics/widgets/rich_node_panel.dart
@@ -40,6 +40,9 @@ InlineSpan? richNode(item, BuildContext context) {
return null;
} else {
for (var i in richTextNodes) {
+ /// fix 渲染专栏时内容会重复
+ // if (item.modules.moduleDynamic.major.opus.title == null &&
+ // i.type == 'RICH_TEXT_NODE_TYPE_TEXT') {
if (i.type == 'RICH_TEXT_NODE_TYPE_TEXT') {
spanChildren.add(
TextSpan(text: i.origText, style: const TextStyle(height: 1.65)));
@@ -286,7 +289,121 @@ InlineSpan? richNode(item, BuildContext context) {
}
}
- return TextSpan(children: spanChildren);
+ // if (contentType == 'major' &&
+ // item.modules.moduleDynamic.major.opus.pics.isNotEmpty) {
+ // // 图片可能跟其他widget重复渲染
+ // List pics = item.modules.moduleDynamic.major.opus.pics;
+ // int len = pics.length;
+ // List picList = [];
+
+ // if (len == 1) {
+ // OpusPicsModel pictureItem = pics.first;
+ // picList.add(pictureItem.url!);
+ // spanChildren.add(const TextSpan(text: '\n'));
+ // spanChildren.add(
+ // WidgetSpan(
+ // child: LayoutBuilder(
+ // builder: (context, BoxConstraints box) {
+ // return GestureDetector(
+ // onTap: () {
+ // showDialog(
+ // useSafeArea: false,
+ // context: context,
+ // builder: (context) {
+ // return ImagePreview(initialPage: 0, imgList: picList);
+ // },
+ // );
+ // },
+ // child: Padding(
+ // padding: const EdgeInsets.only(top: 4),
+ // child: NetworkImgLayer(
+ // src: pictureItem.url,
+ // width: box.maxWidth / 2,
+ // height: box.maxWidth *
+ // 0.5 *
+ // (pictureItem.height != null &&
+ // pictureItem.width != null
+ // ? pictureItem.height! / pictureItem.width!
+ // : 1),
+ // ),
+ // ),
+ // );
+ // },
+ // ),
+ // ),
+ // );
+ // }
+ // if (len > 1) {
+ // List list = [];
+ // for (var i = 0; i < len; i++) {
+ // picList.add(pics[i].url!);
+ // list.add(
+ // LayoutBuilder(
+ // builder: (context, BoxConstraints box) {
+ // return GestureDetector(
+ // onTap: () {
+ // showDialog(
+ // useSafeArea: false,
+ // context: context,
+ // builder: (context) {
+ // return ImagePreview(initialPage: i, imgList: picList);
+ // },
+ // );
+ // },
+ // child: NetworkImgLayer(
+ // src: pics[i].url,
+ // width: box.maxWidth,
+ // height: box.maxWidth,
+ // ),
+ // );
+ // },
+ // ),
+ // );
+ // }
+ // spanChildren.add(
+ // WidgetSpan(
+ // child: LayoutBuilder(
+ // builder: (context, BoxConstraints box) {
+ // double maxWidth = box.maxWidth;
+ // double crossCount = len < 3 ? 2 : 3;
+ // double height = maxWidth /
+ // crossCount *
+ // (len % crossCount == 0
+ // ? len ~/ crossCount
+ // : len ~/ crossCount + 1) +
+ // 6;
+ // return Container(
+ // padding: const EdgeInsets.only(top: 6),
+ // height: height,
+ // child: GridView.count(
+ // padding: EdgeInsets.zero,
+ // physics: const NeverScrollableScrollPhysics(),
+ // crossAxisCount: crossCount.toInt(),
+ // mainAxisSpacing: 4.0,
+ // crossAxisSpacing: 4.0,
+ // childAspectRatio: 1,
+ // children: list,
+ // ),
+ // );
+ // },
+ // ),
+ // ),
+ // );
+ // }
+ // spanChildren.add(
+ // WidgetSpan(
+ // child: NetworkImgLayer(
+ // src: pics.first.url,
+ // type: 'emote',
+ // width: 100,
+ // height: 200,
+ // ),
+ // ),
+ // );
+ // }
+ return TextSpan(
+ children: spanChildren,
+ );
}
} catch (err) {
debugPrint('❌rich_node_panel err: $err');
diff --git a/lib/pages/dynamics/widgets/up_panel.dart b/lib/pages/dynamics/widgets/up_panel.dart
index 41b11396c..0d376f2dc 100644
--- a/lib/pages/dynamics/widgets/up_panel.dart
+++ b/lib/pages/dynamics/widgets/up_panel.dart
@@ -109,14 +109,36 @@ class _UpPanelState extends State {
feedBack();
if (data.type == 'up') {
widget.dynamicsController.currentMid = data.mid;
+ // dynamicsController.mid.value = data.mid;
widget.dynamicsController
..upInfo.value = data
..onSelectUp(data.mid);
-
+ // int liveLen = liveList.length;
+ // int upLen = upList.length;
+ // double itemWidth = contentWidth + itemPadding.horizontal;
+ // double screenWidth = MediaQuery.sizeOf(context).width;
+ // double moveDistance = 0.0;
+ // if (itemWidth * (upList.length + liveList.length) <= screenWidth) {
+ // } else if ((upLen - i - 0.5) * itemWidth > screenWidth / 2) {
+ // moveDistance =
+ // (i + liveLen + 0.5) * itemWidth + 46 - screenWidth / 2;
+ // } else {
+ // moveDistance = (upLen + liveLen) * itemWidth + 46 - screenWidth;
+ // }
data.hasUpdate = false;
-
+ // scrollController.animateTo(
+ // moveDistance,
+ // duration: const Duration(milliseconds: 500),
+ // curve: Curves.easeInOut,
+ // );
setState(() {});
} else if (data.type == 'live') {
+ // LiveItemModel liveItem = LiveItemModel.fromJson({
+ // 'title': data.title,
+ // 'uname': data.uname,
+ // 'face': data.face,
+ // 'roomid': data.roomId,
+ // });
Get.toNamed('/liveRoom?roomid=${data.roomId}');
}
},
@@ -202,6 +224,29 @@ class _UpPanelState extends State {
}
}
+// class _SliverHeaderDelegate extends SliverPersistentHeaderDelegate {
+// _SliverHeaderDelegate({required this.height, required this.child});
+
+// final double height;
+// final Widget child;
+
+// @override
+// Widget build(
+// BuildContext context, double shrinkOffset, bool overlapsContent) {
+// return child;
+// }
+
+// @override
+// double get maxExtent => height;
+
+// @override
+// double get minExtent => height;
+
+// @override
+// bool shouldRebuild(covariant SliverPersistentHeaderDelegate oldDelegate) =>
+// true;
+// }
+
class UpPanelSkeleton extends StatelessWidget {
const UpPanelSkeleton({super.key});
diff --git a/lib/pages/dynamics/widgets/video_panel.dart b/lib/pages/dynamics/widgets/video_panel.dart
index 56bbb040c..a68ccd963 100644
--- a/lib/pages/dynamics/widgets/video_panel.dart
+++ b/lib/pages/dynamics/widgets/video_panel.dart
@@ -55,12 +55,16 @@ Widget videoSeasonWidget(source, item, context, type, {floor = 1}) {
double width = box.maxWidth;
return Stack(
children: [
+ // Hero(
+ // tag: content.bvid,
+ // child:
NetworkImgLayer(
width: width,
height: width / StyleString.aspectRatio,
src: content.cover,
semanticsLabel: content.title,
),
+ // ),
if (content?.badge?['text'] != null)
PBadge(
text: content.badge['text'],
@@ -157,6 +161,22 @@ Widget videoSeasonWidget(source, item, context, type, {floor = 1}) {
),
const SizedBox(height: 6),
],
+ // const SizedBox(height: 4),
+ /// fix #话题跟content重复
+ // if (item.modules.moduleDynamic.topic != null) ...[
+ // Padding(
+ // padding: floor == 2
+ // ? EdgeInsets.zero
+ // : const EdgeInsets.only(left: 12, right: 12),
+ // child: GestureDetector(
+ // child: Text(
+ // '#${item.modules.moduleDynamic.topic.name}',
+ // style: authorStyle,
+ // ),
+ // ),
+ // ),
+ // const SizedBox(height: 6),
+ // ],
if (floor == 2 && item.modules.moduleDynamic.desc != null) ...[
if (richNodes != null) Text.rich(richNodes),
const SizedBox(height: 6),
diff --git a/lib/pages/fav/video/fav_folder_sort_page.dart b/lib/pages/fav/video/fav_folder_sort_page.dart
index 26e88d93f..1a996d7d5 100644
--- a/lib/pages/fav/video/fav_folder_sort_page.dart
+++ b/lib/pages/fav/video/fav_folder_sort_page.dart
@@ -121,18 +121,15 @@ class _FavFolderSortPageState extends State {
(index) {
final item = sortList[index];
final key = item.id.toString();
- return SizedBox(
+ return FavItem(
key: Key(key),
- height: 98,
- child: FavItem(
- heroTag: key,
- favFolderItem: item,
- onLongPress: index == 0
- ? () {
- SmartDialog.showToast('默认收藏夹不支持排序');
- }
- : null,
- ),
+ heroTag: key,
+ favFolderItem: item,
+ onLongPress: index == 0
+ ? () {
+ SmartDialog.showToast('默认收藏夹不支持排序');
+ }
+ : null,
);
},
),
diff --git a/lib/pages/fav_detail/controller.dart b/lib/pages/fav_detail/controller.dart
index 33668b1d5..3447468f4 100644
--- a/lib/pages/fav_detail/controller.dart
+++ b/lib/pages/fav_detail/controller.dart
@@ -24,6 +24,7 @@ class FavDetailController
@override
void onInit() {
+ // item = Get.arguments;
if (Get.parameters.keys.isNotEmpty) {
mediaId = int.parse(Get.parameters['mediaId']!);
heroTag = Get.parameters['heroTag']!;
diff --git a/lib/pages/fav_detail/fav_sort_page.dart b/lib/pages/fav_detail/fav_sort_page.dart
index feaa9e6cd..7d728efd5 100644
--- a/lib/pages/fav_detail/fav_sort_page.dart
+++ b/lib/pages/fav_detail/fav_sort_page.dart
@@ -1,3 +1,4 @@
+import 'package:PiliPlus/build_config.dart';
import 'package:PiliPlus/http/loading_state.dart';
import 'package:PiliPlus/http/user.dart';
import 'package:PiliPlus/models/user/fav_detail.dart';
@@ -125,13 +126,20 @@ class _FavSortPageState extends State {
),
children: sortList
.map(
- (item) => SizedBox(
+ (item) => Stack(
key: Key(item.id.toString()),
- height: 98,
- child: FavVideoCardH(
- isSort: true,
- videoItem: item,
- ),
+ children: [
+ FavVideoCardH(
+ isSort: true,
+ videoItem: item,
+ ),
+ if (BuildConfig.isDebug)
+ Positioned(
+ top: 35,
+ right: 10,
+ child: Text(item.id.toString()),
+ )
+ ],
),
)
.toList(),
diff --git a/lib/pages/hot/controller.dart b/lib/pages/hot/controller.dart
index 4b5c62a9d..f054616da 100644
--- a/lib/pages/hot/controller.dart
+++ b/lib/pages/hot/controller.dart
@@ -7,6 +7,8 @@ import 'package:get/get.dart';
class HotController
extends CommonListController, HotVideoItemModel> {
+ // int idx = 0;
+
late RxBool showHotRcmd = GStorage.showHotRcmd.obs;
@override
@@ -15,10 +17,24 @@ class HotController
queryData();
}
+ // @override
+ // Future onRefresh() {
+ // idx = 0;
+ // return super.onRefresh();
+ // }
+
@override
Future>> customGetData() =>
VideoHttp.hotVideoList(
pn: currentPage,
ps: 20,
);
+
+ // @override
+ // void handleSuccess(List currentList, List dataList) {
+ // idx = (dataList.last as Card?)?.smallCoverV5.base.idx.toInt() ?? 0;
+ // }
+
+ // @override
+ // Future customGetData() => VideoHttp.hotVideoListGrpc(idx: idx);
}
diff --git a/lib/pages/html/view.dart b/lib/pages/html/view.dart
index 26776a66f..0baf5234c 100644
--- a/lib/pages/html/view.dart
+++ b/lib/pages/html/view.dart
@@ -127,6 +127,16 @@ class _HtmlRenderPageState extends State
}
void listener() {
+ // 标题
+ // if (scrollController.offset > 55 && !_visibleTitle) {
+ // _visibleTitle = true;
+ // titleStreamC.add(true);
+ // } else if (scrollController.offset <= 55 && _visibleTitle) {
+ // _visibleTitle = false;
+ // titleStreamC.add(false);
+ // }
+
+ // fab按钮
final ScrollDirection direction1 =
_htmlRenderCtr.scrollController.positions.first.userScrollDirection;
late final ScrollDirection direction2 =
diff --git a/lib/pages/live_room/send_dm_panel.dart b/lib/pages/live_room/send_dm_panel.dart
index e324bf705..137dacd8d 100644
--- a/lib/pages/live_room/send_dm_panel.dart
+++ b/lib/pages/live_room/send_dm_panel.dart
@@ -230,6 +230,13 @@ class _ReplyPageState extends CommonPublishPageState {
Get.back();
liveRoomController.savedDanmaku = null;
SmartDialog.showToast('发送成功');
+ // liveRoomController.plPlayerController.danmakuController?.addDanmaku(
+ // DanmakuContentItem(
+ // emoticonUnique ?? message,
+ // type: DanmakuItemType.scroll,
+ // selfSend: true,
+ // ),
+ // );
} else {
SmartDialog.showToast(res['msg']);
}
diff --git a/lib/pages/live_room/view.dart b/lib/pages/live_room/view.dart
index f1a2ff05a..70c8e8b33 100644
--- a/lib/pages/live_room/view.dart
+++ b/lib/pages/live_room/view.dart
@@ -126,6 +126,7 @@ class _LiveRoomPageState extends State
ScreenBrightness().resetApplicationScreenBrightness();
PlPlayerController.setPlayCallBack(null);
_liveRoomController.msgStream?.close();
+ // floating?.dispose();
plPlayerController.removeStatusLister(playerListener);
plPlayerController.dispose();
super.dispose();
@@ -422,14 +423,17 @@ class _LiveRoomPageState extends State
),
),
),
+ //刷新
IconButton(
tooltip: '刷新',
onPressed: () {
_futureBuilderFuture =
_liveRoomController.queryLiveInfo();
+ // videoSourceInit();
},
icon: const Icon(Icons.refresh),
),
+ //内置浏览器打开
IconButton(
tooltip: '浏览器打开',
onPressed: () {
diff --git a/lib/pages/live_room/widgets/bottom_control.dart b/lib/pages/live_room/widgets/bottom_control.dart
index 5f57920ec..0c6626b24 100644
--- a/lib/pages/live_room/widgets/bottom_control.dart
+++ b/lib/pages/live_room/widgets/bottom_control.dart
@@ -46,7 +46,38 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget {
),
onTap: onRefresh,
),
+ // // ComBtn(
+ // icon: const Icon(
+ // Icons.subtitles_outlined,
+ // size: 18,
+ // color: Colors.white,
+ // ),
+ // fuc: () => Get.back(),
+ // ),
const Spacer(),
+ // ComBtn(
+ // icon: const Icon(
+ // Icons.hd_outlined,
+ // size: 18,
+ // color: Colors.white,
+ // ),
+ // fuc: () => {},
+ // ),
+ // const SizedBox(width: 4),
+ // Obx(
+ // () => ComBtn(
+ // icon: Icon(
+ // widget.liveRoomCtr!.volumeOff.value
+ // ? Icons.volume_off_outlined
+ // : Icons.volume_up_outlined,
+ // size: 18,
+ // color: Colors.white,
+ // ),
+ // fuc: () => {},
+ // ),
+ // ),
+ // const SizedBox(width: 4),
+
Obx(
() => IconButton(
onPressed: () {
@@ -144,3 +175,21 @@ class BottomControl extends StatelessWidget implements PreferredSizeWidget {
);
}
}
+
+// class MSliderTrackShape extends RoundedRectSliderTrackShape {
+// @override
+// Rect getPreferredRect({
+// required RenderBox parentBox,
+// Offset offset = Offset.zero,
+// SliderThemeData? sliderTheme,
+// bool isEnabled = false,
+// bool isDiscrete = false,
+// }) {
+// const double trackHeight = 3;
+// final double trackLeft = offset.dx;
+// final double trackTop =
+// offset.dy + (parentBox.size.height - trackHeight) / 2 + 4;
+// final double trackWidth = parentBox.size.width;
+// return Rect.fromLTWH(trackLeft, trackTop, trackWidth, trackHeight);
+// }
+// }
diff --git a/lib/pages/live_room/widgets/chat.dart b/lib/pages/live_room/widgets/chat.dart
index d31315778..9c426e43c 100644
--- a/lib/pages/live_room/widgets/chat.dart
+++ b/lib/pages/live_room/widgets/chat.dart
@@ -65,6 +65,7 @@ class LiveRoomChat extends StatelessWidget {
);
} catch (err) {
debugPrint(err.toString());
+ // SmartDialog.showToast(err.toString());
}
},
),
diff --git a/lib/pages/login/controller.dart b/lib/pages/login/controller.dart
index 68f207c92..e86265a48 100644
--- a/lib/pages/login/controller.dart
+++ b/lib/pages/login/controller.dart
@@ -628,9 +628,11 @@ class LoginPageController extends GetxController
break;
default:
SmartDialog.showToast(res['msg']);
+ // login failed
break;
}
}
+ // });
}
bool isGeeArgumentValid(String? geeGt, String? geeChallenge) {
@@ -642,7 +644,11 @@ class LoginPageController extends GetxController
Future setAccount(Map tokenInfo, List cookieInfo) async {
final account = LoginAccount(BiliCookieJar.fromList(cookieInfo),
tokenInfo['access_token'], tokenInfo['refresh_token']);
- await Future.wait([account.onChange(), AnonymousAccount().delete()]);
+ await Future.wait([
+ account.onChange(),
+ AnonymousAccount().delete()
+ // .then((_) => Request.buvidActive(AnonymousAccount()))
+ ]);
Accounts.accountMode.updateAll((_, a) => a == account ? account : a);
if (Accounts.main.isLogin) {
SmartDialog.showToast('登录成功');
diff --git a/lib/pages/login/view.dart b/lib/pages/login/view.dart
index 2659914d3..6819c5771 100644
--- a/lib/pages/login/view.dart
+++ b/lib/pages/login/view.dart
@@ -22,6 +22,7 @@ class LoginPage extends StatefulWidget {
class _LoginPageState extends State {
final LoginPageController _loginPageCtr = Get.put(LoginPageController());
+ // late Future