@@ -11,6 +11,7 @@ import org.joinmastodon.android.ui.utils.BlurHashDecoder;
|
||||
import org.joinmastodon.android.ui.utils.BlurHashDrawable;
|
||||
import org.parceler.Parcel;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
|
||||
@Parcel
|
||||
@@ -34,11 +35,14 @@ public class Card extends BaseModel{
|
||||
public String embedUrl;
|
||||
public String blurhash;
|
||||
public List<History> history;
|
||||
public Instant publishedAt;
|
||||
|
||||
public transient Drawable blurhashPlaceholder;
|
||||
|
||||
@Override
|
||||
public void postprocess() throws ObjectValidationException{
|
||||
if(type==null)
|
||||
type=Type.LINK;
|
||||
super.postprocess();
|
||||
if(blurhash!=null){
|
||||
Bitmap placeholder=BlurHashDecoder.decode(blurhash, 16, 16);
|
||||
@@ -64,6 +68,7 @@ public class Card extends BaseModel{
|
||||
", embedUrl='"+embedUrl+'\''+
|
||||
", blurhash='"+blurhash+'\''+
|
||||
", history="+history+
|
||||
", publishedAt="+publishedAt+
|
||||
'}';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user