From 00681e95b53f5f6797e582cc270fe10d9e7dc12f Mon Sep 17 00:00:00 2001 From: bggRGjQaUbCoE Date: Tue, 24 Dec 2024 20:35:56 +0800 Subject: [PATCH] fix: defaultRcmdType Signed-off-by: bggRGjQaUbCoE --- lib/pages/about/index.dart | 6 +++--- lib/pages/rcmd/controller.dart | 2 +- lib/utils/utils.dart | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/pages/about/index.dart b/lib/pages/about/index.dart index 963462476..10bbbcc8e 100644 --- a/lib/pages/about/index.dart +++ b/lib/pages/about/index.dart @@ -173,9 +173,7 @@ class _AboutPageState extends State { onTap: () { Get.toNamed('/logs'); }, - onLongPress: () { - clearLogs(); - }, + onLongPress: clearLogs, leading: const Icon(Icons.bug_report_outlined), title: const Text('错误日志'), trailing: Icon(Icons.arrow_forward, size: 16, color: outline), @@ -201,11 +199,13 @@ class _AboutPageState extends State { showDialog( context: context, builder: (context) => SimpleDialog( + title: const Text('导入/导出登录信息'), clipBehavior: Clip.hardEdge, children: [ ListTile( title: const Text('导出'), onTap: () async { + Get.back(); dynamic accessKey = GStorage.localCache .get(LocalCacheKey.accessKey, defaultValue: {}); dynamic cookies = (await CookieManager(PersistCookieJar( diff --git a/lib/pages/rcmd/controller.dart b/lib/pages/rcmd/controller.dart index 6d6a0a59e..973837c73 100644 --- a/lib/pages/rcmd/controller.dart +++ b/lib/pages/rcmd/controller.dart @@ -5,7 +5,7 @@ import 'package:PiliPalaX/utils/storage.dart'; class RcmdController extends PopupController { late bool enableSaveLastData; - late String defaultRcmdType = 'web'; + late String defaultRcmdType = 'app'; @override void onInit() { diff --git a/lib/utils/utils.dart b/lib/utils/utils.dart index 16c1348df..2b661e7a2 100644 --- a/lib/utils/utils.dart +++ b/lib/utils/utils.dart @@ -75,7 +75,7 @@ class Utils { final result = await UserHttp.userInfo(); if (result['status'] && result['data'].isLogin) { SmartDialog.showToast('登录成功,当前采用「' - '${GStorage.setting.get(SettingBoxKey.defaultRcmdType, defaultValue: 'web')}' + '${GStorage.setting.get(SettingBoxKey.defaultRcmdType, defaultValue: 'app')}' '端」推荐'); await GStorage.userInfo.put('userInfoCache', result['data']); try {