diff --git a/lib/pages/home_page/home_page.dart b/lib/pages/home_page/home_page.dart index 4b4a3f3..c2290bf 100644 --- a/lib/pages/home_page/home_page.dart +++ b/lib/pages/home_page/home_page.dart @@ -357,16 +357,14 @@ class _HomePageState extends LifeState with WidgetsBindingObserver, Ti /// Future _showPolicy() async { // 通知弹窗 - String isShowNotiPermission = await SharedPreferencesUtil.getStringValue(Constants.isShowNotiPermission); - if (isShowNotiPermission == null || isShowNotiPermission != '1') { + + if (!await Permission.notification.isGranted) { await NotificationSettingDialog.show(context); - await SharedPreferencesUtil.setStringValue(Constants.isShowNotiPermission, "1"); } // 活动弹窗 await AdvertisingDialog.show(context); - if (!await Permission.storage.isGranted) { var result = await showDialog( context: context, @@ -387,7 +385,6 @@ class _HomePageState extends LifeState with WidgetsBindingObserver, Ti await AppUpdateUtil.initXUpdate(); // 检查app更新 await AppUpdateUtil.updateApp(context); - }); IntellectCreate.checkAndCreateFirst(context);