Fix determining if user has password

This commit is contained in:
Phillip Thelen 2022-05-02 17:26:50 +02:00
parent 41075df123
commit dbf92e030e
2 changed files with 4 additions and 1 deletions

View file

@ -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
}

View file

@ -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")