add media limit to 4
This commit is contained in:
parent
0ef289fdd8
commit
2261802fd1
|
@ -29,6 +29,9 @@ export class MediaService {
|
||||||
|
|
||||||
let medias = this.mediaSubject.value;
|
let medias = this.mediaSubject.value;
|
||||||
medias.push(wrapper);
|
medias.push(wrapper);
|
||||||
|
if(medias.length > 4){
|
||||||
|
medias.splice(0, 1);
|
||||||
|
}
|
||||||
this.mediaSubject.next(medias);
|
this.mediaSubject.next(medias);
|
||||||
|
|
||||||
this.mastodonService.uploadMediaAttachment(account, file, null)
|
this.mastodonService.uploadMediaAttachment(account, file, null)
|
||||||
|
|
Loading…
Reference in New Issue