Merge branch 'fix'

This commit is contained in:
guozhigq
2024-09-30 13:35:34 +08:00
7 changed files with 39 additions and 25 deletions

View File

@ -39,11 +39,11 @@ class ModelResult {
ModelResult.fromJson(Map<String, dynamic> json) {
resultType = json['result_type'];
summary = json['summary'];
outline = json['result_type'] == 2
? json['outline']
outline = json['result_type'] == 0
? <OutlineItem>[]
: json['outline']
.map<OutlineItem>((e) => OutlineItem.fromJson(e))
.toList()
: <OutlineItem>[];
.toList();
}
}

View File

@ -61,7 +61,7 @@ class _BlackListPageState extends State<BlackListPage> {
centerTitle: false,
title: Obx(
() => Text(
'黑名单管理 - ${_blackListController.total.value}',
'黑名单管理 ${_blackListController.total.value == 0 ? '' : '- ${_blackListController.total.value}'}',
style: Theme.of(context).textTheme.titleMedium,
),
),
@ -76,8 +76,12 @@ class _BlackListPageState extends State<BlackListPage> {
if (data['status']) {
List<BlackListItem> list = _blackListController.blackList;
return Obx(
() => list.length == 1
? const SizedBox()
() => list.isEmpty
? CustomScrollView(
slivers: [
HttpError(errMsg: '你没有拉黑任何人哦_', fn: () => {})
],
)
: ListView.builder(
controller: scrollController,
itemCount: list.length,

View File

@ -49,7 +49,6 @@ class FansController extends GetxController {
} else if (type == 'onLoad') {
fansList.addAll(res['data'].list);
}
print(total);
if ((pn == 1 && total < ps) || res['data'].list.isEmpty) {
loadingText.value = '没有更多了';
}

View File

@ -103,9 +103,17 @@ class _FansPageState extends State<FansPage> {
),
);
} else {
return HttpError(
errMsg: data['msg'],
fn: () => _fansController.queryFans('init'),
return CustomScrollView(
physics: const NeverScrollableScrollPhysics(),
slivers: [
HttpError(
errMsg: data['msg'],
fn: () {
_futureBuilderFuture =
_fansController.queryFans('init');
},
)
],
);
}
} else {

View File

@ -115,7 +115,7 @@ class VideoDetailController extends GetxController
].obs;
RxDouble sheetHeight = 0.0.obs;
RxString archiveSourceType = 'dash'.obs;
ScrollController? replyScrillController;
ScrollController? replyScrollController;
List<MediaVideoItemModel> mediaList = <MediaVideoItemModel>[];
RxBool isWatchLaterVisible = false.obs;
RxString watchLaterTitle = ''.obs;
@ -574,12 +574,12 @@ class VideoDetailController extends GetxController
}
void onControllerCreated(ScrollController controller) {
replyScrillController = controller;
replyScrollController = controller;
}
void onTapTabbar(int index) {
if (index == 1 && tabCtr.index == 1) {
replyScrillController?.animateTo(0,
if (tabCtr.animation!.isCompleted && index == 1 && tabCtr.index == 1) {
replyScrollController?.animateTo(0,
duration: const Duration(milliseconds: 300), curve: Curves.ease);
}
}

View File

@ -541,7 +541,7 @@ class VideoIntroController extends GetxController {
// ai总结
Future aiConclusion() async {
SmartDialog.showLoading(msg: '正在生ai总结');
SmartDialog.showLoading(msg: '正在生ai总结');
final res = await VideoHttp.aiConclusion(
bvid: bvid,
cid: lastPlayCid.value,
@ -551,7 +551,7 @@ class VideoIntroController extends GetxController {
if (res['status']) {
modelResult = res['data'].modelResult;
} else {
SmartDialog.showToast("当前视频可能暂不支持AI视频总结");
SmartDialog.showToast("当前视频暂不支持AI视频总结");
}
return res;
}

View File

@ -49,15 +49,18 @@ class AiDetail extends StatelessWidget {
child: SingleChildScrollView(
child: Column(
children: [
SelectableText(
modelResult!.summary!,
style: const TextStyle(
fontSize: 15,
fontWeight: FontWeight.bold,
height: 1.5,
if (modelResult!.resultType != 0 &&
modelResult!.summary != '') ...[
SelectableText(
modelResult!.summary!,
style: const TextStyle(
fontSize: 15,
fontWeight: FontWeight.bold,
height: 1.5,
),
),
),
const SizedBox(height: 20),
const SizedBox(height: 20),
],
ListView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),