From 8232d88d1e344cc3f23744b881834d2046e95994 Mon Sep 17 00:00:00 2001 From: Alexander Borsuk Date: Wed, 31 May 2023 17:27:09 +0200 Subject: [PATCH 01/10] [ios] Fixed non-working and repeated import of KML/KMZ files Signed-off-by: Alexander Borsuk Signed-off-by: TomABdh --- iphone/CoreApi/CoreApi/DeepLink/DeepLinkParser.mm | 3 ++- iphone/Maps/Classes/MapViewController.mm | 2 +- iphone/Maps/Core/DeepLink/DeepLinkHandler.swift | 6 ++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/iphone/CoreApi/CoreApi/DeepLink/DeepLinkParser.mm b/iphone/CoreApi/CoreApi/DeepLink/DeepLinkParser.mm index efb143a56a..77b84912a0 100644 --- a/iphone/CoreApi/CoreApi/DeepLink/DeepLinkParser.mm +++ b/iphone/CoreApi/CoreApi/DeepLink/DeepLinkParser.mm @@ -24,7 +24,8 @@ } + (void)addBookmarksFile:(NSURL *)url { - GetFramework().AddBookmarksFile(url.relativePath.UTF8String, false /* isTemporaryFile */); + // iOS doesn't create temporary files on import at least in Safari and Files. + GetFramework().AddBookmarksFile(url.path.UTF8String, false /* isTemporaryFile */); } @end diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index bd258b3885..d5e13738f8 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -361,7 +361,7 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing"; // Cold start deep links should be handled when the map is initialized. // Otherwise PP container view is nil, or there is no animation/selection of the point. if (DeepLinkHandler.shared.isLaunchedByDeeplink) - (void)[DeepLinkHandler.shared handleDeepLink]; + (void)[DeepLinkHandler.shared handleDeepLinkAndReset]; } - (void)viewDidLayoutSubviews { diff --git a/iphone/Maps/Core/DeepLink/DeepLinkHandler.swift b/iphone/Maps/Core/DeepLink/DeepLinkHandler.swift index 8b7b2d1a39..f8afa160a0 100644 --- a/iphone/Maps/Core/DeepLink/DeepLinkHandler.swift +++ b/iphone/Maps/Core/DeepLink/DeepLinkHandler.swift @@ -44,9 +44,11 @@ return (url.queryItems?.first(where: { $0.name == "backurl" })?.value ?? nil) } - func handleDeepLink() -> Bool { + func handleDeepLinkAndReset() -> Bool { if let url = self.url { - return handleDeepLink(url: url) + let result = handleDeepLink(url: url) + reset() + return result } LOG(.error, "handleDeepLink is called with nil URL") return false -- 2.45.3 From 22bce5764a574ff08119b98ad23aed713178603d Mon Sep 17 00:00:00 2001 From: Zhu Pengming <89885722+TomABdh@users.noreply.github.com> Date: Fri, 2 Jun 2023 14:58:04 +0800 Subject: [PATCH 02/10] Update DownloaderFragment.java [android] Fixed DownloaderFragment fab transparency #5085 When the user slides to download the archive, the floating button is hidden, and the button is displayed when the user does not slide. Signed-off-by: TomABdh --- .../downloader/DownloaderFragment.java | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/android/src/app/organicmaps/downloader/DownloaderFragment.java b/android/src/app/organicmaps/downloader/DownloaderFragment.java index e8020b8862..b075290f78 100644 --- a/android/src/app/organicmaps/downloader/DownloaderFragment.java +++ b/android/src/app/organicmaps/downloader/DownloaderFragment.java @@ -36,15 +36,33 @@ public class DownloaderFragment extends BaseMwmRecyclerFragment Date: Sat, 3 Jun 2023 12:59:42 +0800 Subject: [PATCH 03/10] Update DownloaderFragment.java [android] Fixed DownloaderFragment fab transparency #5085 Signed-off-by: TomABdh --- .../src/app/organicmaps/downloader/DownloaderFragment.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/android/src/app/organicmaps/downloader/DownloaderFragment.java b/android/src/app/organicmaps/downloader/DownloaderFragment.java index b075290f78..4ce7827233 100644 --- a/android/src/app/organicmaps/downloader/DownloaderFragment.java +++ b/android/src/app/organicmaps/downloader/DownloaderFragment.java @@ -18,6 +18,8 @@ import app.organicmaps.search.SearchEngine; import app.organicmaps.widget.PlaceholderView; import app.organicmaps.util.bottomsheet.MenuBottomSheetFragment; import app.organicmaps.util.bottomsheet.MenuBottomSheetItem; +import com.google.android.material.floatingactionbutton.FloatingActionButton; + import java.util.ArrayList; import java.util.List; @@ -139,6 +141,8 @@ public class DownloaderFragment extends BaseMwmRecyclerFragment Date: Sat, 3 Jun 2023 22:11:21 +0800 Subject: [PATCH 04/10] Update DownloaderFragment.java Show button only on downloaded maps screen not on screen with list of downloadable maps Signed-off-by: TomABdh --- .../downloader/DownloaderFragment.java | 33 ++++++++++++++----- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/android/src/app/organicmaps/downloader/DownloaderFragment.java b/android/src/app/organicmaps/downloader/DownloaderFragment.java index 4ce7827233..294834e111 100644 --- a/android/src/app/organicmaps/downloader/DownloaderFragment.java +++ b/android/src/app/organicmaps/downloader/DownloaderFragment.java @@ -54,17 +54,22 @@ public class DownloaderFragment extends BaseMwmRecyclerFragment 0; + } + private void showFab() { + if (mFab != null && shouldShowFab()) { + mFab.show(); + } + } + + private void hideFab() { if (mFab != null) { mFab.hide(); } } - private void showFab() { - if (mFab != null) { - mFab.show(); - } - } private final NativeMapSearchListener mSearchListener = new NativeMapSearchListener() { @@ -128,6 +133,13 @@ public class DownloaderFragment extends BaseMwmRecyclerFragment Date: Sun, 4 Jun 2023 14:02:46 +0800 Subject: [PATCH 05/10] Update DownloaderFragment.java Show or hide FAB buttons based on search results. Signed-off-by: TomABdh --- .../src/app/organicmaps/downloader/DownloaderFragment.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/android/src/app/organicmaps/downloader/DownloaderFragment.java b/android/src/app/organicmaps/downloader/DownloaderFragment.java index 294834e111..86e9558d23 100644 --- a/android/src/app/organicmaps/downloader/DownloaderFragment.java +++ b/android/src/app/organicmaps/downloader/DownloaderFragment.java @@ -270,12 +270,11 @@ public class DownloaderFragment extends BaseMwmRecyclerFragment Date: Sun, 4 Jun 2023 21:30:05 +0800 Subject: [PATCH 06/10] Update DownloaderFragment.java Signed-off-by: Zhu Pengming Signed-off-by: TomABdh --- android/src/app/organicmaps/downloader/DownloaderFragment.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/src/app/organicmaps/downloader/DownloaderFragment.java b/android/src/app/organicmaps/downloader/DownloaderFragment.java index 86e9558d23..7283932269 100644 --- a/android/src/app/organicmaps/downloader/DownloaderFragment.java +++ b/android/src/app/organicmaps/downloader/DownloaderFragment.java @@ -284,3 +284,4 @@ public class DownloaderFragment extends BaseMwmRecyclerFragment -- 2.45.3 From d4a07dea02973ba6fd3f53c1c17d5c2b8240f129 Mon Sep 17 00:00:00 2001 From: Zhu Pengming <89885722+TomABdh@users.noreply.github.com> Date: Sun, 4 Jun 2023 21:53:20 +0800 Subject: [PATCH 07/10] Update DownloaderFragment.java Signed-off-by: TomABdh --- android/src/app/organicmaps/downloader/DownloaderFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/app/organicmaps/downloader/DownloaderFragment.java b/android/src/app/organicmaps/downloader/DownloaderFragment.java index 7283932269..48a60751c2 100644 --- a/android/src/app/organicmaps/downloader/DownloaderFragment.java +++ b/android/src/app/organicmaps/downloader/DownloaderFragment.java @@ -284,4 +284,4 @@ public class DownloaderFragment extends BaseMwmRecyclerFragment +Signed-off-by: Zhu Pengming -- 2.45.3 From 918b9bfa5d85b340fc7534f004958a152a091865 Mon Sep 17 00:00:00 2001 From: Zhu Pengming <89885722+TomABdh@users.noreply.github.com> Date: Mon, 5 Jun 2023 14:10:52 +0800 Subject: [PATCH 08/10] Update DownloaderFragment.java Signed-off-by: TomABdh --- .../downloader/DownloaderFragment.java | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/android/src/app/organicmaps/downloader/DownloaderFragment.java b/android/src/app/organicmaps/downloader/DownloaderFragment.java index 48a60751c2..4680ba4ea4 100644 --- a/android/src/app/organicmaps/downloader/DownloaderFragment.java +++ b/android/src/app/organicmaps/downloader/DownloaderFragment.java @@ -19,6 +19,7 @@ import app.organicmaps.widget.PlaceholderView; import app.organicmaps.util.bottomsheet.MenuBottomSheetFragment; import app.organicmaps.util.bottomsheet.MenuBottomSheetItem; import com.google.android.material.floatingactionbutton.FloatingActionButton; +import androidx.recyclerview.widget.LinearLayoutManager; import java.util.ArrayList; @@ -40,6 +41,7 @@ public class DownloaderFragment extends BaseMwmRecyclerFragment= totalItemCount; + } + return false; + } private final NativeMapSearchListener mSearchListener = new NativeMapSearchListener() @@ -154,6 +165,18 @@ public class DownloaderFragment extends BaseMwmRecyclerFragment 0) { + // Scrolling up + hideFab(); + } else if (dy < 0) { + // Scrolling down + showFab(); + } + } + }); mSubscriberSlot = MapManager.nativeSubscribe(new MapManager.StorageCallback() { @@ -284,4 +307,3 @@ public class DownloaderFragment extends BaseMwmRecyclerFragment -- 2.45.3 From bab3d14d2c196715d6a123b3a56694a44285d47d Mon Sep 17 00:00:00 2001 From: Tom <89885722+Zhu-Pengming-Tom@users.noreply.github.com> Date: Sun, 18 Jun 2023 12:15:45 +0800 Subject: [PATCH 09/10] Update DownloaderFragment.java Signed-off-by: TomABdh --- .../app/organicmaps/downloader/DownloaderFragment.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/android/src/app/organicmaps/downloader/DownloaderFragment.java b/android/src/app/organicmaps/downloader/DownloaderFragment.java index 4680ba4ea4..8f0fab5e14 100644 --- a/android/src/app/organicmaps/downloader/DownloaderFragment.java +++ b/android/src/app/organicmaps/downloader/DownloaderFragment.java @@ -61,14 +61,18 @@ public class DownloaderFragment extends BaseMwmRecyclerFragment 0; } private void showFab() { - if (mFab != null && shouldShowFab()) { + if (mFab != null && shouldShowFab() && !isRecyclerViewAtBottom()) { mFab.show(); + } else { + mFab.hide(); } } private void hideFab() { - if (mFab != null) { + if (mFab != null && shouldShowFab() && !isRecyclerViewAtBottom()) { mFab.hide(); + } else { + mFab.show(); } } private boolean isRecyclerViewAtBottom() { -- 2.45.3 From ddbae646f4ee38cf2707218ca03e7735808ca61f Mon Sep 17 00:00:00 2001 From: Tom <89885722+Zhu-Pengming-Tom@users.noreply.github.com> Date: Mon, 26 Jun 2023 21:01:06 +0800 Subject: [PATCH 10/10] Update DownloaderFragment.java --- .../app/organicmaps/downloader/DownloaderFragment.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/android/src/app/organicmaps/downloader/DownloaderFragment.java b/android/src/app/organicmaps/downloader/DownloaderFragment.java index 8f0fab5e14..ae0d855f8d 100644 --- a/android/src/app/organicmaps/downloader/DownloaderFragment.java +++ b/android/src/app/organicmaps/downloader/DownloaderFragment.java @@ -198,11 +198,13 @@ public class DownloaderFragment extends BaseMwmRecyclerFragment