Don't load text file preview when text app is available (Fixes: #20615)

When opening a shared text document, the files_sharing app uses
internal preview support in case no other app to open the text file is
available.

So far, it only checks for the old files_texteditor app, not for the new
new text app. This commit fixes this by checking for both.

Signed-off-by: Jonas Meurer <jonas@freesources.org>
This commit is contained in:
Jonas Meurer 2020-04-23 13:45:10 +02:00 committed by backportbot[bot]
parent 9d7198f31e
commit be37ca1776
1 changed files with 2 additions and 1 deletions

View File

@ -152,7 +152,8 @@ OCA.Sharing.PublicApp = {
img.attr('src', $('#downloadURL').val()); img.attr('src', $('#downloadURL').val());
imgcontainer.appendTo('#imgframe'); imgcontainer.appendTo('#imgframe');
} else if (mimetype.substr(0, mimetype.indexOf('/')) === 'text' && window.btoa) { } 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 // the text editor handles the previewing
return; return;
} }