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
2 changes: 1 addition & 1 deletion src/hooks/useRootNavigationState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Selector<T> = (state: NavigationState | undefined) => T;
function useRootNavigationState<T>(selector: Selector<T>): T {
const [result, setResult] = useState<T>(() => {
if (!navigationRef.isReady()) {
Log.warn('[src/hooks/useRootNavigationState.ts] NavigationRef is not ready. Returning selector value with undefined.');
Log.hmmm('[src/hooks/useRootNavigationState.ts] NavigationRef is not ready. Returning selector value with undefined.');
return selector(undefined);
}
return selector(navigationRef.getRootState());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type AdaptStateIfNecessaryArgs = {
*/
function adaptStateIfNecessary({state, options: {sidebarScreen, defaultCentralScreen, parentRoute}}: AdaptStateIfNecessaryArgs) {
if (!navigationRef.isReady()) {
Log.warn('[src/libs/Navigation/AppNavigator/createSplitNavigator/SplitRouter.ts] NavigationRef is not ready. Returning the original state without adaptation.');
Log.hmmm('[src/libs/Navigation/AppNavigator/createSplitNavigator/SplitRouter.ts] NavigationRef is not ready. Returning the original state without adaptation.');
}

const isNarrowLayout = getIsNarrowLayout();
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Navigation/Navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function getActiveRoute(): string {
function getReportRHPActiveRoute(): string {
// Safe handling when navigation is not yet initialized
if (!navigationRef.isReady()) {
Log.warn('[src/libs/Navigation/Navigation.ts] NavigationRef is not ready. Returning empty string.');
Log.hmmm('[src/libs/Navigation/Navigation.ts] NavigationRef is not ready. Returning empty string.');
return '';
}
if (isReportOpenInRHP(navigationRef.getRootState())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import SCREENS from '@src/SCREENS';

const isOnSearchMoneyRequestReportPage = (): boolean => {
if (!navigationRef.isReady()) {
Log.warn('[src/libs/Navigation/helpers/isOnSearchMoneyRequestReportPage.ts] NavigationRef is not ready. Returning false.');
Log.hmmm('[src/libs/Navigation/helpers/isOnSearchMoneyRequestReportPage.ts] NavigationRef is not ready. Returning false.');
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/libs/Navigation/helpers/navigateToWorkspacesPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Params = {
// Gets the latest workspace navigation state, restoring from session or preserved state if needed.
const getWorkspaceNavigationRouteState = () => {
if (!navigationRef.isReady()) {
Log.warn('[src/libs/Navigation/helpers/navigateToWorkspacesPage.ts] NavigationRef is not ready. Returning empty object.');
Log.hmmm('[src/libs/Navigation/helpers/navigateToWorkspacesPage.ts] NavigationRef is not ready. Returning empty object.');
return {};
}

Expand Down
2 changes: 1 addition & 1 deletion src/libs/actions/Session/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
import type Session from '@src/types/onyx/Session';
import type {AutoAuthState} from '@src/types/onyx/Session';
import pkg from '../../../../package.json';
import clearCache from './clearCache';

Check warning on line 71 in src/libs/actions/Session/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Unexpected parent import '../Attachment'. Use '@userActions/Attachment' instead
import updateSessionAuthTokens from './updateSessionAuthTokens';

const INVALID_TOKEN = 'pizza';
Expand All @@ -80,7 +80,7 @@
let hasSwitchedAccountInHybridMode = false;

Onyx.connect({
key: ONYXKEYS.SESSION,

Check warning on line 83 in src/libs/actions/Session/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
callback: (value) => {
session = value ?? {};

Expand All @@ -105,19 +105,19 @@

let stashedSession: Session = {};
Onyx.connect({
key: ONYXKEYS.STASHED_SESSION,

Check warning on line 108 in src/libs/actions/Session/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
callback: (value) => (stashedSession = value ?? {}),
});

let credentials: Credentials = {};
Onyx.connect({
key: ONYXKEYS.CREDENTIALS,

Check warning on line 114 in src/libs/actions/Session/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
callback: (value) => (credentials = value ?? {}),
});

let stashedCredentials: Credentials = {};
Onyx.connect({
key: ONYXKEYS.STASHED_CREDENTIALS,

Check warning on line 120 in src/libs/actions/Session/index.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
callback: (value) => (stashedCredentials = value ?? {}),
});

Expand Down Expand Up @@ -991,7 +991,7 @@
Navigation.isNavigationReady().then(() => {
// Safe handling when navigation is not yet initialized
if (!navigationRef.isReady()) {
Log.warn('[src/libs/actions/Session/index.ts] NavigationRef is not ready. Returning undefined.');
Log.hmmm('[src/libs/actions/Session/index.ts] NavigationRef is not ready. Returning undefined.');
return undefined;
}
navigationRef.resetRoot({index: 0, routes: [{name: NAVIGATORS.REPORTS_SPLIT_NAVIGATOR}]});
Expand Down
Loading