Bugfix: MarkerDetailActivity: compare waypointId properly using equals.

Introduced in bcbaf4985a
This commit is contained in:
Dennis Guse
2020-08-23 00:06:23 +02:00
parent 0ab14e0f3d
commit 17d2755844
@@ -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;
}