feat(settings): add expanded video auto-unmute preference (#1104)

* feat(settings): add expanded video auto-unmute preference

* fix(translations): add missing unmute labels

* fix(translations): localize unmute label
This commit is contained in:
Tommaso Casaburi
2026-03-17 19:09:29 +08:00
committed by GitHub
parent 8c37258f20
commit 714c39cf47
42 changed files with 182 additions and 40 deletions
+5 -1
View File
@@ -32,15 +32,19 @@ describe('ui state stores', () => {
expect(store.getState().selectedText).toBe('');
});
it('useExpandedMediaStore persists fitExpandedImagesToScreen', async () => {
it('useExpandedMediaStore persists expanded media preferences', async () => {
const store = (await import('../use-expanded-media-store')).default;
expect(store.getState().fitExpandedImagesToScreen).toBe(false);
expect(store.getState().unmuteExpandedVideoSound).toBe(false);
store.getState().setFitExpandedImagesToScreen(true);
store.getState().setUnmuteExpandedVideoSound(true);
expect(store.getState().fitExpandedImagesToScreen).toBe(true);
expect(store.getState().unmuteExpandedVideoSound).toBe(true);
expect(localStorage.getItem('expanded-media-store')).toContain('fitExpandedImagesToScreen');
expect(localStorage.getItem('expanded-media-store')).toContain('unmuteExpandedVideoSound');
});
it('useSubplebbitOfflineStore merges updates and clears initialLoad after the timeout', async () => {