Ver código fonte

Merge pull request #857 from ente-io/sharing_from_other_app_bug

Neeraj Gupta 2 anos atrás
pai
commit
3be8237f21
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3 1
      lib/ui/home_widget.dart

+ 3 - 1
lib/ui/home_widget.dart

@@ -176,7 +176,7 @@ class _HomeWidgetState extends State<HomeWidget> {
         });
         });
       }
       }
     });
     });
-    // For sharing images coming from outside the app while the app is in the memory
+    // For sharing images coming from outside the app
     _initMediaShareSubscription();
     _initMediaShareSubscription();
     WidgetsBinding.instance.addPostFrameCallback(
     WidgetsBinding.instance.addPostFrameCallback(
       (_) => Future.delayed(
       (_) => Future.delayed(
@@ -237,6 +237,7 @@ class _HomeWidgetState extends State<HomeWidget> {
   }
   }
 
 
   void _initMediaShareSubscription() {
   void _initMediaShareSubscription() {
+    // For sharing images coming from outside the app while the app is in the memory
     _intentDataStreamSubscription =
     _intentDataStreamSubscription =
         ReceiveSharingIntent.getMediaStream().listen(
         ReceiveSharingIntent.getMediaStream().listen(
       (List<SharedMediaFile> value) {
       (List<SharedMediaFile> value) {
@@ -253,6 +254,7 @@ class _HomeWidgetState extends State<HomeWidget> {
     ReceiveSharingIntent.getInitialMedia().then((List<SharedMediaFile> value) {
     ReceiveSharingIntent.getInitialMedia().then((List<SharedMediaFile> value) {
       setState(() {
       setState(() {
         _sharedFiles = value;
         _sharedFiles = value;
+        _shouldRenderCreateCollectionSheet = true;
       });
       });
     });
     });
   }
   }