From a20436c236d07ebd9d73994c16d0652c7d17c9c8 Mon Sep 17 00:00:00 2001 From: Erik White <124187536+TimeAndRelativeDimensionInSpaceCadet@users.noreply.github.com> Date: Fri, 10 Oct 2025 10:02:28 -0500 Subject: [PATCH 1/2] Update turbo-native-modules-android.md `clear` method missing from java snippet for `NativeLocalStorageModule` implementation --- .../version-0.82/turbo-native-modules-android.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/versioned_docs/version-0.82/turbo-native-modules-android.md b/website/versioned_docs/version-0.82/turbo-native-modules-android.md index 2231baa9b21..21fbd7703e1 100644 --- a/website/versioned_docs/version-0.82/turbo-native-modules-android.md +++ b/website/versioned_docs/version-0.82/turbo-native-modules-android.md @@ -53,6 +53,12 @@ public class NativeLocalStorageModule extends NativeLocalStorageSpec { SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE); sharedPref.edit().remove(key).apply(); } + + @Override + public void clear() { + SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE); + sharedPref.edit().clear().apply(); + } } ``` From fdae18ba15ed0c180280e251d32f5b25fbc51da9 Mon Sep 17 00:00:00 2001 From: Erik White <124187536+TimeAndRelativeDimensionInSpaceCadet@users.noreply.github.com> Date: Tue, 14 Oct 2025 16:02:46 +0000 Subject: [PATCH 2/2] update unversioned file, and version docs --- docs/turbo-native-modules-android.md | 6 ++++++ .../version-0.77/turbo-native-modules-android.md | 6 ++++++ .../version-0.78/turbo-native-modules-android.md | 6 ++++++ .../version-0.79/turbo-native-modules-android.md | 6 ++++++ .../version-0.81/turbo-native-modules-android.md | 6 ++++++ 5 files changed, 30 insertions(+) diff --git a/docs/turbo-native-modules-android.md b/docs/turbo-native-modules-android.md index 2231baa9b21..21fbd7703e1 100644 --- a/docs/turbo-native-modules-android.md +++ b/docs/turbo-native-modules-android.md @@ -53,6 +53,12 @@ public class NativeLocalStorageModule extends NativeLocalStorageSpec { SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE); sharedPref.edit().remove(key).apply(); } + + @Override + public void clear() { + SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE); + sharedPref.edit().clear().apply(); + } } ``` diff --git a/website/versioned_docs/version-0.77/turbo-native-modules-android.md b/website/versioned_docs/version-0.77/turbo-native-modules-android.md index f910506dcf9..51b4c8cca29 100644 --- a/website/versioned_docs/version-0.77/turbo-native-modules-android.md +++ b/website/versioned_docs/version-0.77/turbo-native-modules-android.md @@ -53,6 +53,12 @@ public class NativeLocalStorageModule extends NativeLocalStorageSpec { SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE); sharedPref.edit().remove(key).apply(); } + + @Override + public void clear() { + SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE); + sharedPref.edit().clear().apply(); + } } ``` diff --git a/website/versioned_docs/version-0.78/turbo-native-modules-android.md b/website/versioned_docs/version-0.78/turbo-native-modules-android.md index 2231baa9b21..21fbd7703e1 100644 --- a/website/versioned_docs/version-0.78/turbo-native-modules-android.md +++ b/website/versioned_docs/version-0.78/turbo-native-modules-android.md @@ -53,6 +53,12 @@ public class NativeLocalStorageModule extends NativeLocalStorageSpec { SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE); sharedPref.edit().remove(key).apply(); } + + @Override + public void clear() { + SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE); + sharedPref.edit().clear().apply(); + } } ``` diff --git a/website/versioned_docs/version-0.79/turbo-native-modules-android.md b/website/versioned_docs/version-0.79/turbo-native-modules-android.md index 2231baa9b21..21fbd7703e1 100644 --- a/website/versioned_docs/version-0.79/turbo-native-modules-android.md +++ b/website/versioned_docs/version-0.79/turbo-native-modules-android.md @@ -53,6 +53,12 @@ public class NativeLocalStorageModule extends NativeLocalStorageSpec { SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE); sharedPref.edit().remove(key).apply(); } + + @Override + public void clear() { + SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE); + sharedPref.edit().clear().apply(); + } } ``` diff --git a/website/versioned_docs/version-0.81/turbo-native-modules-android.md b/website/versioned_docs/version-0.81/turbo-native-modules-android.md index 2231baa9b21..21fbd7703e1 100644 --- a/website/versioned_docs/version-0.81/turbo-native-modules-android.md +++ b/website/versioned_docs/version-0.81/turbo-native-modules-android.md @@ -53,6 +53,12 @@ public class NativeLocalStorageModule extends NativeLocalStorageSpec { SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE); sharedPref.edit().remove(key).apply(); } + + @Override + public void clear() { + SharedPreferences sharedPref = getReactApplicationContext().getSharedPreferences("my_prefs", Context.MODE_PRIVATE); + sharedPref.edit().clear().apply(); + } } ```