diff --git a/apps/viewer/lib/ConfigLexicon.php b/apps/viewer/lib/ConfigLexicon.php index f4074f2808133..5829b6d5d06fc 100644 --- a/apps/viewer/lib/ConfigLexicon.php +++ b/apps/viewer/lib/ConfigLexicon.php @@ -25,6 +25,7 @@ class ConfigLexicon implements ILexicon { public const SLIDESHOW_DELAY = 'slideshow_delay'; public const VOLUME = 'volume'; public const MUTED = 'muted'; + public const ORIGINAL_IMAGES = 'original_images'; #[\Override] public function getStrictness(): Strictness { @@ -57,6 +58,12 @@ public function getUserConfigs(): array { defaultRaw: false, definition: 'Whether videos and audio start muted', ), + new Entry( + self::ORIGINAL_IMAGES, + ValueType::BOOL, + defaultRaw: false, + definition: 'Whether images are shown from the file itself rather than from a preview', + ), ]; } } diff --git a/apps/viewer/tests/Service/UserConfigTest.php b/apps/viewer/tests/Service/UserConfigTest.php index 7d185599c3906..f6d018fd60952 100644 --- a/apps/viewer/tests/Service/UserConfigTest.php +++ b/apps/viewer/tests/Service/UserConfigTest.php @@ -91,9 +91,10 @@ public function testReadsEverySettingTheLexiconDeclares(): void { ]); $this->getAutoMock(IUserConfig::class)->method('getValueBool')->willReturnMap([ ['alice', 'viewer', 'muted', false, false, true], + ['alice', 'viewer', 'original_images', false, false, true], ]); - $this->assertSame(['slideshow_delay' => 10, 'volume' => 40, 'muted' => true], $this->config->getConfigs()); + $this->assertSame(['slideshow_delay' => 10, 'volume' => 40, 'muted' => true, 'original_images' => true], $this->config->getConfigs()); } public function testNeedsAUser(): void {