Skip to content

Commit

Permalink
feat: support react-native 0.74 (newArch) on Android (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
hexadecy authored Nov 9, 2024
1 parent e30e8b2 commit 66389e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class LocalizationSettingsModule internal constructor(context: ReactApplicationC
/**
* Expose constants to react-native
**/
override fun getConstants(): MutableMap<String, String?>? {
override fun getTypedExportedConstants(): MutableMap<String, String?>? {
val constants: MutableMap<String, String?> = HashMap()
constants["language"] = getCurrentLanguage()
return constants
Expand Down
5 changes: 5 additions & 0 deletions android/src/oldarch/LocalizationSettingsSpec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ abstract class LocalizationSettingsSpec internal constructor(context: ReactAppli

abstract fun getLanguage(promise: Promise)
abstract fun setLanguage(language: String)
abstract fun getTypedExportedConstants(): Map<String, String?>?

override fun getConstants(): Map<String, String?>? {
return getTypedExportedConstants()
}
}

0 comments on commit 66389e9

Please sign in to comment.