summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-06-11 12:39:28 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-06-11 12:39:28 +0300
commit31f7eafd9c6897cdf0ee7d6eeaade9dcc65cb006 (patch)
tree415707ca26c04ff1bee461c685e79c4302546cd4 /src/app.c
parent703d2b41fa299a9f8e24a5f6064c3624c3dedbbb (diff)
iOS: Opening a file via document picker
Use a native file picker to open files. Declare support for .gmi/.gemini files so they can be opened via Files and share sheets.
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/app.c b/src/app.c
index 88d912ab..73908a09 100644
--- a/src/app.c
+++ b/src/app.c
@@ -2303,6 +2303,19 @@ iBool handleCommand_App(const char *cmd) {
2303 } 2303 }
2304 setCurrent_Root(oldRoot); 2304 setCurrent_Root(oldRoot);
2305 } 2305 }
2306 else if (equal_Command(cmd, "file.open")) {
2307 const char *path = suffixPtr_Command(cmd, "path");
2308 if (path) {
2309 postCommandf_App("open temp:%d url:%s",
2310 argLabel_Command(cmd, "temp"),
2311 makeFileUrl_CStr(path));
2312 return iTrue;
2313 }
2314#if defined (iPlatformAppleMobile)
2315 pickFileForOpening_iOS();
2316#endif
2317 return iTrue;
2318 }
2306 else if (equal_Command(cmd, "file.delete")) { 2319 else if (equal_Command(cmd, "file.delete")) {
2307 const char *path = suffixPtr_Command(cmd, "path"); 2320 const char *path = suffixPtr_Command(cmd, "path");
2308 if (argLabel_Command(cmd, "confirm")) { 2321 if (argLabel_Command(cmd, "confirm")) {