Konsist: check if sealed class could be sealed interface and fix existing issues.

This commit is contained in:
Benoit Marty 2023-11-02 15:16:32 +01:00 committed by Benoit Marty
parent ddc1e1d0cc
commit 3092ca23f0
14 changed files with 66 additions and 55 deletions

View file

@ -24,9 +24,9 @@ import android.os.SystemClock
class FirstThrottler(private val minimumInterval: Long = 800) {
private var lastDate = 0L
sealed class CanHandleResult {
data object Yes : CanHandleResult()
data class No(val shouldWaitMillis: Long) : CanHandleResult()
sealed interface CanHandleResult {
data object Yes : CanHandleResult
data class No(val shouldWaitMillis: Long) : CanHandleResult
fun waitMillis(): Long {
return when (this) {