mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 08:49:40 -05:00
Renamed Priority.priorityValue to value to follow enum standards
Clarified message in TikTokEventListener
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
package io.github.jwdeveloper.tiktok.annotations;
|
package io.github.jwdeveloper.tiktok.annotations;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HIGHEST 1
|
* HIGHEST 1
|
||||||
* HIGH 2
|
* HIGH 2
|
||||||
@@ -6,13 +7,12 @@ package io.github.jwdeveloper.tiktok.annotations;
|
|||||||
* LOW 4
|
* LOW 4
|
||||||
* LOWEST 5
|
* LOWEST 5
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public enum Priority {
|
public enum Priority {
|
||||||
LOWEST(2), LOW(1), NORMAL(0), HIGH(-1), HIGHEST(-2);
|
LOWEST(2), LOW(1), NORMAL(0), HIGH(-1), HIGHEST(-2);
|
||||||
|
|
||||||
public int priorityValue;
|
public final int value;
|
||||||
|
|
||||||
Priority(int value) {
|
Priority(int value) {
|
||||||
this.priorityValue = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -69,7 +69,7 @@ import io.github.jwdeveloper.tiktok.live.LiveClient;
|
|||||||
*/
|
*/
|
||||||
//TODO I think this interface can be removed, since we are using,
|
//TODO I think this interface can be removed, since we are using,
|
||||||
//annotation @TikTokEventHandler to check methods that are events
|
//annotation @TikTokEventHandler to check methods that are events
|
||||||
@Deprecated(forRemoval = true, since = "This interface is not longer needed, please remove it from your class")
|
@Deprecated(forRemoval = true, since = "1.8.1 (This interface is not longer needed, please remove it from your class)")
|
||||||
public interface TikTokEventListener {
|
public interface TikTokEventListener {
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -28,7 +28,6 @@ import io.github.jwdeveloper.tiktok.annotations.TikTokEventObserver;
|
|||||||
import io.github.jwdeveloper.tiktok.data.events.common.TikTokEvent;
|
import io.github.jwdeveloper.tiktok.data.events.common.TikTokEvent;
|
||||||
import io.github.jwdeveloper.tiktok.exceptions.TikTokEventListenerMethodException;
|
import io.github.jwdeveloper.tiktok.exceptions.TikTokEventListenerMethodException;
|
||||||
import io.github.jwdeveloper.tiktok.exceptions.TikTokLiveException;
|
import io.github.jwdeveloper.tiktok.exceptions.TikTokLiveException;
|
||||||
import io.github.jwdeveloper.tiktok.live.LiveClient;
|
|
||||||
import io.github.jwdeveloper.tiktok.live.LiveEventsHandler;
|
import io.github.jwdeveloper.tiktok.live.LiveEventsHandler;
|
||||||
import io.github.jwdeveloper.tiktok.live.builder.EventConsumer;
|
import io.github.jwdeveloper.tiktok.live.builder.EventConsumer;
|
||||||
|
|
||||||
@@ -89,7 +88,7 @@ public class TikTokListenersManager implements ListenersManager {
|
|||||||
.filter(e -> e.isAnnotationPresent(TikTokEventObserver.class))
|
.filter(e -> e.isAnnotationPresent(TikTokEventObserver.class))
|
||||||
.filter(e -> e.getParameterCount() >= 1)
|
.filter(e -> e.getParameterCount() >= 1)
|
||||||
.map(method -> getSingleMethodInfo(listener, method))
|
.map(method -> getSingleMethodInfo(listener, method))
|
||||||
.sorted(Comparator.comparingInt(a -> a.getPriority().priorityValue))
|
.sorted(Comparator.comparingInt(a -> a.getPriority().value))
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user