mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Clean up dead code in LogBoxStateSubscription (#44513)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44513 The removed code was moved to LogBoxInspectorContainer, and is not referenced inside the LogBoxStateSubscription component. ## Changelog [Internal] Reviewed By: GijsWeterings Differential Revision: D57168569 fbshipit-source-id: 07f843b2df126cc05f65937dd44781525d6afeb4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
143e31058c
commit
36dc7b4523
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user