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

AdvStoryController throws exception when jumpTo called on trayTap event #15

Closed
eilhcir opened this issue Jul 5, 2022 · 3 comments
Closed
Assignees
Labels
bug Something isn't working fixed A problem solved or a feature added

Comments

@eilhcir
Copy link

eilhcir commented Jul 5, 2022

How can I implement seen feature like when I already saw the content It will jump to next content which not yet viewed?

Currently, when the tray open I can't skip or jump it using the controller listener.

@eilhcir eilhcir changed the title ss Seen Feature Jul 5, 2022
@ertgrulll ertgrulll added bug Something isn't working in progress A problem is fixing or a feature adding labels Jul 5, 2022
@ertgrulll
Copy link
Owner

ertgrulll commented Jul 5, 2022

I am able to reproduce the issue. When jumpTo is called on the StoryEvent.trayTap, AdvStoryController throws an exception because the story view page controller has not been created yet. I will release a new version to fix the issue as soon as possible. I will provide an example for seen feature as well. Thanks for your feedback!

@ertgrulll ertgrulll self-assigned this Jul 5, 2022
@ertgrulll ertgrulll changed the title Seen Feature AdvStoryController throws exception when jumpTo called on trayTap event Jul 5, 2022
@eilhcir
Copy link
Author

eilhcir commented Jul 5, 2022

Cool, Thank you for your awesome package.

@ertgrulll
Copy link
Owner

ertgrulll commented Jul 9, 2022

jumpTo bug fixed in version 0.2.0, but I have added interceptor support to make things better. When you call jumpTo on StoryEvent.trayTap, AdvStory creates tapped story and some of it's content and after that jumps to the given position, but using interceptor you can change opening position before view opened.

I didn't update docs yet, but you can look at interceptor example to see usage. Use setTrayTapInterceptor from controller, AdvStory calls this method when StoryEvent.trayTap happened. Return desired StoryPosition to open view at that position when needed, or return null to allow to continue default flow. At this point, I think I don't need to give an example, but if you have any problems, you can contact me.

Also you can add interceptor to block any other story event, not just for tray tap.

Some minor changes in this version may affect your project, please have a look at the changelog. Happy coding!

@ertgrulll ertgrulll added fixed A problem solved or a feature added and removed in progress A problem is fixing or a feature adding labels Jul 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed A problem solved or a feature added
Projects
None yet
Development

No branches or pull requests

2 participants