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:
parent
86e5c92a05
commit
6b95790457
18 changed files with 1257 additions and 11 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
12
app/src/main/java/com/keylesspalace/tusky/entity/Report.kt
Normal file
12
app/src/main/java/com/keylesspalace/tusky/entity/Report.kt
Normal 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,
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue