Bugfix: remove JavaScript isFramed() as it requires the removed GoogleSocial

This commit is contained in:
djmaze 2020-03-19 15:22:07 +01:00
parent ebfde6e360
commit 10a00f8391

View file

@ -3,7 +3,7 @@ import _ from '_';
import ko from 'ko'; import ko from 'ko';
import { FileType } from 'Common/Enums'; import { FileType } from 'Common/Enums';
import { bAllowPdfPreview, data as GlobalsData } from 'Common/Globals'; import { bAllowPdfPreview } from 'Common/Globals';
import { trim, pInt, inArray, isNonEmptyArray, getFileExtension, friendlySize } from 'Common/Utils'; import { trim, pInt, inArray, isNonEmptyArray, getFileExtension, friendlySize } from 'Common/Utils';
import { import {
attachmentDownload, attachmentDownload,
@ -357,25 +357,11 @@ class AttachmentModel extends AbstractModel {
return FileType.Pdf === this.fileType; return FileType.Pdf === this.fileType;
} }
/**
* @returns {boolean}
*/
isFramed() {
return (
this.framed &&
GlobalsData.__APP__ &&
GlobalsData.__APP__.googlePreviewSupported() &&
!(this.isPdf() && bAllowPdfPreview) &&
!this.isText() &&
!this.isImage()
);
}
/** /**
* @returns {boolean} * @returns {boolean}
*/ */
hasPreview() { hasPreview() {
return this.isImage() || (this.isPdf() && bAllowPdfPreview) || this.isText() || this.isFramed(); return this.isImage() || (this.isPdf() && bAllowPdfPreview) || this.isText();
} }
/** /**
@ -445,9 +431,6 @@ class AttachmentModel extends AbstractModel {
case this.isText(): case this.isText():
result = this.linkPreviewAsPlain(); result = this.linkPreviewAsPlain();
break; break;
case this.isFramed():
result = this.linkFramed();
break;
// no default // no default
} }