mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 08:57:03 +03:00
Bugfix: remove JavaScript isFramed() as it requires the removed GoogleSocial
This commit is contained in:
parent
ebfde6e360
commit
10a00f8391
1 changed files with 2 additions and 19 deletions
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue