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

Compose: provide the way to get the end of the sequentially showed balloons. #525

Closed
Monabr opened this issue Nov 3, 2023 · 10 comments
Closed
Assignees
Labels
Release Next This feature will be released on next version

Comments

@Monabr
Copy link

Monabr commented Nov 3, 2023

I need to show tooltips after first open app only one time. I am using "Show up Balloon Sequentially" but how can I get the end of this? I need to write it only after last balloon is dismissed. This is because of recomposition. The last balloon will be canceled too early because of my property will change view in compose.

@skydoves
Copy link
Owner

skydoves commented Nov 3, 2023

Hey @Monabr, you can control sequential balloons more accurately by using await_ functions.

coroutineScope.launch {
  customListBalloon.awaitAlignBottom(anchorView)
  customProfileBalloon.awaitAlignBottom(circleImageView, 0, 0)
  customTagBalloon.awaitAlignTop(bottomNavigationView, 130, 0)
}

@skydoves skydoves added the compose Jetpack Compose Issue label Nov 3, 2023
@Monabr
Copy link
Author

Monabr commented Nov 3, 2023

@skydoves Yea, but how can I know when the last one is closed?

@skydoves
Copy link
Owner

skydoves commented Nov 3, 2023

You can use the setOnBalloonDismissListener for listening a specific balloon was closed. You can only set the listener for the last one.

@Monabr
Copy link
Author

Monabr commented Nov 3, 2023

You can use the setOnBalloonDismissListener for listening a specific balloon was closed. You can only set the listener for the last one.

@skydoves This not working when I use .await_

This mentioned in your docs.

@skydoves
Copy link
Owner

skydoves commented Nov 3, 2023

Ah, then this should be reported as a bug. I will let you know for the updates soon.

@skydoves
Copy link
Owner

skydoves commented Nov 3, 2023

This issue has been fixed in the current snapshot version. It will be contained in the next stable release. Thanks for reporting this!

@skydoves skydoves self-assigned this Nov 3, 2023
@skydoves skydoves added Release Next This feature will be released on next version and removed compose Jetpack Compose Issue labels Nov 3, 2023
@Monabr
Copy link
Author

Monabr commented Nov 3, 2023

@skydoves Thank you. Please also update the docs. This line:

Note: The relayShow__ and await__ methods overwrite the setOnDismissListener internally, so you can't use the setOnDismissListener at the same time.

@skydoves
Copy link
Owner

skydoves commented Nov 3, 2023

Thanks for pointing out this issue @Monabr. In the next release, you can use the setOnDismissListener regardless of the internal usage.

@skydoves
Copy link
Owner

@Monabr 1.6.3 has been released, and now setOnDismissListener works as you expected. Thanks for reporting this issue 👍

@Monabr
Copy link
Author

Monabr commented Dec 1, 2023

@skydoves I reopen the issue about this problem by the new issue #549

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release Next This feature will be released on next version
Projects
None yet
Development

No branches or pull requests

2 participants