Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable backing again during transition from bookmark screen. #578

Conversation

kosenda
Copy link
Contributor

@kosenda kosenda commented Aug 16, 2023

Issue

Overview (Required)

  • Clickable is now kept by var enabledBackPress by remember { mutableStateOf(true) }.
  • enabledBackPress created above is used to disable the button after the second click.
  • I used the approach taught here to make the correction.

Links

Screenshot

Before After
screen-20230817-000247.mp4
screen-20230817-010152.2.mp4

@github-actions
Copy link

github-actions bot commented Aug 16, 2023

@github-actions
Copy link

github-actions bot commented Aug 16, 2023

Test Results

47 tests   47 ✔️  4m 8s ⏱️
  8 suites    0 💤
  8 files      0

Results for commit 6aafb52.

♻️ This comment has been updated with latest results.

@@ -116,7 +120,8 @@ fun BookmarkTopArea(
contentDescription = null,
modifier = Modifier
.size(24.dp)
.clickable {
.clickable(enabled = enabledBackPress) {
enabledBackPress = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using this approach?
https://stackoverflow.com/a/76386604/4339442

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
I thought that approach was really better, so I'll change it that way!

@github-actions github-actions bot temporarily deployed to deploygate-distribution August 16, 2023 15:43 Inactive
@kosenda kosenda requested a review from takahirom August 16, 2023 16:25
@github-actions github-actions bot temporarily deployed to deploygate-distribution August 16, 2023 16:32 Inactive
Copy link
Member

@takahirom takahirom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great Thanks!

@takahirom takahirom merged commit 77f902f into DroidKaigi:main Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable backing again during transition from bookmark screen.
2 participants