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