@@ -130,6 +130,7 @@ public class NearbyMapFragment extends DaggerFragment {
130130
131131 private boolean isMapReady ;
132132 public boolean searchThisAreaModeOn = false ;
133+ public boolean checkingAround = false ;
133134
134135 private Bundle bundleForUpdtes ;// Carry information from activity about changed nearby places and current location
135136 private boolean searchedAroundCurrentLocation = true ;
@@ -556,6 +557,7 @@ public void onCameraMove() {
556557 , NearbyController .currentLocation .getLongitude ()));
557558
558559 if (distance > NearbyController .searchedRadius *1000 *3 /4 ) { //Convert to meter, and compare if our distance is bigger than 3/4 or our searched area
560+ checkingAround = true ;
559561 if (!searchThisAreaModeOn ) { // If we are changing mode, then change click action
560562 searchThisAreaModeOn = true ;
561563 searchThisAreaButton .setOnClickListener (new View .OnClickListener () {
@@ -575,6 +577,7 @@ public void onClick(View view) {
575577 }
576578
577579 } else {
580+ checkingAround = false ;
578581 if (searchThisAreaModeOn ) {
579582 searchThisAreaModeOn = false ; // This flag will help us to understand should we folor users location or not
580583 searchThisAreaButton .setOnClickListener (new View .OnClickListener () {
@@ -1002,6 +1005,12 @@ public void onResume() {
10021005 if (mapView != null ) {
10031006 mapView .onResume ();
10041007 }
1008+ if (mapboxMap != null ) {
1009+ mapboxMap .getUiSettings ().setAllGesturesEnabled (true );
1010+ }
1011+ searchThisAreaModeOn = false ;
1012+ checkingAround = false ;
1013+ searchedAroundCurrentLocation = true ;
10051014 initViews ();
10061015 setListeners ();
10071016 transparentView .setClickable (false );
0 commit comments