From 3c15b68d565ac6f5bae782dac3a3fa5ca66f821d Mon Sep 17 00:00:00 2001 From: Christoph Purrer Date: Tue, 25 Jul 2023 15:04:31 -0700 Subject: [PATCH] Remove need for platform overrides to Settings (#38607) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/38607 Today, any host platform implementation of React Native must add Settings.platform.js. - https://github.com/microsoft/react-native-windows/blob/0.71-stable/vnext/src/Libraries/Settings/Settings.windows.js Now they don't have to do it anymore. For this case, macOS actually wants to share the iOS specific logic > https://github.com/microsoft/react-native-macos/blob/main/Libraries/Settings/Settings.macos.js Changelog: [General] [Fixed] - [Settings] Remove need for platform overrides to Settings Reviewed By: rozele Differential Revision: D47747018 fbshipit-source-id: 8e4e8d318b3285a9a64e0b4f052f721f6242f871 --- .../Settings/{Settings.android.js => Settings.js} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename packages/react-native/Libraries/Settings/{Settings.android.js => Settings.js} (64%) diff --git a/packages/react-native/Libraries/Settings/Settings.android.js b/packages/react-native/Libraries/Settings/Settings.js similarity index 64% rename from packages/react-native/Libraries/Settings/Settings.android.js rename to packages/react-native/Libraries/Settings/Settings.js index 4a11b74a52910c..9687df6108d236 100644 --- a/packages/react-native/Libraries/Settings/Settings.android.js +++ b/packages/react-native/Libraries/Settings/Settings.js @@ -12,21 +12,21 @@ const Settings = { get(key: string): mixed { - console.warn('Settings is not yet supported on Android'); + console.warn('Settings is not yet supported on this platform.'); return null; }, set(settings: Object) { - console.warn('Settings is not yet supported on Android'); + console.warn('Settings is not yet supported on this platform.'); }, watchKeys(keys: string | Array, callback: Function): number { - console.warn('Settings is not yet supported on Android'); + console.warn('Settings is not yet supported on this platform.'); return -1; }, clearWatch(watchId: number) { - console.warn('Settings is not yet supported on Android'); + console.warn('Settings is not yet supported on this platform.'); }, };