stremio-web/src/common
AK b7f7a3d2ed fix(fullscreen): consume FullscreenProvider, remove per-instance state
useFullscreen is now a thin useContext consumer of FullscreenProvider,
so all callers share a single fullscreen state owned by the app root.

Why this fixes the desync bug:

stremio-router keeps multiple route layers mounted at once, and each
top-level route (Board, Discover, Library, Calendar, Addons, Settings,
Search) renders its own MainNavBars -> HorizontalNavBar -> useFullscreen.
The previous hook held local useState plus its own listeners, so each
route had an independent boolean. Entering fullscreen, then navigating
to another tab, mounted a fresh hook initialized to false; the icon
flipped back to "enter fullscreen" and clicking it re-requested
fullscreen on top of the existing one, leaving the UI unresponsive
until a route remount happened to coincide with reality.

With one provider above the router, state outlives route remounts and
listeners are attached exactly once. The hook's return tuple shape
([fullscreen, requestFullscreen, exitFullscreen, toggleFullscreen]) is
preserved, so all three call sites (HorizontalNavBar, NavMenuContent,
Player) keep working with no API change.

Also removes the legacy src/common/useFullscreen.ts and routes its
imports through stremio/common/Fullscreen (and the stremio/common
barrel for App.js / Player).

Note: MainNavBars is still rendered per-route. Lifting it to a single
app-level layout above the router is a worthwhile follow-up (eliminates
6+ duplicate mounts) but carries non-trivial CSS / useRouteFocused /
stacked-route risk and is out of scope for this PR; tracking separately.

Made-with: Cursor
2026-04-27 01:52:02 -04:00
..
FileDrop chore: fix all typos and misspellings 2025-09-27 16:23:06 +03:00
Fullscreen feat(common): add FullscreenProvider + context module 2026-04-27 01:50:14 -04:00
Platform refactor: improve ios vision os detection 2026-03-04 13:53:40 +02:00
Shortcuts chore(shortcuts): add enabled param to onShortcut hook 2026-04-06 21:25:56 +03:00
Toast feat: add loading state 2026-03-31 12:56:08 +03:00
Tooltips fix: tooltips style position issue 2024-12-11 17:07:01 +01:00
animations.less feat(player): add transitions to menus 2026-04-02 09:53:20 +02:00
CONSTANTS.js feat(player): sort subtitles menu languages by default language 2026-04-01 22:39:48 +02:00
CoreSuspender.js chore: update eslint 2024-10-07 12:17:33 +02:00
getVisibleChildrenRange.js refactor: update copyright header year 2023-06-09 19:16:32 +02:00
index.js fix(fullscreen): consume FullscreenProvider, remove per-instance state 2026-04-27 01:52:02 -04:00
interfaceLanguages.json chore: update langs 2026-03-06 14:27:33 +01:00
languageNames.json languageNames moved to common 2020-03-14 23:46:48 +02:00
languages.ts fix: normalize subtitles languages from player menu 2026-04-01 17:32:24 +02:00
routesRegexp.js fix(common): allow board regex to match empty 2025-05-27 20:26:02 +02:00
screen-sizes.less refactor(NextVideoPopup): remove desc & styles 2025-01-20 09:52:53 +02:00
useAnimationFrame.js refactor: update copyright header year 2023-06-09 19:16:32 +02:00
useBinaryState.d.ts fix: lint 2024-10-07 13:43:53 +02:00
useBinaryState.js refactor: update copyright header year 2023-06-09 19:16:32 +02:00
useInterval.ts feat: support holding click for subtitles settings 2025-07-03 08:45:22 +02:00
useLanguageSorting.ts fix(Settings): correctly sort without matchingidx 2025-06-25 16:59:16 +03:00
useLiveRef.js refactor: update copyright header year 2023-06-09 19:16:32 +02:00
useModelState.js chore: replace deprecated lodash.isequal 2026-01-14 03:12:15 +01:00
useNotifications.d.ts chore: fix all typos and misspellings 2025-09-27 16:23:06 +03:00
useNotifications.js feat: add notification counter on library items 2023-07-31 20:09:49 +02:00
useOnScrollToBottom.js refactor: update copyright header year 2023-06-09 19:16:32 +02:00
useOrientation.ts fix(useOrientation): fix hook return value 2025-02-25 15:04:27 +02:00
useOutsideClick.ts chore: update eslint 2024-10-07 12:17:33 +02:00
usePlayUrl.ts feat: add loading state 2026-03-31 12:56:08 +03:00
useProfile.d.ts chore: update eslint 2024-10-07 12:17:33 +02:00
useProfile.js refactor: update copyright header year 2023-06-09 19:16:32 +02:00
usePWA.js refactor: usePWA 2023-11-17 18:35:51 +02:00
useSettings.ts feat(shell): implement escape key fullscreen behavior 2025-04-01 12:23:42 +02:00
useShell.ts feat(shell): implement pause on minimize setting 2025-04-01 16:36:00 +02:00
useStreamingServer.d.ts chore: update eslint 2024-10-07 12:17:33 +02:00
useStreamingServer.js refactor: update copyright header year 2023-06-09 19:16:32 +02:00
useTimeout.ts feat: support holding click for subtitles settings 2025-07-03 08:45:22 +02:00
useTorrent.js refactor: change type to info 2026-03-31 13:45:08 +03:00
useTranslate.js fix(Discover): dropdown options translations 2025-05-28 13:36:21 +03:00