Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/SplashScreenStateContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type {ValueOf} from 'type-fest';
import CONFIG from './CONFIG';
import CONST from './CONST';
import {addBootsplashBreadcrumb} from './libs/telemetry/bootsplashTelemetry';
import loadUnreadIndicatorUpdater from './libs/UnreadIndicatorUpdater/load';
import type ChildrenProps from './types/utils/ChildrenProps';

type SplashScreenState = ValueOf<typeof CONST.BOOT_SPLASH_STATE>;
Expand All @@ -26,7 +27,7 @@ const SplashScreenActionsContext = React.createContext<SplashScreenActionsContex
function loadPostSplashScreenModules() {
import('./libs/actions/replaceOptimisticReportWithActualReport');
import('./libs/registerPaginationConfig');
import('./libs/UnreadIndicatorUpdater');
loadUnreadIndicatorUpdater();
}

function SplashScreenStateContextProvider({children}: ChildrenProps) {
Expand Down
6 changes: 6 additions & 0 deletions src/libs/UnreadIndicatorUpdater/load.android.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* `updateUnread` is a no-op on Android (there is no tab title or app icon badge to update), so we skip loading
* the updater entirely. This keeps the module and its Onyx subscriptions out of the Android bundle, avoiding a
* walk over every report on each update only to discard the result.
*/
export default function loadUnreadIndicatorUpdater() {}
7 changes: 7 additions & 0 deletions src/libs/UnreadIndicatorUpdater/load.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/**
* Loads the unread indicator updater, which registers the Onyx subscriptions that keep the unread count
* (browser tab title on web, app icon badge on iOS) in sync.
*/
export default function loadUnreadIndicatorUpdater() {
import('.');
}
Loading