From a8a7a8fb8b2bfb4adcdff99d7b6ead5ffa9cd86a Mon Sep 17 00:00:00 2001 From: BERADQ Date: Wed, 6 Nov 2024 23:20:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=BA=20ONCE=20=E7=9A=84=E8=81=8A=E5=A4=A9=E6=B0=94?= =?UTF-8?q?=E6=B3=A1=E4=BC=9A=E5=9C=A8=E8=BF=9B=E5=85=A5=E7=8E=A9=E5=AE=B6?= =?UTF-8?q?=E5=8F=AF=E8=A7=86=E8=8C=83=E5=9B=B4=E5=86=85=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E4=B8=80=E6=AC=A1=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- src/main/kotlin/io/github/beradq/adybubbles/Bubbles.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 10003cd..cba3d79 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ group=io.github.beradq.adybubbles -version=2.5.0-SNAPSHOT +version=2.5.1 kotlin.incremental=true kotlin.incremental.java=true kotlin.caching.enabled=true diff --git a/src/main/kotlin/io/github/beradq/adybubbles/Bubbles.kt b/src/main/kotlin/io/github/beradq/adybubbles/Bubbles.kt index 0b2f305..b5d993c 100644 --- a/src/main/kotlin/io/github/beradq/adybubbles/Bubbles.kt +++ b/src/main/kotlin/io/github/beradq/adybubbles/Bubbles.kt @@ -1,7 +1,7 @@ package io.github.beradq.adybubbles class Bubbles(val items: MutableList, val config: BubbleConfig) : Cloneable { - private val state = BubbleState(0) + private val state = BubbleState(0, if (config.mode == ChatPopupMode.ONCE) -1L else 0) private var restDelay = config.restDelayRange.random() private var period = config.period.random() @@ -20,7 +20,7 @@ class Bubbles(val items: MutableList, val config: BubbleConfig) : Clonea data class BubbleState( var index: Int, - var timeCount: Long = 0 + var timeCount: Long ) : Cloneable fun next(): String? {