From edeeb4b2957bad890052bda81b24998659f97d6a Mon Sep 17 00:00:00 2001 From: czp3009 Date: Sat, 2 Jun 2018 00:56:44 +0800 Subject: [PATCH] typo --- build.gradle | 2 +- .../hiczp/bilibili/api/live/socket/LiveClient.java | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 96fa2b4..f09e6d4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ group = 'com.hiczp' -version = '0.0.14' +version = '0.0.15' description = 'Bilibili android client API library written in Java' apply plugin: 'idea' diff --git a/src/main/java/com/hiczp/bilibili/api/live/socket/LiveClient.java b/src/main/java/com/hiczp/bilibili/api/live/socket/LiveClient.java index 6b55c63..616f9a4 100644 --- a/src/main/java/com/hiczp/bilibili/api/live/socket/LiveClient.java +++ b/src/main/java/com/hiczp/bilibili/api/live/socket/LiveClient.java @@ -24,6 +24,7 @@ import retrofit2.Call; import javax.annotation.Nonnull; import java.io.IOException; +import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; @@ -180,11 +181,21 @@ public class LiveClient { return this; } - public LiveClient unregisterListeners(@Nonnull Object object) { + public LiveClient registerListeners(@Nonnull List objects) { + objects.forEach(eventBus::register); + return this; + } + + public LiveClient unregisterListener(@Nonnull Object object) { eventBus.unregister(object); return this; } + public LiveClient unregisterListeners(@Nonnull List objects) { + objects.forEach(eventBus::unregister); + return this; + } + //TODO 弹幕发送队列 public Call sendBulletScreenAsync(@Nonnull String message) {