From b4857cd1f15f017d84635233dc6afeab97d60d4d Mon Sep 17 00:00:00 2001 From: Harshad Vedartham Date: Tue, 18 Jun 2024 22:44:36 -0700 Subject: [PATCH] Handle virtual folders better --- .../java/net/gsantner/markor/activity/DocumentActivity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/gsantner/markor/activity/DocumentActivity.java b/app/src/main/java/net/gsantner/markor/activity/DocumentActivity.java index f3f8925f0..effe6d782 100644 --- a/app/src/main/java/net/gsantner/markor/activity/DocumentActivity.java +++ b/app/src/main/java/net/gsantner/markor/activity/DocumentActivity.java @@ -32,6 +32,7 @@ import net.gsantner.markor.util.MarkorContextUtils; import net.gsantner.opoc.format.GsTextUtils; import net.gsantner.opoc.frontend.base.GsFragmentBase; +import net.gsantner.opoc.frontend.filebrowser.GsFileBrowserListAdapter; import net.gsantner.opoc.util.GsContextUtils; import net.gsantner.opoc.util.GsFileUtils; import net.gsantner.opoc.wrapper.GsCallback; @@ -57,7 +58,7 @@ public static void launch(final Activity activity, final File path, final Boolea intent.putExtra(Document.EXTRA_FILE, path); } - if (path != null && path.isDirectory()) { + if (path != null && (path.isDirectory() || GsFileBrowserListAdapter.isVirtualFolder(path))) { intent.setClass(activity, MainActivity.class); }