Skip to content

Commit 0f5361c

Browse files
committed
OpenFileWith: Restore extractFileFromIntent call first, fixes Open With stopped working for most cases, closes #2653, by @gsantner
Was changed in b2f4407 - PR #2521
1 parent f592374 commit 0f5361c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/src/main/java/net/gsantner/markor/util/MarkorContextUtils.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ public static File getIntentFile(final Intent intent, final @Nullable Context co
101101
// By extra path
102102
File file = (File) intent.getSerializableExtra(Document.EXTRA_FILE);
103103

104+
// By stream etc
105+
if (file == null && context != null) {
106+
file = GsContextUtils.extractFileFromIntent(intent, context);
107+
}
108+
104109
// By url in data
105110
if (file == null) {
106111
try {
@@ -109,11 +114,6 @@ public static File getIntentFile(final Intent intent, final @Nullable Context co
109114
}
110115
}
111116

112-
// By stream etc
113-
if (file == null && context != null) {
114-
file = GsContextUtils.extractFileFromIntent(intent, context);
115-
}
116-
117117
return file;
118118
}
119119

0 commit comments

Comments
 (0)