mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-19 10:45:13 +01:00
Clean up user entity
This commit is contained in:
parent
5eeb19538f
commit
d3fb91d6a6
@ -20,9 +20,7 @@
|
|||||||
|
|
||||||
package com.nextcloud.talk.newarch.local.models
|
package com.nextcloud.talk.newarch.local.models
|
||||||
|
|
||||||
import android.os.Parcel
|
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
import android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE
|
|
||||||
import androidx.room.ColumnInfo
|
import androidx.room.ColumnInfo
|
||||||
import androidx.room.Entity
|
import androidx.room.Entity
|
||||||
import androidx.room.PrimaryKey
|
import androidx.room.PrimaryKey
|
||||||
@ -31,10 +29,7 @@ import com.nextcloud.talk.models.json.capabilities.Capabilities
|
|||||||
import com.nextcloud.talk.models.json.push.PushConfigurationState
|
import com.nextcloud.talk.models.json.push.PushConfigurationState
|
||||||
import com.nextcloud.talk.newarch.local.models.other.UserStatus
|
import com.nextcloud.talk.newarch.local.models.other.UserStatus
|
||||||
import com.nextcloud.talk.utils.ApiUtils
|
import com.nextcloud.talk.utils.ApiUtils
|
||||||
import kotlinx.android.parcel.Parceler
|
|
||||||
import kotlinx.android.parcel.Parcelize
|
import kotlinx.android.parcel.Parcelize
|
||||||
import kotlinx.android.parcel.RawValue
|
|
||||||
import org.parceler.Parcels
|
|
||||||
|
|
||||||
@Parcelize
|
@Parcelize
|
||||||
@Entity(tableName = "users")
|
@Entity(tableName = "users")
|
||||||
@ -57,12 +52,7 @@ data class UserNgEntity(
|
|||||||
) : Parcelable {
|
) : Parcelable {
|
||||||
|
|
||||||
fun hasSpreedFeatureCapability(capabilityName: String): Boolean {
|
fun hasSpreedFeatureCapability(capabilityName: String): Boolean {
|
||||||
val capabilityExists = capabilities?.spreedCapability?.features?.contains(capabilityName)
|
return capabilities?.spreedCapability?.features?.contains(capabilityName) ?: false
|
||||||
if (capabilityExists != null) {
|
|
||||||
return capabilityExists
|
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +70,7 @@ data class UserNgEntity(
|
|||||||
if (pushConfiguration != other.pushConfiguration) return false
|
if (pushConfiguration != other.pushConfiguration) return false
|
||||||
if (capabilities != other.capabilities) return false
|
if (capabilities != other.capabilities) return false
|
||||||
if (clientCertificate != other.clientCertificate) return false
|
if (clientCertificate != other.clientCertificate) return false
|
||||||
//if (externalSignaling != other.externalSignaling) return false
|
if (externalSignaling != other.externalSignaling) return false
|
||||||
if (status != other.status) return false
|
if (status != other.status) return false
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user