Skip to content
This repository was archived by the owner on Aug 16, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/android/com/github/nkzawa/emitter/Emitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public Emitter emit(String event, Object... args) {
ConcurrentLinkedQueue<Listener> callbacks = this.callbacks.get(event);
if (callbacks != null) {
for (Listener fn : callbacks) {
fn.call(args);
fn.call(event, args);
}
}
return this;
Expand Down Expand Up @@ -145,7 +145,7 @@ public boolean hasListeners(String event) {

public static interface Listener {

public void call(Object... args);
public void call(String event, Object... args);
}

private class OnceListener implements Listener {
Expand All @@ -161,7 +161,7 @@ public OnceListener(String event, Listener fn) {
@Override
public void call(Object... args) {
Emitter.this.off(this.event, this);
this.fn.call(args);
this.fn.call(this.event, args);
}
}
}