mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03: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();
|
void setTabItemContributions();
|
||||||
boolean isDetailsBottomSheetVisible();
|
boolean isDetailsBottomSheetVisible();
|
||||||
void setBottomSheetDetailsSmaller();
|
void setBottomSheetDetailsSmaller();
|
||||||
|
boolean isSearchThisAreaButtonVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
interface NearbyListView {
|
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
|
@Override
|
||||||
public void setProgressBarVisibility(boolean isVisible) {
|
public void setProgressBarVisibility(boolean isVisible) {
|
||||||
if (isVisible) {
|
if (isVisible) {
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,9 @@ public class NearbyParentFragmentPresenter
|
||||||
|
|
||||||
} else { // Means location changed slightly, ie user is walking or driving.
|
} else { // Means location changed slightly, ie user is walking or driving.
|
||||||
Timber.d("Means location changed slightly");
|
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