Konsist: check if sealed class could be sealed interface and fix existing issues.
This commit is contained in:
parent
ddc1e1d0cc
commit
3092ca23f0
14 changed files with 66 additions and 55 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue