Skip to content

Commit 65cac63

Browse files
committed
minor fixes
- rename BottomSheetDialogState -> State - exclude Hidden
1 parent a67b35c commit 65cac63

File tree

1 file changed

+6
-9
lines changed
  • bottomsheetdialog-compose/src/main/kotlin/com/holix/android/bottomsheetdialog/compose

1 file changed

+6
-9
lines changed

bottomsheetdialog-compose/src/main/kotlin/com/holix/android/bottomsheetdialog/compose/BottomSheetDialog.kt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class BottomSheetDialogProperties constructor(
102102
*/
103103
@Immutable
104104
class BottomSheetBehaviorProperties(
105-
val state: BottomSheetDialogState = BottomSheetDialogState.Collapsed,
105+
val state: State = State.Collapsed,
106106
val maxWidth: Size = Size.NotSet,
107107
val maxHeight: Size = Size.NotSet,
108108
val isDraggable: Boolean = true,
@@ -151,15 +151,13 @@ class BottomSheetBehaviorProperties(
151151
}
152152

153153
@Immutable
154-
enum class BottomSheetDialogState {
154+
enum class State {
155155
@Stable
156156
Expanded,
157157
@Stable
158158
HalfExpanded,
159159
@Stable
160-
Collapsed,
161-
@Stable
162-
Hidden
160+
Collapsed
163161
}
164162

165163
@JvmInline
@@ -486,10 +484,9 @@ private class BottomSheetDialogWrapper(
486484

487485
private fun setBehaviorProperties(behaviorProperties: BottomSheetBehaviorProperties) {
488486
this.behavior.state = when (behaviorProperties.state) {
489-
BottomSheetBehaviorProperties.BottomSheetDialogState.Expanded -> STATE_EXPANDED
490-
BottomSheetBehaviorProperties.BottomSheetDialogState.Collapsed -> STATE_COLLAPSED
491-
BottomSheetBehaviorProperties.BottomSheetDialogState.HalfExpanded -> STATE_HALF_EXPANDED
492-
BottomSheetBehaviorProperties.BottomSheetDialogState.Hidden -> STATE_HIDDEN
487+
BottomSheetBehaviorProperties.State.Expanded -> STATE_EXPANDED
488+
BottomSheetBehaviorProperties.State.Collapsed -> STATE_COLLAPSED
489+
BottomSheetBehaviorProperties.State.HalfExpanded -> STATE_HALF_EXPANDED
493490
}
494491
this.behavior.maxWidth = behaviorProperties.maxWidth.value
495492
this.behavior.maxHeight = behaviorProperties.maxHeight.value

0 commit comments

Comments
 (0)