Skip to content

Commit e493a21

Browse files
committed
little refactor
1 parent 49918cb commit e493a21

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

android/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/TitleAndButtonsMeasurer.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@ fun makeTitleAtMostWidthMeasureSpec(containerWidth: Int, rightBarWidth: Int, lef
2020
View.MeasureSpec.makeMeasureSpec(containerWidth, View.MeasureSpec.AT_MOST)
2121
} else {
2222
val availableWidth = containerWidth - rightBarWidth - leftBarWidth - 2 * DEFAULT_LEFT_MARGIN_PX
23-
if (isFill) {
24-
View.MeasureSpec.makeMeasureSpec(availableWidth, View.MeasureSpec.EXACTLY)
25-
} else {
26-
View.MeasureSpec.makeMeasureSpec(availableWidth, View.MeasureSpec.AT_MOST)
27-
}
23+
View.MeasureSpec.makeMeasureSpec(
24+
availableWidth,
25+
if (isFill) View.MeasureSpec.EXACTLY else View.MeasureSpec.AT_MOST
26+
)
2827
}
2928
}
3029

0 commit comments

Comments
 (0)