From 0593bbdf2286e88222316bfd0b5f6b348c60ea73 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaakko=20Ker=C3=A4nen?= jaakko.keranen@iki.fi
Date: Thu, 20 Jan 2022 15:15:08 +0200
Subject: [PATCH 1/1] Android: External downloads; Back button handling; bumped
version
CMakeLists.txt | 4 ++--
res/about/android-version.gmi | 5 +++++
src/app.c | 14 +++++++++++++-
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4b1dfef1..0a654d7b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,8 +30,8 @@ if (IOS)
endif ()
if (ANDROID)
set (PROJECT_VERSION 1.10)
endif ()
diff --git a/res/about/android-version.gmi b/res/about/android-version.gmi
index fc7b444b..c36d5be4 100644
--- a/res/about/android-version.gmi
+++ b/res/about/android-version.gmi
@@ -6,6 +6,11 @@
+## 1.10 (Alpha 4)
+* Save downloads to the external storage so they're accessible from a file manager.
+* Handle Gemini, Gopher and Finger URIs opened from other apps.
+* Back button dismisses UI panels/dialogs when appropriate instead of navigating back.
diff --git a/src/app.c b/src/app.c
index 6392e7fa..a137dc23 100644
--- a/src/app.c
+++ b/src/app.c
@@ -333,7 +333,9 @@ static const char *dataDir_App_(void) {
static const char *downloadDir_App_(void) {
#if defined (iPlatformAndroidMobile)
#endif
#if defined (iPlatformLinux) || defined (iPlatformOther)
/* Parse user-dirs.dirs using the `xdg-user-dir` tool. */
@@ -1391,6 +1393,16 @@ void processEvents_App(enum iAppEventMode eventMode) {
ev.key.keysym.mod = mapMods_Keys(ev.key.keysym.mod & ~KMOD_CAPS);
}
#if defined (iPlatformAndroidMobile)
/* Use the system Back button to close panels, if they're open. */
if (ev.type == SDL_KEYDOWN && ev.key.keysym.sym == SDLK_AC_BACK) {
SDL_UserEvent panelBackCmd = { .type = SDL_USEREVENT,
.code = command_UserEventCode,
.data1 = iDupStr("panel.close"),
.data2 = d->window->base.keyRoot };
if (dispatchEvent_Window(&d->window->base, (SDL_Event *) &panelBackCmd)) {
continue; /* Was handled by someone. */
}
}
/* Ignore all mouse events; just use touch. */
if (ev.type == SDL_MOUSEBUTTONDOWN ||
ev.type == SDL_MOUSEBUTTONUP ||
--
2.25.1
text/plain
This content has been proxied by September (ba2dc).