diff --git a/app/src/main/java/com/nextcloud/talk/polls/repositories/model/Poll.kt b/app/src/main/java/com/nextcloud/talk/polls/repositories/model/Poll.kt index a61bc2630..33f273dbc 100644 --- a/app/src/main/java/com/nextcloud/talk/polls/repositories/model/Poll.kt +++ b/app/src/main/java/com/nextcloud/talk/polls/repositories/model/Poll.kt @@ -59,7 +59,14 @@ data class Poll( @JsonField(name = ["votedSelf"]) var votedSelf: ArrayList? = null, -) : Parcelable { + + @JsonField(name = ["numVoters"]) + var numVoters: Int = 0, + + @JsonField(name = ["details"]) + var details: ArrayList? = null, + + ) : Parcelable { // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject' constructor() : this(0, null, null, null, null, null, null, 0, 0, 0, null) } diff --git a/app/src/main/java/com/nextcloud/talk/polls/repositories/model/PollDetails.kt b/app/src/main/java/com/nextcloud/talk/polls/repositories/model/PollDetails.kt new file mode 100644 index 000000000..16c1bddac --- /dev/null +++ b/app/src/main/java/com/nextcloud/talk/polls/repositories/model/PollDetails.kt @@ -0,0 +1,26 @@ +package com.nextcloud.talk.polls.repositories.model + +import android.os.Parcelable +import com.bluelinelabs.logansquare.annotation.JsonField +import com.bluelinelabs.logansquare.annotation.JsonObject +import kotlinx.android.parcel.Parcelize + +@Parcelize +@JsonObject +data class PollDetails( + @JsonField(name = ["actorType"]) + var actorType: String? = null, + + @JsonField(name = ["actorId"]) + var actorId: String? = null, + + @JsonField(name = ["actorDisplayName"]) + var actorDisplayName: String? = null, + + @JsonField(name = ["optionId"]) + var optionId: Int? = 0, + + ) : Parcelable { + // This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject' + constructor() : this(null, null, null, 0) +}