mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 16:48:16 +08:00
show history pause tip
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -67,9 +67,7 @@ class _HistoryPageState extends State<HistoryPage>
|
||||
}
|
||||
},
|
||||
child: Scaffold(
|
||||
appBar: widget.type != null
|
||||
? null
|
||||
: AppBarWidget(
|
||||
appBar: AppBarWidget(
|
||||
visible: enableMultiSelect,
|
||||
child1: AppBar(
|
||||
title: const Text('观看记录'),
|
||||
@@ -92,21 +90,20 @@ class _HistoryPageState extends State<HistoryPage>
|
||||
_historyController.baseCtr.onClearHistory(
|
||||
context,
|
||||
() {
|
||||
_historyController
|
||||
.loadingState
|
||||
.value = const Success(
|
||||
_historyController.loadingState.value =
|
||||
const Success(
|
||||
null,
|
||||
);
|
||||
if (_historyController
|
||||
.tabController !=
|
||||
if (_historyController.tabController !=
|
||||
null) {
|
||||
for (final item
|
||||
in _historyController.tabs) {
|
||||
try {
|
||||
Get.find<HistoryController>(
|
||||
tag: item.type,
|
||||
).loadingState.value =
|
||||
const Success(null);
|
||||
).loadingState.value = const Success(
|
||||
null,
|
||||
);
|
||||
} catch (_) {}
|
||||
}
|
||||
}
|
||||
@@ -300,8 +297,22 @@ class _HistoryPageState extends State<HistoryPage>
|
||||
childCount: response!.length,
|
||||
),
|
||||
)
|
||||
: HttpError(
|
||||
onReload: _historyController.onReload,
|
||||
: Builder(
|
||||
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(
|
||||
errMsg: errMsg,
|
||||
|
||||
Reference in New Issue
Block a user