Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-12-27 20:54:41 +08:00
parent 25acf3a9bb
commit b51c646415
227 changed files with 768 additions and 764 deletions

View File

@@ -34,7 +34,7 @@ class HistoryBaseController extends GetxController {
onPressed: () async {
Get.back();
SmartDialog.showLoading(msg: '请求中');
var res = await UserHttp.clearHistory(account: account);
final res = await UserHttp.clearHistory(account: account);
SmartDialog.dismiss();
if (res.isSuccess) {
SmartDialog.showToast('清空观看历史');
@@ -71,7 +71,7 @@ class HistoryBaseController extends GetxController {
TextButton(
onPressed: () async {
SmartDialog.showLoading(msg: '请求中');
var res = await UserHttp.pauseHistory(
final res = await UserHttp.pauseHistory(
pauseStatus,
account: account,
);

View File

@@ -78,7 +78,7 @@ class HistoryController
// 观看历史暂停状态
Future<void> historyStatus() async {
var res = await UserHttp.historyStatus(account: account);
final res = await UserHttp.historyStatus(account: account);
if (res case Success(:final response)) {
baseCtr.pauseStatus.value = response;
GStorage.localCache.put(LocalCacheKey.historyPause, response);

View File

@@ -217,7 +217,7 @@ class _HistoryPageState extends State<HistoryPage>
Widget _buildBody(LoadingState<List<HistoryItemModel>?> loadingState) {
return switch (loadingState) {
Loading() => gridSkeleton,
Success(:var response) =>
Success(:final response) =>
response != null && response.isNotEmpty
? SliverGrid.builder(
gridDelegate: gridDelegate,
@@ -236,7 +236,7 @@ class _HistoryPageState extends State<HistoryPage>
itemCount: response.length,
)
: HttpError(onReload: _historyController.onReload),
Error(:var errMsg) => HttpError(
Error(:final errMsg) => HttpError(
errMsg: errMsg,
onReload: _historyController.onReload,
),

View File

@@ -220,7 +220,7 @@ class HistoryItem extends StatelessWidget {
business?.contains('article') != true)
PopupMenuItem<String>(
onTap: () async {
var res = await UserHttp.toViewLater(
final res = await UserHttp.toViewLater(
bvid: item.history.bvid,
);
SmartDialog.showToast(res['msg']);