mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Relate parent presenter with parent fragment
This commit is contained in:
parent
bfc0d8821c
commit
2aa554661e
3 changed files with 35 additions and 8 deletions
|
|
@ -9,8 +9,7 @@ public interface NearbyParentFragmentContract {
|
|||
|
||||
interface UserActions {
|
||||
void displayListFragmentExpanded();
|
||||
void locationChangedSlightly();
|
||||
void locationChangedMedium();
|
||||
void locationChangedSignificantly();
|
||||
void onTabSelected();
|
||||
void initializeNearbyOperations();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,9 @@ public class NearbyParentFragment extends CommonsDaggerSupportFragment
|
|||
@Inject
|
||||
Gson gson;
|
||||
|
||||
public fr.free.nrw.commons.nearby.NearbyMapFragment nearbyMapFragment;
|
||||
private NearbyParentFragmentContract.UserActions userActions;
|
||||
|
||||
private fr.free.nrw.commons.nearby.NearbyMapFragment nearbyMapFragment;
|
||||
private fr.free.nrw.commons.nearby.NearbyListFragment nearbyListFragment;
|
||||
private static final String TAG_RETAINED_MAP_FRAGMENT = NearbyMapFragment.class.getSimpleName();
|
||||
private static final String TAG_RETAINED_LIST_FRAGMENT = NearbyListFragment.class.getSimpleName();
|
||||
|
|
|
|||
|
|
@ -1,8 +1,19 @@
|
|||
package fr.free.nrw.commons.nearby.mvp.presenter;
|
||||
|
||||
import fr.free.nrw.commons.location.LatLng;
|
||||
import fr.free.nrw.commons.location.LocationUpdateListener;
|
||||
import fr.free.nrw.commons.nearby.mvp.contract.NearbyParentFragmentContract;
|
||||
import fr.free.nrw.commons.wikidata.WikidataEditListener;
|
||||
|
||||
public class NearbyParentFragmentPresenter implements NearbyParentFragmentContract.UserActions {
|
||||
public class NearbyParentFragmentPresenter
|
||||
implements NearbyParentFragmentContract.UserActions,
|
||||
WikidataEditListener.WikidataP18EditListener,
|
||||
LocationUpdateListener {
|
||||
private NearbyParentFragmentContract.View nearbyParentFragmentView;
|
||||
|
||||
public NearbyParentFragmentPresenter(NearbyParentFragmentContract.View nearbyParentFragmentView) {
|
||||
this.nearbyParentFragmentView = nearbyParentFragmentView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayListFragmentExpanded() {
|
||||
|
|
@ -10,17 +21,32 @@ public class NearbyParentFragmentPresenter implements NearbyParentFragmentContra
|
|||
}
|
||||
|
||||
@Override
|
||||
public void locationChangedSlightly() {
|
||||
public void onTabSelected() {
|
||||
initializeNearbyOperations();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initializeNearbyOperations() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void locationChangedMedium() {
|
||||
public void onWikidataEditSuccessful() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void locationChangedSignificantly() {
|
||||
public void onLocationChangedSignificantly(LatLng latLng) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocationChangedSlightly(LatLng latLng) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLocationChangedMedium(LatLng latLng) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue