mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Disable current location button during markers load (#3238)
This commit is contained in:
parent
3e5360ae4d
commit
21503fc786
3 changed files with 17 additions and 0 deletions
|
|
@ -42,6 +42,8 @@ public interface NearbyParentFragmentContract {
|
|||
void setCheckBoxAction();
|
||||
void setCheckBoxState(int state);
|
||||
void setFilterState();
|
||||
void disableFABRecenter();
|
||||
void enableFABRecenter();
|
||||
}
|
||||
|
||||
interface NearbyListView {
|
||||
|
|
|
|||
|
|
@ -830,6 +830,16 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
|
|||
fabRecenter.setOnClickListener(onClickListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disableFABRecenter() {
|
||||
fabRecenter.setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enableFABRecenter() {
|
||||
fabRecenter.setEnabled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recenterMap(fr.free.nrw.commons.location.LatLng curLatLng) {
|
||||
nearbyMapFragment.removeCurrentLocationMarker();
|
||||
|
|
|
|||
|
|
@ -198,6 +198,11 @@ public class NearbyParentFragmentPresenter
|
|||
@Override
|
||||
public void lockUnlockNearby(boolean isNearbyLocked) {
|
||||
this.isNearbyLocked = isNearbyLocked;
|
||||
if (isNearbyLocked) {
|
||||
nearbyParentFragmentView.disableFABRecenter();
|
||||
} else {
|
||||
nearbyParentFragmentView.enableFABRecenter();
|
||||
}
|
||||
}
|
||||
|
||||
public void registerUnregisterLocationListener(boolean removeLocationListener) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue