浏览代码

Fix insert image file picker only opens once

When no image is selected from the intent we should set onReceiveValue to null and uploadMessage to null otherwise it does not open after closing it without selecting an image.
merttumer 4 年之前
父节点
当前提交
e37635e602
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/main/java/com/owncloud/android/ui/activity/RichDocumentsEditorWebView.java

+ 4 - 1
src/main/java/com/owncloud/android/ui/activity/RichDocumentsEditorWebView.java

@@ -144,7 +144,10 @@ public class RichDocumentsEditorWebView extends EditorWebView {
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
         if (RESULT_OK != resultCode) {
-            // TODO
+            if (requestCode == REQUEST_LOCAL_FILE) {
+                this.uploadMessage.onReceiveValue(null);
+                this.uploadMessage = null;
+            }
             return;
         }