-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix non-dismissable bottom sheets being dismissable on backpress (#1577)
Resolves #1549 Opportunistically cleaned up some docs and removed unnecessary default param values for the private primary constructor.
- Loading branch information
Showing
6 changed files
with
97 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...overlays/src/androidMain/kotlin/com/slack/circuitx/overlays/BottomSheetOverlay.android.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (C) 2024 Slack Technologies, LLC | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package com.slack.circuitx.overlays | ||
|
||
import androidx.compose.material3.ExperimentalMaterial3Api | ||
import androidx.compose.material3.ModalBottomSheetProperties | ||
|
||
@OptIn(ExperimentalMaterial3Api::class) | ||
internal actual fun createBottomSheetProperties( | ||
isFocusable: Boolean, | ||
shouldDismissOnBackPress: Boolean, | ||
): ModalBottomSheetProperties { | ||
return ModalBottomSheetProperties( | ||
DEFAULT_PROPERTIES.securePolicy, | ||
isFocusable, | ||
shouldDismissOnBackPress, | ||
) | ||
} |
14 changes: 14 additions & 0 deletions
14
...uitx/overlays/src/browserMain/kotlin/com/slack/circuitx/overlays/BottomSheetOverlay.js.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright (C) 2024 Slack Technologies, LLC | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package com.slack.circuitx.overlays | ||
|
||
import androidx.compose.material3.ExperimentalMaterial3Api | ||
import androidx.compose.material3.ModalBottomSheetProperties | ||
|
||
@OptIn(ExperimentalMaterial3Api::class) | ||
internal actual fun createBottomSheetProperties( | ||
isFocusable: Boolean, | ||
shouldDismissOnBackPress: Boolean, | ||
): ModalBottomSheetProperties { | ||
return ModalBottomSheetProperties(isFocusable, shouldDismissOnBackPress) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
circuitx/overlays/src/jvmMain/kotlin/com/slack/circuitx/overlays/BottomSheetOverlay.jvm.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright (C) 2024 Slack Technologies, LLC | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package com.slack.circuitx.overlays | ||
|
||
import androidx.compose.material3.ExperimentalMaterial3Api | ||
import androidx.compose.material3.ModalBottomSheetProperties | ||
|
||
@OptIn(ExperimentalMaterial3Api::class) | ||
internal actual fun createBottomSheetProperties( | ||
isFocusable: Boolean, | ||
shouldDismissOnBackPress: Boolean, | ||
): ModalBottomSheetProperties { | ||
return ModalBottomSheetProperties(isFocusable, shouldDismissOnBackPress) | ||
} |
14 changes: 14 additions & 0 deletions
14
...x/overlays/src/nativeMain/kotlin/com/slack/circuitx/overlays/BottomSheetOverlay.native.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Copyright (C) 2024 Slack Technologies, LLC | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package com.slack.circuitx.overlays | ||
|
||
import androidx.compose.material3.ExperimentalMaterial3Api | ||
import androidx.compose.material3.ModalBottomSheetProperties | ||
|
||
@OptIn(ExperimentalMaterial3Api::class) | ||
internal actual fun createBottomSheetProperties( | ||
isFocusable: Boolean, | ||
shouldDismissOnBackPress: Boolean, | ||
): ModalBottomSheetProperties { | ||
return ModalBottomSheetProperties(isFocusable, shouldDismissOnBackPress) | ||
} |