react-native-sheet2 1.2.2 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,7 @@ fun androidx.fragment.app.Fragment.safeShow(
23
23
  ) {
24
24
  val ft = manager.beginTransaction()
25
25
  ft.add(this, tag)
26
- ft.commitAllowingStateLoss()
26
+ ft.commitNowAllowingStateLoss()
27
27
  }
28
28
 
29
29
  class FullScreenDialog(
@@ -39,8 +39,8 @@ class AppFittedSheet(context: Context) : ViewGroup(context), LifecycleEventListe
39
39
  field = value
40
40
  }
41
41
 
42
- private val dismissible: Boolean
43
- get() = params.bool("dismissible", true)
42
+ private val dismissable: Boolean
43
+ get() = params.bool("dismissable", true)
44
44
  private val topLeftRightCornerRadius: Float
45
45
  get() = params.float("topLeftRightCornerRadius", 0f)
46
46
  private val backgroundColor: Int
@@ -65,7 +65,7 @@ class AppFittedSheet(context: Context) : ViewGroup(context), LifecycleEventListe
65
65
  if (sheet == null) {
66
66
  val fragment = FragmentModalBottomSheet(
67
67
  modalView = mHostView,
68
- dismissible = dismissible,
68
+ dismissable = dismissable,
69
69
  isSystemUILight = isSystemUILight
70
70
  ) {
71
71
  println("😀 onDismiss")
@@ -13,7 +13,7 @@ import java.lang.ref.WeakReference
13
13
 
14
14
  class FragmentModalBottomSheet(
15
15
  private val modalView: ViewGroup,
16
- private val dismissible: Boolean,
16
+ private val dismissable: Boolean,
17
17
  private val isSystemUILight: Boolean,
18
18
  private val onDismiss: () -> Unit
19
19
  ) : BottomSheetDialogFragment() {
@@ -29,7 +29,7 @@ class FragmentModalBottomSheet(
29
29
  ): View = modalView
30
30
 
31
31
  override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
32
- this.isCancelable = dismissible
32
+ this.isCancelable = dismissable
33
33
  val dialog = CustomBottomSheetDialog(requireContext(), R.style.AppBottomSheetDialog)
34
34
  dialog.setSheetBackgroundColor(Color.TRANSPARENT)
35
35
  dialog.window?.let {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-sheet2",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "Native implementation of Bottom sheet",
5
5
  "main": "src/index",
6
6
  "module": "src/index",
@@ -14,7 +14,7 @@ export const _FittedSheet = requireNativeComponent<any>('SheetView');
14
14
 
15
15
  export interface FittedSheetParams {
16
16
  readonly applyMaxHeightToMinHeight?: boolean;
17
- readonly dismissible?: boolean;
17
+ readonly dismissable?: boolean;
18
18
  readonly maxPortraitWidth?: number;
19
19
  readonly maxLandscapeWidth?: number;
20
20
  readonly maxHeight?: number;