23d84dfa66
* 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
23 lines
No EOL
666 B
Kotlin
23 lines
No EOL
666 B
Kotlin
package com.keylesspalace.tusky.viewdata
|
|
|
|
import android.os.Parcelable
|
|
import com.keylesspalace.tusky.entity.Attachment
|
|
import com.keylesspalace.tusky.entity.Status
|
|
import kotlinx.android.parcel.Parcelize
|
|
|
|
@Parcelize
|
|
data class AttachmentViewData(
|
|
val attachment: Attachment,
|
|
val statusId: String,
|
|
val statusUrl: String
|
|
) : Parcelable {
|
|
companion object {
|
|
@JvmStatic
|
|
fun list(status: Status): List<AttachmentViewData> {
|
|
val actionable = status.actionableStatus
|
|
return actionable.attachments.map {
|
|
AttachmentViewData(it, actionable.id, actionable.url)
|
|
}
|
|
}
|
|
}
|
|
} |