show history pause tip

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-07-31 15:14:31 +08:00
parent c4e87925cf
commit c8613fbe07

View File

@@ -67,9 +67,7 @@ class _HistoryPageState extends State<HistoryPage>
} }
}, },
child: Scaffold( child: Scaffold(
appBar: widget.type != null appBar: AppBarWidget(
? null
: AppBarWidget(
visible: enableMultiSelect, visible: enableMultiSelect,
child1: AppBar( child1: AppBar(
title: const Text('观看记录'), title: const Text('观看记录'),
@@ -92,21 +90,20 @@ class _HistoryPageState extends State<HistoryPage>
_historyController.baseCtr.onClearHistory( _historyController.baseCtr.onClearHistory(
context, context,
() { () {
_historyController _historyController.loadingState.value =
.loadingState const Success(
.value = const Success(
null, null,
); );
if (_historyController if (_historyController.tabController !=
.tabController !=
null) { null) {
for (final item for (final item
in _historyController.tabs) { in _historyController.tabs) {
try { try {
Get.find<HistoryController>( Get.find<HistoryController>(
tag: item.type, tag: item.type,
).loadingState.value = ).loadingState.value = const Success(
const Success(null); null,
);
} catch (_) {} } catch (_) {}
} }
} }
@@ -300,8 +297,22 @@ class _HistoryPageState extends State<HistoryPage>
childCount: response!.length, childCount: response!.length,
), ),
) )
: HttpError( : Builder(
onReload: _historyController.onReload, builder: (context) {
final pauseStatus =
_historyController.baseCtr.pauseStatus.value;
return HttpError(
errMsg: pauseStatus ? '历史记录功能已关闭' : null,
btnText: pauseStatus ? '点击开启' : null,
onReload: () {
if (pauseStatus) {
_historyController.baseCtr.onPauseHistory(context);
} else {
_historyController.onReload();
}
},
);
},
), ),
Error(:var errMsg) => HttpError( Error(:var errMsg) => HttpError(
errMsg: errMsg, errMsg: errMsg,