mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
committed by
Greyson Parrelli
parent
be92b3cf0a
commit
cafbf48783
@@ -210,13 +210,13 @@ class AnalogClockStickerDrawable(val context: Context) : Drawable(), Animatable
|
||||
GREEN(3);
|
||||
|
||||
fun next(): Style {
|
||||
val values = Style.values()
|
||||
val values = entries.toTypedArray()
|
||||
|
||||
return values[(values.indexOf(this) + 1) % values.size]
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun fromType(type: Int) = Style.values().first { it.type == type }
|
||||
fun fromType(type: Int) = entries.first { it.type == type }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,13 +250,13 @@ class DigitalClockStickerDrawable(
|
||||
DARK_WITH_RED_TEXT(4);
|
||||
|
||||
fun next(): Style {
|
||||
val values = Style.values()
|
||||
val values = entries.toTypedArray()
|
||||
|
||||
return values[(values.indexOf(this) + 1) % values.size]
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun fromType(type: Int) = Style.values().first { it.type == type }
|
||||
fun fromType(type: Int) = entries.first { it.type == type }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@ enum class FeatureSticker(val type: String) {
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun fromType(type: String) = FeatureSticker.values().first { it.type == type }
|
||||
fun fromType(type: String) = entries.first { it.type == type }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user