Skip to content

Commit

Permalink
Clean up dead code in LogBoxStateSubscription
Browse files Browse the repository at this point in the history
Summary:
The removed code was moved to LogBoxInspectorContainer, and is not referenced inside the LogBoxStateSubscription component.

## Changelog

[Internal]

Differential Revision: D57168569
  • Loading branch information
rozele authored and facebook-github-bot committed May 10, 2024
1 parent c647950 commit 6b4b29d
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions packages/react-native/Libraries/LogBox/Data/LogBoxData.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,31 +449,6 @@ export function withSubscription(
this._subscription.unsubscribe();
}
}

_handleDismiss = (): void => {
// Here we handle the cases when the log is dismissed and it
// was either the last log, or when the current index
// is now outside the bounds of the log array.
const {selectedLogIndex, logs: stateLogs} = this.state;
const logsArray = Array.from(stateLogs);
if (selectedLogIndex != null) {
if (logsArray.length - 1 <= 0) {
setSelectedLog(-1);
} else if (selectedLogIndex >= logsArray.length - 1) {
setSelectedLog(selectedLogIndex - 1);
}

dismiss(logsArray[selectedLogIndex]);
}
};

_handleMinimize = (): void => {
setSelectedLog(-1);
};

_handleSetSelectedLog = (index: number): void => {
setSelectedLog(index);
};
}

return LogBoxStateSubscription;
Expand Down

0 comments on commit 6b4b29d

Please sign in to comment.