From 1726aaa92176099ef4251a58821de4a21054ad26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= <14975046+skjnldsv@users.noreply.github.com> Date: Fri, 23 Oct 2026 09:10:58 +0200 Subject: [PATCH] feat(viewer): let a user choose original images over previews MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com> --- apps/viewer/lib/ConfigLexicon.php | 7 +++++++ apps/viewer/tests/Service/UserConfigTest.php | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) 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 {