Skip to content
Snippets Groups Projects
Commit a86b37ee authored by Kamal Bramwell's avatar Kamal Bramwell
Browse files

Updated Long values to Int

parent 82a78fc8
No related branches found
No related tags found
No related merge requests found
......@@ -6,5 +6,5 @@ data class Fact(
@SerializedName("Fact")
val fact: String,
@SerializedName("T")
val type: Long
val type: Int
) : BindingsModel
\ No newline at end of file
......@@ -5,13 +5,13 @@ sealed class FactType {
object Username : FactType()
object Email : FactType()
object Phone : FactType()
class Other(val code: Long) : FactType()
class Other(val code: Int) : FactType()
companion object {
fun from(code: Long): FactType = when (code) {
0L -> Username
1L -> Email
2L -> Phone
fun from(code: Int): FactType = when (code) {
0 -> Username
1 -> Email
2 -> Phone
else -> Other(code)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment