From 1dc8b234cf18adbcc0fa62aefea3615f38046c1d Mon Sep 17 00:00:00 2001 From: Starcommander Date: Fri, 29 May 2020 21:56:45 +0200 Subject: [PATCH] Show map after import on next refresh. See #110 Allow Favourites-Address-Details also on empty list. --- .../com/junjunguo/pocketmaps/activities/GeocodeActivity.java | 2 -- .../java/com/junjunguo/pocketmaps/downloader/MapUnzip.java | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/PocketMaps/app/src/main/java/com/junjunguo/pocketmaps/activities/GeocodeActivity.java b/PocketMaps/app/src/main/java/com/junjunguo/pocketmaps/activities/GeocodeActivity.java index fcb4f68..e22be16 100644 --- a/PocketMaps/app/src/main/java/com/junjunguo/pocketmaps/activities/GeocodeActivity.java +++ b/PocketMaps/app/src/main/java/com/junjunguo/pocketmaps/activities/GeocodeActivity.java @@ -649,7 +649,6 @@ private void startFavAsync(final MyAddressAdapter adapter) if (!new File(propFile).exists()) { favourites = new Properties(); - return; } else if (favourites == null) { @@ -703,7 +702,6 @@ protected void onPostExecute(List
resp) address.setLatitude(locations[2].getLatitude()); address.setLatitude(locations[2].getLatitude()); showAddressDetails(EditType.EditOnly, address); - return; } } }.execute(); diff --git a/PocketMaps/app/src/main/java/com/junjunguo/pocketmaps/downloader/MapUnzip.java b/PocketMaps/app/src/main/java/com/junjunguo/pocketmaps/downloader/MapUnzip.java index 30be8c8..29f0f62 100644 --- a/PocketMaps/app/src/main/java/com/junjunguo/pocketmaps/downloader/MapUnzip.java +++ b/PocketMaps/app/src/main/java/com/junjunguo/pocketmaps/downloader/MapUnzip.java @@ -101,6 +101,10 @@ public boolean unzipImport(final String zipFilePath, final Context appContext) } catch (IOException e) { e.printStackTrace(); finishTxt = "Unzip error: "; } pp.updateTextFinal(finishTxt + mapNameFinal); + + MyMap myMap = new MyMap(mapNameFinal); + Variable.getVariable().getRecentDownloadedMaps().add(myMap); + myMap.setStatus(MyMap.DlStatus.Complete); }}); t.start(); return true;