mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-03-01 17:59:39 -05:00
Bugs:
Method for listeners was throwing exception TikTokListenersManager.removeListener() was not working
This commit is contained in:
@@ -44,4 +44,11 @@ public class TikTokEventObserver {
|
||||
public <T extends TikTokEvent> void unsubscribeAll(Class<?> clazz) {
|
||||
events.remove(clazz);
|
||||
}
|
||||
|
||||
public <T extends TikTokEvent> void unsubscribe(TikTokEventConsumer<T> consumer) {
|
||||
for(var entry : events.entrySet())
|
||||
{
|
||||
entry.getValue().remove(consumer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user