Connect child fragment and prent fragment with presenter

This commit is contained in:
neslihanturan 2019-05-20 17:31:18 +03:00
parent 95dd97aca0
commit 297eb67dae
2 changed files with 12 additions and 1 deletions

View file

@ -1,8 +1,15 @@
package fr.free.nrw.commons.nearby.mvp.presenter; package fr.free.nrw.commons.nearby.mvp.presenter;
import fr.free.nrw.commons.nearby.mvp.contract.NearbyMapContract; import fr.free.nrw.commons.nearby.mvp.contract.NearbyMapContract;
import fr.free.nrw.commons.nearby.mvp.contract.NearbyParentFragmentContract;
public class NearbyMapPresenter implements NearbyMapContract.UserActions { public class NearbyMapPresenter implements NearbyMapContract.UserActions {
NearbyMapContract.View nearbyMapFragmentView;
void NearbyMapPresenter(NearbyMapContract.View nearbyMapFragmentView) {
this.nearbyMapFragmentView = nearbyMapFragmentView;
}
@Override @Override
public void searchThisArea() { public void searchThisArea() {

View file

@ -5,6 +5,7 @@ import javax.inject.Inject;
import fr.free.nrw.commons.location.LatLng; import fr.free.nrw.commons.location.LatLng;
import fr.free.nrw.commons.location.LocationServiceManager; import fr.free.nrw.commons.location.LocationServiceManager;
import fr.free.nrw.commons.location.LocationUpdateListener; import fr.free.nrw.commons.location.LocationUpdateListener;
import fr.free.nrw.commons.nearby.mvp.contract.NearbyMapContract;
import fr.free.nrw.commons.nearby.mvp.contract.NearbyParentFragmentContract; import fr.free.nrw.commons.nearby.mvp.contract.NearbyParentFragmentContract;
import fr.free.nrw.commons.wikidata.WikidataEditListener; import fr.free.nrw.commons.wikidata.WikidataEditListener;
import timber.log.Timber; import timber.log.Timber;
@ -21,11 +22,14 @@ public class NearbyParentFragmentPresenter
LocationServiceManager locationManager; LocationServiceManager locationManager;
private NearbyParentFragmentContract.View nearbyParentFragmentView; private NearbyParentFragmentContract.View nearbyParentFragmentView;
private NearbyMapContract.View nearbyMapFragmentView;
private boolean isNearbyLocked; private boolean isNearbyLocked;
private LatLng curLatLng; private LatLng curLatLng;
public NearbyParentFragmentPresenter(NearbyParentFragmentContract.View nearbyParentFragmentView) { public NearbyParentFragmentPresenter(NearbyParentFragmentContract.View nearbyParentFragmentView,
NearbyMapContract.View nearbyMapFragmentView) {
this.nearbyParentFragmentView = nearbyParentFragmentView; this.nearbyParentFragmentView = nearbyParentFragmentView;
this.nearbyMapFragmentView = nearbyMapFragmentView;
} }
@Override @Override