Skip to content

Commit cd41911

Browse files
committed
chore: rename ReactNativeFragmentPropsNames to ReactNativeFragmentArgNames, use them in example app
1 parent 0d54414 commit cd41911

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

android/src/main/java/com/callstack/reactnativebrownfield/ReactNativeFragment.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import android.util.Log
55
import android.view.LayoutInflater
66
import android.view.View
77
import android.view.ViewGroup
8-
import com.callstack.reactnativebrownfield.constants.ReactNativeInitialPropsNames
8+
import com.callstack.reactnativebrownfield.constants.ReactNativeFragmentArgNames
99
import com.facebook.react.ReactFragment
1010
import com.facebook.react.ReactHost
1111
import com.facebook.react.bridge.Callback
@@ -36,13 +36,13 @@ class ReactNativeFragment : ReactFragment(), PermissionAwareActivity {
3636
)
3737
}
3838

39-
moduleName = arguments?.getString(ReactNativeInitialPropsNames.ARG_MODULE_NAME)!!
39+
moduleName = arguments?.getString(ReactNativeFragmentArgNames.ARG_MODULE_NAME)!!
4040
this.reactDelegate =
4141
ReactDelegateWrapper(
4242
activity,
4343
this.reactHost,
4444
moduleName,
45-
arguments?.getBundle(ReactNativeInitialPropsNames.ARG_LAUNCH_OPTIONS)
45+
arguments?.getBundle(ReactNativeFragmentArgNames.ARG_LAUNCH_OPTIONS)
4646
)
4747
}
4848

@@ -113,9 +113,9 @@ class ReactNativeFragment : ReactFragment(), PermissionAwareActivity {
113113
): ReactNativeFragment {
114114
val fragment = ReactNativeFragment()
115115
val args = Bundle()
116-
args.putString(ReactNativeInitialPropsNames.ARG_MODULE_NAME, moduleName)
116+
args.putString(ReactNativeFragmentArgNames.ARG_MODULE_NAME, moduleName)
117117
if (initialProps != null) {
118-
args.putBundle(ReactNativeInitialPropsNames.ARG_LAUNCH_OPTIONS, initialProps)
118+
args.putBundle(ReactNativeFragmentArgNames.ARG_LAUNCH_OPTIONS, initialProps)
119119
}
120120
fragment.arguments = args
121121
return fragment

android/src/main/java/com/callstack/reactnativebrownfield/constants/ReactNativeInitialPropsNames.kt renamed to android/src/main/java/com/callstack/reactnativebrownfield/constants/ReactNativeFragmentArgNames.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import com.facebook.react.ReactFragment
55
/**
66
* Convenience export of arguments that can be used
77
*/
8-
class ReactNativeInitialPropsNames private constructor() :
8+
class ReactNativeFragmentArgNames private constructor() :
99
ReactFragment() // subclass to gain access to protected constants
1010
{
1111
companion object {

0 commit comments

Comments
 (0)