Show image descriptions in gallery (#630)
* Add circleci * Commit to maybe fix ci * Suppress false positives in lint * Disable linting for tests in ci * Add image descriptions to gallery * Fix test * [CI] Attempt to fix OOM error * [CI] Attempt to fix OOM error, 2 * Add option to open status from media * fix theme issue * increase linespacing on media description
This commit is contained in:
parent
1108652823
commit
23d84dfa66
27 changed files with 313 additions and 193 deletions
|
@ -15,13 +15,16 @@
|
|||
|
||||
package com.keylesspalace.tusky.entity
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.JsonDeserializationContext
|
||||
import com.google.gson.JsonDeserializer
|
||||
import com.google.gson.JsonElement
|
||||
import com.google.gson.JsonParseException
|
||||
import com.google.gson.annotations.JsonAdapter
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.android.parcel.Parcelize
|
||||
|
||||
@Parcelize
|
||||
data class Attachment(
|
||||
var id: String,
|
||||
var url: String,
|
||||
|
@ -29,7 +32,7 @@ data class Attachment(
|
|||
@SerializedName("text_url") val textUrl: String?,
|
||||
var type: Type,
|
||||
var description: String?
|
||||
) {
|
||||
) : Parcelable {
|
||||
|
||||
@JsonAdapter(MediaTypeDeserializer::class)
|
||||
enum class Type {
|
||||
|
|
|
@ -36,7 +36,7 @@ data class Status(
|
|||
var sensitive: Boolean,
|
||||
@SerializedName("spoiler_text") val spoilerText: String,
|
||||
val visibility: Visibility,
|
||||
@SerializedName("media_attachments") var attachments: Array<Attachment>,
|
||||
@SerializedName("media_attachments") var attachments: List<Attachment>,
|
||||
val mentions: Array<Mention>,
|
||||
val application: Application?
|
||||
) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue