add media limit to 4

This commit is contained in:
Nicolas Constant 2019-04-09 22:16:25 -04:00
parent 0ef289fdd8
commit 2261802fd1
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
1 changed files with 3 additions and 0 deletions

View File

@ -29,6 +29,9 @@ export class MediaService {
let medias = this.mediaSubject.value;
medias.push(wrapper);
if(medias.length > 4){
medias.splice(0, 1);
}
this.mediaSubject.next(medias);
this.mastodonService.uploadMediaAttachment(account, file, null)