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

FR: BCAPI call to refresh index (ideally with an optional callback when the index is ready) #369

Closed
zsviczian opened this issue Apr 9, 2022 · 4 comments

Comments

@zsviczian
Copy link

https://discord.com/channels/686053708261228577/929513881041248266/962241581270855680

@SkepticMystic
Copy link
Owner

Hey @zsviczian! I'm gonna work on this now.
Just a question about the callback, what would it take as arguments?

BCAPI.refreshIndex(cb: () => any)

@zsviczian
Copy link
Author

I think just a function without arguments letting the other app know that the index was refreshed should be sufficient. If it is not too much trouble, then a list of the pages that were updated (assuming a partial update) would be nice.

@SkepticMystic
Copy link
Owner

For the first option, can't you just await the refreshIndex call? Or chain .then?
For the second option, the index is not partially updated, so I won't be able to do that

@SkepticMystic
Copy link
Owner

Closing as complete. The refreshIndex function is async, so you can just await it and run your callback after

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

No branches or pull requests

2 participants