Skip to content

Commit

Permalink
async-storage 패키지 추가 (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuTaK97 authored Dec 12, 2023
1 parent a2d5f25 commit 5330cba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/src/main/java/com/wafflestudio/snutt2/SNUTTApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.facebook.react.ReactPackage
import com.facebook.react.bridge.JavaScriptExecutorFactory
import com.facebook.react.shell.MainReactPackage
import com.horcrux.svg.SvgPackage
import com.reactnativecommunity.asyncstorage.AsyncStoragePackage
import com.reactnativecommunity.picker.RNCPickerPackage
import com.swmansion.gesturehandler.RNGestureHandlerPackage
import com.swmansion.reanimated.ReanimatedPackage
Expand Down Expand Up @@ -48,6 +49,7 @@ class SNUTTApplication : Application(), ReactApplication {
SafeAreaContextPackage(),
ReanimatedPackage(),
SvgPackage(),
AsyncStoragePackage(),
)

override fun getJSMainModuleName(): String = "friends"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.facebook.react.ReactRootView
import com.facebook.react.common.LifecycleState
import com.facebook.react.shell.MainReactPackage
import com.horcrux.svg.SvgPackage
import com.reactnativecommunity.asyncstorage.AsyncStoragePackage
import com.reactnativecommunity.picker.RNCPickerPackage
import com.swmansion.gesturehandler.RNGestureHandlerPackage
import com.swmansion.reanimated.ReanimatedPackage
Expand Down Expand Up @@ -69,7 +70,7 @@ class ReactNativeBundleManager @Inject constructor(
.setJavaScriptExecutorFactory(HermesExecutorFactory())
.setJSBundleFile(bundleFile.absolutePath)
.addPackages(
listOf(MainReactPackage(), RNGestureHandlerPackage(), ReanimatedPackage(), SafeAreaContextPackage(), RNCPickerPackage(), SvgPackage()),
listOf(MainReactPackage(), RNGestureHandlerPackage(), ReanimatedPackage(), SafeAreaContextPackage(), RNCPickerPackage(), SvgPackage(), AsyncStoragePackage()),
)
.setInitialLifecycleState(LifecycleState.RESUMED)
.build()
Expand All @@ -84,6 +85,7 @@ class ReactNativeBundleManager @Inject constructor(
putString("x-access-apikey", context.getString(R.string.api_key))
putString("theme", if (isDarkMode(activityContext, theme)) "dark" else "light")
putBoolean("allowFontScaling", true)
putStringArrayList("feature", arrayListOf("ASYNC_STORAGE"))
},
)
}
Expand Down
Binary file not shown.

0 comments on commit 5330cba

Please sign in to comment.