Merge pull request #20996 from nextcloud/backport/20629/stable18

[stable18] Don't load text file preview when text app is available (Fixes: #20615)
This commit is contained in:
Roeland Jago Douma 2020-05-18 12:30:13 +02:00 committed by GitHub
commit f633336904
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,7 +152,8 @@ OCA.Sharing.PublicApp = {
img.attr('src', $('#downloadURL').val());
imgcontainer.appendTo('#imgframe');
} else if (mimetype.substr(0, mimetype.indexOf('/')) === 'text' && window.btoa) {
if (OC.appswebroots['files_texteditor'] !== undefined) {
if (OC.appswebroots['files_texteditor'] !== undefined ||
OC.appswebroots['text'] !== undefined) {
// the text editor handles the previewing
return;
}