Remove unnecessary listener and perform checking before adding
This commit is contained in:
parent
cba0c167aa
commit
af4ad79295
2 changed files with 3 additions and 5 deletions
|
@ -835,8 +835,4 @@ public class EditPoiDialogFragment extends BaseOsmAndDialogFragment {
|
|||
public interface OnFragmentActivatedListener {
|
||||
void onFragmentActivated();
|
||||
}
|
||||
|
||||
public interface OnPoiChangedListener {
|
||||
void onPoiChanged();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue