mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 07:35:55 +08:00
Bugfix: remove JavaScript isFramed() as it requires the removed GoogleSocial
This commit is contained in:
parent
ebfde6e360
commit
10a00f8391
|
@ -3,7 +3,7 @@ import _ from '_';
|
|||
import ko from 'ko';
|
||||
|
||||
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 {
|
||||
attachmentDownload,
|
||||
|
@ -357,25 +357,11 @@ class AttachmentModel extends AbstractModel {
|
|||
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}
|
||||
*/
|
||||
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():
|
||||
result = this.linkPreviewAsPlain();
|
||||
break;
|
||||
case this.isFramed():
|
||||
result = this.linkFramed();
|
||||
break;
|
||||
// no default
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue