parent
480d4ad904
commit
13b5462f63
|
@ -14,9 +14,11 @@ import org.parceler.Parcel;
|
||||||
import org.parceler.ParcelConstructor;
|
import org.parceler.ParcelConstructor;
|
||||||
import org.parceler.ParcelProperty;
|
import org.parceler.ParcelProperty;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
@Parcel
|
@Parcel
|
||||||
public class Attachment extends BaseModel{
|
public class Attachment extends BaseModel{
|
||||||
@RequiredField
|
// @RequiredField
|
||||||
public String id;
|
public String id;
|
||||||
@RequiredField
|
@RequiredField
|
||||||
public Type type;
|
public Type type;
|
||||||
|
@ -85,6 +87,12 @@ public class Attachment extends BaseModel{
|
||||||
if(placeholder!=null)
|
if(placeholder!=null)
|
||||||
blurhashPlaceholder=new BlurHashDrawable(placeholder, getWidth(), getHeight());
|
blurhashPlaceholder=new BlurHashDrawable(placeholder, getWidth(), getHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (id == null) {
|
||||||
|
// akkoma servers doesn't provide IDs for attachments,
|
||||||
|
// but IDs are needed by the AudioPlayerService
|
||||||
|
id = "" + this.hashCode();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue