Преглед на файлове

桌面模式不需要应用内通知

Tony преди 1 месец
родител
ревизия
0f4422f456
променени са 1 файла, в които са добавени 6 реда и са изтрити 2 реда
  1. 6 2
      lib/app/modules/home/controllers/home_controller.dart

+ 6 - 2
lib/app/modules/home/controllers/home_controller.dart

@@ -1,5 +1,6 @@
 import 'package:get/get.dart';
 import 'package:nomo/app/controllers/api_controller.dart';
+import 'package:nomo/utils/misc.dart';
 import 'package:pull_to_refresh_flutter3/pull_to_refresh_flutter3.dart';
 import '../../../../utils/system_helper.dart';
 import '../../../controllers/base_core_api.dart';
@@ -76,8 +77,11 @@ class HomeController extends BaseController {
     _initializeLocations();
     getBanner(position: 'nine');
     getBanner(position: 'banner');
-    AwesomeNotificationsHelper.init();
-    AwesomeNotificationsHelper.showPushNoticeDialog();
+    // 桌面模式不需要应用内通知
+    if (!isDesktop) {
+      AwesomeNotificationsHelper.init();
+      AwesomeNotificationsHelper.showPushNoticeDialog();
+    }
     checkUpdate();
   }