mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-03 09:53:06 +02:00
Bugfix: MarkerDetailActivity: compare waypointId properly using equals.
Introduced in bcbaf4985a
This commit is contained in:
@@ -67,12 +67,13 @@ public class MarkerDetailActivity extends AbstractActivity implements DeleteMark
|
||||
waypointIds = new ArrayList<>();
|
||||
int markerIndex = -1;
|
||||
|
||||
//TODO Load only waypointIds, not the whole waypoint
|
||||
try (Cursor cursor = contentProviderUtils.getWaypointCursor(waypoint.getTrackId(), null, -1)) {
|
||||
if (cursor != null && cursor.moveToFirst()) {
|
||||
for (int i = 0; i < cursor.getCount(); i++) {
|
||||
Waypoint currentMarker = contentProviderUtils.createWaypoint(cursor);
|
||||
waypointIds.add(currentMarker.getId());
|
||||
if (currentMarker.getId() == waypointId) {
|
||||
if (waypointId.equals(currentMarker.getId())) {
|
||||
markerIndex = waypointIds.size() - 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user