Skip to content

Commit d1ac3f2

Browse files
mikepitreclaude
andcommitted
test(expo): clear only Clerk storage on an Android scope change
Deleting every shared preferences file also reset the dev menu onboarding, so each new scope reopened it. The footer also gets the same bottom inset on Android, where it sat under the gesture bar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent d3d58a7 commit d1ac3f2

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

‎integration/templates/expo-native/modules/verify-launch-config/android/src/main/java/expo/modules/verifylaunchconfig/VerifyLaunchConfigModule.kt‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ package expo.modules.verifylaunchconfig
33
import android.content.Context
44
import expo.modules.kotlin.modules.Module
55
import expo.modules.kotlin.modules.ModuleDefinition
6-
import java.io.File
76

87
private const val PREFERENCES = "verify_launch_config"
98
private const val STORAGE_SCOPE_KEY = "storageScope"
9+
private val CLERK_STORAGE = listOf("clerk_preferences", "SecureStore")
1010

1111
class VerifyLaunchConfigModule : Module() {
1212
override fun definition() = ModuleDefinition {
@@ -27,10 +27,7 @@ class VerifyLaunchConfigModule : Module() {
2727
return@Function
2828
}
2929

30-
File(context.applicationInfo.dataDir, "shared_prefs").listFiles()
31-
?.map { it.nameWithoutExtension }
32-
?.filter { it != PREFERENCES }
33-
?.forEach { context.deleteSharedPreferences(it) }
30+
CLERK_STORAGE.forEach { context.deleteSharedPreferences(it) }
3431
preferences.edit().putString(STORAGE_SCOPE_KEY, scope).commit()
3532
}
3633
}

‎integration/templates/expo-native/verify/VerifyHost.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ const styles = StyleSheet.create({
279279
color: '#6B6B76',
280280
fontFamily: Platform.select({ ios: 'Menlo', default: 'monospace' }),
281281
fontSize: 9,
282-
paddingBottom: Platform.select({ ios: 28, default: 12 }),
282+
paddingBottom: 28,
283283
paddingHorizontal: 12,
284284
paddingTop: 6,
285285
},

0 commit comments

Comments
 (0)