mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-18 19:59:00 +00:00
Fix determining if user has password
This commit is contained in:
parent
41075df123
commit
dbf92e030e
2 changed files with 4 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package com.habitrpg.android.habitica.models.auth
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import com.habitrpg.android.habitica.models.BaseObject
|
||||
import io.realm.RealmObject
|
||||
import io.realm.annotations.RealmClass
|
||||
|
|
@ -8,4 +9,6 @@ import io.realm.annotations.RealmClass
|
|||
open class LocalAuthentication : RealmObject(), BaseObject {
|
||||
var username: String? = null
|
||||
var email: String? = null
|
||||
@SerializedName("local")
|
||||
var hasPassword: Boolean? = false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ open class Authentication : RealmObject(), BaseObject {
|
|||
}
|
||||
|
||||
val hasPassword: Boolean
|
||||
get() = localAuthentication?.email != null
|
||||
get() = localAuthentication?.hasPassword == true
|
||||
@SerializedName("local")
|
||||
var localAuthentication: LocalAuthentication? = null
|
||||
@SerializedName("google")
|
||||
|
|
|
|||
Loading…
Reference in a new issue