File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
android/src/main/java/com/swmansion/rnscreens/bottomsheet Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -132,15 +132,15 @@ class SheetDelegate(
132132 contentWrapper.isLaidOutOrHasCachedLayout()
133133 }
134134 }
135- false -> (screen.sheetDetents.last () * containerHeight).toInt()
135+ false -> (screen.sheetDetents.highest () * containerHeight).toInt()
136136 }
137137
138138 // For 3 detents, we need to add the top inset back here because we are calculating the offset
139139 // from the absolute top of the view, but our calculated max height (containerHeight)
140140 // has been reduced by this inset.
141141 val expandedOffsetFromTop =
142- when (screen.sheetDetents.count() ) {
143- 3 -> (( 1 - screen.sheetDetents[ 2 ]) * containerHeight).toInt() + lastTopInset
142+ when (screen.sheetDetents.count) {
143+ 3 -> screen.sheetDetents.expandedOffsetFromTop(containerHeight, lastTopInset)
144144 else -> null
145145 }
146146
You can’t perform that action at this time.
0 commit comments