From ab08bf40f49e039410291adb2dceb00b95d97394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cyanghuaxuan=E2=80=9D?= <“646903573@qq.com”> Date: Tue, 13 Apr 2021 18:15:58 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/home_page/home_page.dart | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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);