mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Do not track users position if user is searching around
This commit is contained in:
parent
1a816fdecd
commit
dbd6693244
3 changed files with 13 additions and 1 deletions
|
|
@ -36,6 +36,7 @@ public interface NearbyParentFragmentContract {
|
|||
void setTabItemContributions();
|
||||
boolean isDetailsBottomSheetVisible();
|
||||
void setBottomSheetDetailsSmaller();
|
||||
boolean isSearchThisAreaButtonVisible();
|
||||
}
|
||||
|
||||
interface NearbyListView {
|
||||
|
|
|
|||
|
|
@ -554,6 +554,15 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSearchThisAreaButtonVisible() {
|
||||
if (searchThisAreaButton.getVisibility() == View.VISIBLE) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProgressBarVisibility(boolean isVisible) {
|
||||
if (isVisible) {
|
||||
|
|
|
|||
|
|
@ -258,7 +258,9 @@ public class NearbyParentFragmentPresenter
|
|||
|
||||
} else { // Means location changed slightly, ie user is walking or driving.
|
||||
Timber.d("Means location changed slightly");
|
||||
nearbyParentFragmentView.recenterMap(curLatLng);
|
||||
if (!nearbyParentFragmentView.isSearchThisAreaButtonVisible()) { // Do not track users position if the user is checking around
|
||||
nearbyParentFragmentView.recenterMap(curLatLng);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue