浏览代码

Shortcircuit call for intent for non-droid devices

Neeraj Gupta 2 年之前
父节点
当前提交
12c65f3d2e
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      lib/app.dart

+ 4 - 0
lib/app.dart

@@ -41,6 +41,10 @@ class _EnteAppState extends State<EnteApp> with WidgetsBindingObserver {
   }
 
   Future<bool> initIntentAction() async {
+    if (!Platform.isAndroid) {
+      AppLifecycleService.instance.setIntentAction(IntentAction.main);
+      return true;
+    }
     IntentAction intentAction = IntentAction.main;
     try {
       final actionResult = await _mediaExtensionPlugin.getIntentAction();