Skip to content

Commit

Permalink
Ban fix
Browse files Browse the repository at this point in the history
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
  • Loading branch information
rapterjet2004 committed Jul 17, 2024
1 parent bd2cbf1 commit 7aa4dea
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,24 @@ import kotlinx.parcelize.Parcelize
class TalkBan(
@JsonField(name = ["id"])
var id: String?,
@JsonField(name = ["actorType"])
var actorType: String?,
@JsonField(name = ["actorId"])
var actorId: String?,
@JsonField(name = ["bannedType"])
var bannedType: String?,
@JsonField(name = ["bannedId"])
var bannedId: String?,
@JsonField(name = ["moderatorActorType"])
var moderatorActorType: String?,
@JsonField(name = ["moderatorActorId"])
var moderatorActorId: String?,
@JsonField(name = ["moderatorDisplayName"])
var moderatorDisplayName: String?,
@JsonField(name = ["bannedActorType"])
var bannedActorType: String?,
@JsonField(name = ["bannedActorId"])
var bannedActorId: String?,
@JsonField(name = ["bannedDisplayName"])
var bannedDisplayName: String?,
@JsonField(name = ["bannedTime"])
var bannedTime: Int?,
@JsonField(name = ["internalNote"])
var internalNote: String?,
) : Parcelable {
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
constructor() : this(null, null, null, null, null, null, null)
constructor() :
this(null, null, null, null, null, null, null, null, null)
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class DialogBanListFragment(val roomToken: String) : DialogFragment() {

override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View {
val binding = BanItemListBinding.inflate(LayoutInflater.from(context))
binding.banActorName.text = bans[position].bannedId
binding.banActorName.text = bans[position].bannedDisplayName
// TODO check if unban works
val time = bans[position].bannedTime!!.toLong()
binding.banTime.text = DateUtils.formatDateTime(
Expand Down

0 comments on commit 7aa4dea

Please sign in to comment.