Skip to content

Commit cab81ee

Browse files
authored
Merge pull request #89245 from shubham1206agra/knip-audit-export-81
[NO QA] Remove unused exports (batch 8)
2 parents 1b3fe18 + 6d39e87 commit cab81ee

15 files changed

Lines changed: 4 additions & 286 deletions

File tree

src/libs/Navigation/helpers/getAccountTabScreenToOpen.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/libs/Navigation/helpers/lastVisitedTabPathUtils/index.native.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,5 @@ function saveSettingsTabPathToSessionStorage(url: string) {}
99
function getWorkspacesTabStateFromSessionStorage() {
1010
return undefined;
1111
}
12-
function getSettingsTabStateFromSessionStorage() {
13-
return undefined;
14-
}
15-
16-
function getLastVisitedWorkspaceTabScreen() {
17-
return undefined;
18-
}
1912

20-
export {
21-
clearSessionStorage,
22-
getLastVisitedWorkspaceTabScreen,
23-
saveSettingsTabPathToSessionStorage,
24-
getSettingsTabStateFromSessionStorage,
25-
saveWorkspacesTabPathToSessionStorage,
26-
getWorkspacesTabStateFromSessionStorage,
27-
};
13+
export {clearSessionStorage, saveSettingsTabPathToSessionStorage, saveWorkspacesTabPathToSessionStorage, getWorkspacesTabStateFromSessionStorage};

src/libs/Navigation/helpers/lastVisitedTabPathUtils/index.ts

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import type {InitialState} from '@react-navigation/native';
2-
import {findFocusedRoute} from '@react-navigation/native';
31
import type {ValueOf} from 'type-fest';
42
import getStateFromPath from '@libs/Navigation/helpers/getStateFromPath';
53
import CONST from '@src/CONST';
@@ -44,23 +42,4 @@ function saveSettingsTabPathToSessionStorage(url: string) {
4442
saveTabPathToSessionStorage(CONST.SESSION_STORAGE_KEYS.LAST_VISITED_PATH.SETTINGS_TAB, url);
4543
}
4644

47-
function getSettingsTabStateFromSessionStorage() {
48-
return getTabStateFromSessionStorage(CONST.SESSION_STORAGE_KEYS.LAST_VISITED_PATH.SETTINGS_TAB);
49-
}
50-
51-
function getLastVisitedWorkspaceTabScreen() {
52-
const workspacesTabState = getWorkspacesTabStateFromSessionStorage();
53-
if (!workspacesTabState) {
54-
return undefined;
55-
}
56-
return findFocusedRoute(workspacesTabState as InitialState)?.name;
57-
}
58-
59-
export {
60-
clearSessionStorage,
61-
getLastVisitedWorkspaceTabScreen,
62-
saveSettingsTabPathToSessionStorage,
63-
getSettingsTabStateFromSessionStorage,
64-
saveWorkspacesTabPathToSessionStorage,
65-
getWorkspacesTabStateFromSessionStorage,
66-
};
45+
export {clearSessionStorage, saveSettingsTabPathToSessionStorage, saveWorkspacesTabPathToSessionStorage, getWorkspacesTabStateFromSessionStorage};

src/libs/Navigation/helpers/shouldStripRHPOnFullscreenPush/index.native.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/libs/Navigation/helpers/shouldStripRHPOnFullscreenPush/index.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/libs/Navigation/linkingConfig/RELATIONS/TAB_TO_FULLSCREEN.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/libs/Navigation/linkingConfig/RELATIONS/index.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import SEARCH_TO_RHP from './SEARCH_TO_RHP';
44
import SETTINGS_TO_RHP from './SETTINGS_TO_RHP';
55
import SIDEBAR_TO_RHP from './SIDEBAR_TO_RHP';
66
import SIDEBAR_TO_SPLIT from './SIDEBAR_TO_SPLIT';
7-
import TAB_TO_FULLSCREEN from './TAB_TO_FULLSCREEN';
87
import WORKSPACE_TO_RHP from './WORKSPACE_TO_RHP';
98
import WORKSPACES_LIST_TO_RHP from './WORKSPACES_LIST_TO_RHP';
109

@@ -34,20 +33,7 @@ const RHP_TO_SIDEBAR = createInverseRelation(SIDEBAR_TO_RHP);
3433
const SPLIT_TO_SIDEBAR = createInverseRelation(SIDEBAR_TO_SPLIT);
3534
const RHP_TO_WORKSPACES_LIST = createInverseRelation(WORKSPACES_LIST_TO_RHP);
3635
const RHP_TO_SEARCH = createInverseRelation(SEARCH_TO_RHP);
37-
const FULLSCREEN_TO_TAB = createInverseRelation(TAB_TO_FULLSCREEN);
3836
const RHP_TO_DOMAIN = createInverseRelation(DOMAIN_TO_RHP);
3937
const RHP_TO_HOME = createInverseRelation(HOME_TO_RHP);
4038

