Only load viewer in settings if the viewer app is enabled

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
pull/22650/head
Morris Jobke 6 years ago
parent 3eb748fc39
commit ce1e873a0a
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
  1. 3
      apps/settings/lib/Settings/Personal/ServerDevNotice.php

@ -77,6 +77,9 @@ class ServerDevNotice implements ISettings {
$hasInitialState = false;
// viewer is default enabled and this makes a zero-cost assertion for Psalm
assert(class_exists(LoadViewer::class));
// If the Reasons to use Nextcloud.pdf file is here, let's init Viewer
if ($userFolder->nodeExists('Reasons to use Nextcloud.pdf')) {
$this->eventDispatcher->dispatch(LoadViewer::class, new LoadViewer());

Loading…
Cancel
Save