Add support for moderation report notifications (#2887)

* Add support for moderation report notifications

* Translate report categories

* Apply tint inside flag drawable

* Remove unused imports

Co-authored-by: Konrad Pozniak <connyduck@users.noreply.github.com>
This commit is contained in:
Levi Bard 2022-12-01 20:11:55 +01:00 committed by GitHub
commit 6b95790457
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 1257 additions and 11 deletions

View file

@ -25,7 +25,8 @@ data class Notification(
val type: Type,
val id: String,
val account: TimelineAccount,
val status: Status?
val status: Status?,
val report: Report?,
) {
@JsonAdapter(NotificationTypeAdapter::class)
@ -40,6 +41,7 @@ data class Notification(
STATUS("status"),
SIGN_UP("admin.sign_up"),
UPDATE("update"),
REPORT("admin.report"),
;
companion object {
@ -52,7 +54,7 @@ data class Notification(
}
return UNKNOWN
}
val asList = listOf(MENTION, REBLOG, FAVOURITE, FOLLOW, FOLLOW_REQUEST, POLL, STATUS, SIGN_UP, UPDATE)
val asList = listOf(MENTION, REBLOG, FAVOURITE, FOLLOW, FOLLOW_REQUEST, POLL, STATUS, SIGN_UP, UPDATE, REPORT)
}
override fun toString(): String {

View file

@ -0,0 +1,12 @@
package com.keylesspalace.tusky.entity
import com.google.gson.annotations.SerializedName
import java.util.Date
data class Report(
val id: String,
val category: String,
val status_ids: List<String>?,
@SerializedName("created_at") val createdAt: Date,
@SerializedName("target_account") val targetAccount: TimelineAccount,
)