41-
export {
42-
RHP_TO_SETTINGS,
43-
RHP_TO_WORKSPACE,
44-
RHP_TO_SIDEBAR,
45-
RHP_TO_SEARCH,
46-
SIDEBAR_TO_SPLIT,
47-
SPLIT_TO_SIDEBAR,
48-
TAB_TO_FULLSCREEN,
49-
FULLSCREEN_TO_TAB,
50-
RHP_TO_WORKSPACES_LIST,
51-
RHP_TO_DOMAIN,
52-
RHP_TO_HOME,
53-
};
39+
export {RHP_TO_SETTINGS, RHP_TO_WORKSPACE, RHP_TO_SIDEBAR, RHP_TO_SEARCH, SIDEBAR_TO_SPLIT, SPLIT_TO_SIDEBAR, RHP_TO_WORKSPACES_LIST, RHP_TO_DOMAIN, RHP_TO_HOME};

src/libs/ReportActionsUtils.ts

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,41 +1663,6 @@ function isNewerReportAction(a: ReportAction, b: ReportAction): boolean {
16631663
return a.reportActionID > b.reportActionID;
16641664
}
16651665

1666-
/**
1667-
* Finds the newest report action matching each of two filter criteria in a single pass.
1668-
* Returns:
1669-
* - lastVisibleAction: newest visible action
1670-
* - lastActionForDisplay: newest displayable action (not CREATED)
1671-
*/
1672-
function findLastReportActions(reportActions: OnyxEntry<ReportActions>, canUserPerformWriteAction?: boolean) {
1673-
if (!reportActions) {
1674-
return {lastVisibleAction: undefined, lastActionForDisplay: undefined};
1675-
}
1676-
1677-
let lastVisibleAction: ReportAction | undefined;
1678-
let lastActionForDisplay: ReportAction | undefined;
1679-
1680-
for (const [key, action] of Object.entries(reportActions)) {
1681-
if (!action) {
1682-
continue;
1683-
}
1684-
1685-
if (shouldReportActionBeVisible(action, key, canUserPerformWriteAction)) {
1686-
if (!lastVisibleAction || isNewerReportAction(action, lastVisibleAction)) {
1687-
lastVisibleAction = action;
1688-
}
1689-
}
1690-
1691-
if (isReportActionVisibleAsLastAction(action, canUserPerformWriteAction) && action.actionName !== CONST.REPORT.ACTIONS.TYPE.CREATED) {
1692-
if (!lastActionForDisplay || isNewerReportAction(action, lastActionForDisplay)) {
1693-
lastActionForDisplay = action;
1694-
}
1695-
}
1696-
}
1697-
1698-
return {lastVisibleAction, lastActionForDisplay};
1699-
}
1700-
17011666
/**
17021667
* The first visible action is the second last action in sortedReportActions which satisfy following conditions:
17031668
* 1. That is not pending deletion as pending deletion actions are kept in sortedReportActions in memory.
@@ -4707,7 +4672,6 @@ export {
47074672
isCardIssuedAction,
47084673
getCardIssuedMessage,
47094674
getRemovedConnectionMessage,
4710-
findLastReportActions,
47114675
getFilteredReportActionsForReportView,
47124676
wasMessageReceivedWhileOffline,
47134677
shouldShowAddMissingDetails,

src/libs/actions/IOU/Split.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3442,8 +3442,6 @@ function createDistanceRequest(distanceRequestInformation: CreateDistanceRequest
34423442
export {
34433443
completeSplitBill,
34443444
createDistanceRequest,
3445-
createSplitsAndOnyxData,
3446-
getOrCreateOptimisticSplitChatReport,
34473445
splitBill,
34483446
splitBillAndOpenReport,
34493447
startSplitBill,

src/libs/actions/IOU/SplitExpenseItems.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,11 +606,9 @@ function clearSplitTransactionDraftErrors(transactionID: string | undefined) {
606606
}
607607

608608
export {
609-
getDistanceMerchantFromDistance,
610609
updateSplitExpenseDistanceFromAmount,
611610
initSplitExpenseItemData,
612611
initDraftSplitExpenseDataForEdit,
613-
redistributeSplitExpenseAmounts,
614612
addSplitExpenseField,
615613
evenlyDistributeSplitExpenseAmounts,
616614
resetSplitExpensesByDateRange,

0 commit comments

Comments
 (0)