From a40b64baca2550deca11e8849ba39c520b09023b Mon Sep 17 00:00:00 2001 From: "Daniele Verducci (Slimpenguin)" Date: Fri, 14 Jan 2022 08:39:34 +0100 Subject: [PATCH] Flow fix --- .../activity/detail/GeofavoriteDetailActivity.java | 10 ++++++++++ .../activity/mappicker/MapPickerActivity.java | 1 + 2 files changed, 11 insertions(+) diff --git a/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/detail/GeofavoriteDetailActivity.java b/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/detail/GeofavoriteDetailActivity.java index 68044dc..c5d2188 100644 --- a/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/detail/GeofavoriteDetailActivity.java +++ b/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/detail/GeofavoriteDetailActivity.java @@ -53,6 +53,7 @@ import java.util.HashSet; import it.danieleverducci.nextcloudmaps.BuildConfig; import it.danieleverducci.nextcloudmaps.R; +import it.danieleverducci.nextcloudmaps.activity.mappicker.MapPickerActivity; import it.danieleverducci.nextcloudmaps.databinding.ActivityGeofavoriteDetailBinding; import it.danieleverducci.nextcloudmaps.model.Geofavorite; import it.danieleverducci.nextcloudmaps.utils.GeoUriParser; @@ -87,6 +88,11 @@ public class GeofavoriteDetailActivity extends AppCompatActivity implements Loca finish(); } + @Override + public void onMapEditPressed() { + //TODO + } + @Override public void onActionIconShareClicked() { startActivity(Intent.createChooser(IntentGenerator.newShareIntent(GeofavoriteDetailActivity.this, mGeofavorite), getString(R.string.share_via))); @@ -407,6 +413,9 @@ public class GeofavoriteDetailActivity extends AppCompatActivity implements Loca if (v.getId() == R.id.back_bt && this.listener != null) { this.listener.onBackPressed(); } + if (v.getId() == R.id.manual_pos_bt && this.listener != null) { + this.listener.onMapEditPressed(); + } // Actions if (v.getId() == R.id.action_icon_share && this.listener != null) { @@ -425,6 +434,7 @@ public class GeofavoriteDetailActivity extends AppCompatActivity implements Loca void onSubmit(); void onMapClicked(); void onBackPressed(); + void onMapEditPressed(); void onActionIconShareClicked(); void onActionIconNavClicked(); void onActionIconDeleteClicked(); diff --git a/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/mappicker/MapPickerActivity.java b/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/mappicker/MapPickerActivity.java index 8031407..acef7e5 100644 --- a/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/mappicker/MapPickerActivity.java +++ b/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/mappicker/MapPickerActivity.java @@ -70,6 +70,7 @@ public class MapPickerActivity extends AppCompatActivity { Intent i = new Intent(MapPickerActivity.this, GeofavoriteDetailActivity.class); i.setData(geoUri); startActivity(i); + finish(); } }); Location l = getLastKnownPosition();