react-native-keyboard-controller 1.9.2 → 1.9.3

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.
@@ -2,6 +2,7 @@ package com.reactnativekeyboardcontroller.extensions
2
2
 
3
3
  import android.graphics.Rect
4
4
  import android.os.Build
5
+ import android.util.Log
5
6
  import android.view.View
6
7
  import androidx.annotation.RequiresApi
7
8
 
@@ -37,15 +38,12 @@ private val tmpIntArr = IntArray(2)
37
38
  */
38
39
  @RequiresApi(Build.VERSION_CODES.KITKAT)
39
40
  fun View.copyBoundsInWindow(rect: Rect) {
40
- if (isLaidOut && isAttachedToWindow) {
41
+ if (isAttachedToWindow) {
41
42
  rect.set(0, 0, width, height)
42
43
  getLocationInWindow(tmpIntArr)
43
44
  rect.offset(tmpIntArr[0], tmpIntArr[1])
44
45
  } else {
45
- throw IllegalArgumentException(
46
- "Can not copy bounds as view is not laid out" +
47
- " or attached to window",
48
- )
46
+ Log.w("View.copyBoundsInWindow", "Can not copy bounds as view is not attached to window")
49
47
  }
50
48
  }
51
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-keyboard-controller",
3
- "version": "1.9.2",
3
+ "version": "1.9.3",
4
4
  "description": "Keyboard manager which works in identical way on both iOS and Android",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",