Skip to content

Commit

Permalink
fix(#192): unnecessary offset for root view on Android
Browse files Browse the repository at this point in the history
I have no clue why that code was even included here
  • Loading branch information
mateusz1913 committed Nov 13, 2023
1 parent 93df141 commit 0e28c29
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import android.view.View
import android.widget.ScrollView
import com.facebook.react.bridge.UiThreadUtil
import com.facebook.react.uimanager.PixelUtil
import com.reactnativeavoidsoftinput.AvoidSoftInputView
import com.reactnativeavoidsoftinput.convertFromPixelToDIP
import com.reactnativeavoidsoftinput.getRootViewBottomInset
import com.reactnativeavoidsoftinput.getViewDistanceToBottomEdge
import kotlin.math.max
import kotlin.math.min
Expand Down Expand Up @@ -203,10 +201,6 @@ class AnimationHandlerImpl : AnimationHandler {

mBottomOffset = max(to - currentFocusedViewDistanceToBottom, 0).toFloat() + mAvoidOffset

if (rootView !is AvoidSoftInputView) {
mBottomOffset += getRootViewBottomInset(focusedView)
}

if (mBottomOffset <= 0F) {
return
}
Expand Down

0 comments on commit 0e28c29

Please sign in to comment.