Skip to content

Nearby: Fix race condition and lag when loading pin details, faster overlay management #6047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

public class NearbyController extends MapController {

private static final int MAX_RESULTS = 1000;
private final NearbyPlaces nearbyPlaces;
public static final int MAX_RESULTS = 1000;
public static double currentLocationSearchRadius = 10.0; //in kilometers
public static LatLng currentLocation; // Users latest fetched location
public static LatLng latestSearchLocation; // Can be current and camera target on search this area button is used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

import android.content.Context;
import androidx.annotation.Nullable;
import androidx.lifecycle.LifecycleCoroutineScope;
import fr.free.nrw.commons.BaseMarker;
import fr.free.nrw.commons.kvstore.JsonKvStore;
import fr.free.nrw.commons.location.LatLng;
import fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType;
import fr.free.nrw.commons.nearby.Label;
import fr.free.nrw.commons.nearby.MarkerPlaceGroup;
import fr.free.nrw.commons.nearby.Place;
import java.util.List;

Expand Down Expand Up @@ -68,7 +70,7 @@ interface View {

Context getContext();

void updateMapMarkers(List<BaseMarker> BaseMarkers);
void replaceMarkerOverlays(List<MarkerPlaceGroup> markerPlaceGroups);

void filterOutAllMarkers();

Expand Down Expand Up @@ -127,5 +129,7 @@ void filterByMarkerType(List<Label> selectedLabels, int state, boolean filterFor
void setCheckboxUnknown();

void setAdvancedQuery(String query);

void toggleBookmarkedStatus(Place place);
}
}
Loading
Loading