From 36dc7b4523e799b312e68233c8e726f62b4cd137 Mon Sep 17 00:00:00 2001 From: Eric Rozell Date: Fri, 10 May 2024 10:01:41 -0700 Subject: [PATCH] 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 --- .../Libraries/LogBox/Data/LogBoxData.js | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/packages/react-native/Libraries/LogBox/Data/LogBoxData.js b/packages/react-native/Libraries/LogBox/Data/LogBoxData.js index abc2401ac42..34b1d5cb56d 100644 --- a/packages/react-native/Libraries/LogBox/Data/LogBoxData.js +++ b/packages/react-native/Libraries/LogBox/Data/LogBoxData.js @@ -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;