Improve link preview cards (#1330)

* improve card frame

* add placeholder for empty image

* improve layout, Pleroma compatibility, show author name as description fallback

* reset okhttp logging level

* remove unneeded statement
This commit is contained in:
Konrad Pozniak 2019-06-22 08:05:55 +02:00 committed by GitHub
commit b825f42c7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 69 additions and 31 deletions

View file

@ -16,13 +16,17 @@
package com.keylesspalace.tusky.entity
import android.os.Parcelable
import android.text.Spanned
import com.google.gson.annotations.SerializedName
import kotlinx.android.parcel.Parcelize
import kotlinx.android.parcel.WriteWith
@Parcelize
data class Card(
val url: String,
val title: String,
val description: String,
val title: @WriteWith<SpannedParceler>() Spanned,
val description: @WriteWith<SpannedParceler>() Spanned,
@SerializedName("author_name") val authorName: String,
val image: String,
val type: String,
val width: Int,

View file

@ -130,7 +130,7 @@ data class Status(
data class Application (
val name: String,
val website: String
val website: String?
)
companion object {