mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Detekt: fix MatchingDeclarationName
This commit is contained in:
parent
3bc84f0d38
commit
c3b5ba5639
@ -23,8 +23,11 @@ import org.matrix.android.sdk.api.session.events.model.toModel
|
|||||||
import org.matrix.android.sdk.api.session.room.model.PowerLevelsContent
|
import org.matrix.android.sdk.api.session.room.model.PowerLevelsContent
|
||||||
import org.matrix.android.sdk.api.util.JsonDict
|
import org.matrix.android.sdk.api.util.JsonDict
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Serializable object
|
||||||
|
*/
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
internal data class SerializablePowerLevelsContent(
|
internal data class SafePowerLevelContent(
|
||||||
@Json(name = "ban") val ban: Int?,
|
@Json(name = "ban") val ban: Int?,
|
||||||
@Json(name = "kick") val kick: Int?,
|
@Json(name = "kick") val kick: Int?,
|
||||||
@Json(name = "invite") val invite: Int?,
|
@Json(name = "invite") val invite: Int?,
|
||||||
@ -41,7 +44,7 @@ internal data class SerializablePowerLevelsContent(
|
|||||||
internal fun JsonDict.toSafePowerLevelsContentDict(): JsonDict {
|
internal fun JsonDict.toSafePowerLevelsContentDict(): JsonDict {
|
||||||
return toModel<PowerLevelsContent>()
|
return toModel<PowerLevelsContent>()
|
||||||
?.let { content ->
|
?.let { content ->
|
||||||
SerializablePowerLevelsContent(
|
SafePowerLevelContent(
|
||||||
ban = content.ban,
|
ban = content.ban,
|
||||||
kick = content.kick,
|
kick = content.kick,
|
||||||
invite = content.invite,
|
invite = content.invite,
|
||||||
|
Loading…
Reference in New Issue
Block a user