Skip to content

Commit

Permalink
Separate broadcasts to prevent duplicate messages (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyb3rko committed Dec 1, 2023
1 parent 028e29a commit 07f931d
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import android.os.IBinder
import androidx.annotation.RequiresApi
import androidx.core.app.NotificationCompat
import androidx.core.content.ContextCompat
import com.github.gotify.BuildConfig
import com.github.gotify.MarkwonFactory
import com.github.gotify.MissedMessageUtil
import com.github.gotify.NotificationSupport
Expand All @@ -41,7 +42,8 @@ import org.tinylog.kotlin.Logger

internal class WebSocketService : Service() {
companion object {
val NEW_MESSAGE_BROADCAST = "${WebSocketService::class.java.name}.NEW_MESSAGE"
private val castAddition = if (BuildConfig.DEBUG) ".DEBUG" else ""
val NEW_MESSAGE_BROADCAST = "${WebSocketService::class.java.name}.NEW_MESSAGE$castAddition"
private const val NOT_LOADED = -2L
}

Expand Down

0 comments on commit 07f931d

Please sign in to comment.