1
0
mirror of https://github.com/NekoX-Dev/NekoX.git synced 2024-12-04 17:10:12 +01:00

Fix display spoiler

This commit is contained in:
luvletter2333 2022-01-20 14:51:17 +08:00
parent e46ea1135e
commit 6a69aa0e9c
No known key found for this signature in database
GPG Key ID: A26A8880836E1978

View File

@ -54,6 +54,8 @@ import java.util.List;
import java.util.Stack;
import java.util.concurrent.atomic.AtomicReference;
import tw.nekomimi.nekogram.NekoConfig;
public class SpoilerEffect extends Drawable {
public final static int MAX_PARTICLES_PER_ENTITY = measureMaxParticlesCount();
public final static int PARTICLES_PER_CHARACTER = measureParticlesPerCharacter();
@ -590,6 +592,7 @@ public class SpoilerEffect extends Drawable {
* @param spoilers Spoilers list to populate
*/
public static void addSpoilers(@Nullable View v, Layout textLayout, @Nullable Stack<SpoilerEffect> spoilersPool, List<SpoilerEffect> spoilers) {
if (NekoConfig.showSpoilersDirectly.Bool()) return;
if (textLayout.getText() instanceof Spannable){
addSpoilers(v, textLayout, (Spannable) textLayout.getText(), spoilersPool, spoilers);
}