Remove unnecessary listener and perform checking before adding

This commit is contained in:
PavelRatushnyi 2017-10-14 16:37:44 +03:00
parent cba0c167aa
commit af4ad79295
2 changed files with 3 additions and 5 deletions

View file

@ -835,8 +835,4 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
public interface OnFragmentActivatedListener {
void onFragmentActivated();
}
public interface OnPoiChangedListener {
void onPoiChanged();
}
}

View file

@ -27,8 +27,10 @@ public class OpenstreetmapLocalUtil implements OpenstreetmapUtil {
private List<OnNodeCommittedListener> listeners = new ArrayList<>();
public void addNodeCommittedListener(OnNodeCommittedListener listener) {
if (!listeners.contains(listener)) {
listeners.add(listener);
}
}
public void removeNodeCommittedListener(OnNodeCommittedListener listener) {
listeners.remove(listener);