Remove unnecessary performNearbyOperations call on orientation changed.

This commit is contained in:
neslihanturan 2018-12-07 17:42:40 +03:00
parent b180824382
commit ccd9e8672c
2 changed files with 3 additions and 3 deletions

View file

@ -83,9 +83,9 @@ public class MainActivity extends AuthenticatedActivity implements FragmentManag
onOrientationChanged = true; // Will be used in nearby fragment to determine significant update of map
//If nearby map was visible, call on Tab Selected to call all nearby operations
if (savedInstanceState.getInt("viewPagerCurrentItem") == 1) {
/*if (savedInstanceState.getInt("viewPagerCurrentItem") == 1) {
((NearbyFragment)contributionsActivityPagerAdapter.getItem(1)).onTabSelected(onOrientationChanged);
}
}*/
}
}
@ -187,7 +187,6 @@ public class MainActivity extends AuthenticatedActivity implements FragmentManag
updateMenuItem();
// Do all permission and GPS related tasks on tab selected, not on create
((NearbyFragment)contributionsActivityPagerAdapter.getItem(1)).onTabSelected(onOrientationChanged);
break;
default:
tabLayout.getTabAt(CONTRIBUTIONS_TAB_POSITION).select();

View file

@ -731,6 +731,7 @@ public class NearbyFragment extends CommonsDaggerSupportFragment
}
public void onTabSelected(boolean onOrientationChanged) {
Log.d("deneme***","onTabSelected");
Timber.d("On nearby tab selected");
this.onOrientationChanged = onOrientationChanged;
performNearbyOperations();