Pārlūkot izejas kodu

Shortcircuit call for intent for non-droid devices

Neeraj Gupta 2 gadi atpakaļ
vecāks
revīzija
12c65f3d2e
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  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();