Skip to content

Commit

Permalink
fix for #167
Browse files Browse the repository at this point in the history
  • Loading branch information
T8RIN committed May 4, 2023
1 parent e774ecd commit 8de6d0e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ class MainActivity : M3Activity() {
currentFolderUri = saveFolderUri,
onGetNewFolder = {
viewModel.updateSaveFolderUri(it)
it?.let { uri ->
contentResolver.takePersistableUriPermission(
uri,
Intent.FLAG_GRANT_READ_URI_PERMISSION or
Intent.FLAG_GRANT_WRITE_URI_PERMISSION
)
}
},
showConfetti = { showConfetti = true },
viewModel = viewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ fun MainScreen(
RevealDirection.EndToStart,
),
maxAmountOfOverflow = 1.dp,
state = state
state = state,
enabled = false
)
),
windowInsets = WindowInsets(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ fun Modifier.revealSwipeable(
maxAmountOfOverflow: Dp,
directions: Set<RevealDirection>,
state: RevealState,
enabled: Boolean = true
) = composed {

val maxAmountOfOverflowPx = with(LocalDensity.current) { maxAmountOfOverflow.toPx() }
Expand All @@ -131,7 +132,7 @@ fun Modifier.revealSwipeable(
anchors = anchors,
thresholds = thresholds,
orientation = Orientation.Horizontal,
enabled = true, // state.value == RevealValue.Default,
enabled = enabled, // state.value == RevealValue.Default,
reverseDirection = isRtl,
resistance = ResistanceConfig(
basis = maxAmountOfOverflowPx,
Expand Down

0 comments on commit 8de6d0e

Please sign in to comment.