Prefer GoogleChrome.is* over MIME.is*

This commit is contained in:
Daniel Gasienica
2018-04-24 17:16:26 -04:00
parent 64c3d604aa
commit b65370c8d7
4 changed files with 17 additions and 12 deletions

View File

@@ -142,15 +142,16 @@
},
isAudio() {
const { contentType } = this.model;
// TODO: Implement and use `Signal.Util.GoogleChrome.isAudioTypeSupported`:
return Signal.Types.MIME.isAudio(contentType);
},
isVideo() {
const { contentType } = this.model;
return Signal.Types.MIME.isVideo(contentType);
return Signal.Util.GoogleChrome.isVideoTypeSupported(contentType);
},
isImage() {
const { contentType } = this.model;
return Signal.Types.MIME.isImage(contentType);
return Signal.Util.GoogleChrome.isImageTypeSupported(contentType);
},
mediaType() {
if (this.isVoiceMessage()) {

View File

@@ -429,7 +429,7 @@
}
const first = attachments[0];
if (Signal.Types.MIME.isImage(first.contentType)) {
if (Signal.Util.GoogleChrome.isImageTypeSupported(first.contentType)) {
return true;
}