Replies: 2 comments 1 reply
-
Does this help? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thinking about this myself, I wonder if I notice the stopwatch example uses it to update as time elapses. It seems like you can create your own subscription by implementing a If you get anywhere with this, let me know :D |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi I have an API that requires polling to get updates. I am aware about
Command::perform
for short term async execution. How could I however integrate with never exiting async execution?This specifically would be https://matrix-org.github.io/matrix-rust-sdk/matrix_sdk/struct.Client.html#method.sync for my case or https://matrix-org.github.io/matrix-rust-sdk/matrix_sdk/struct.Client.html#method.sync_with_callback
the first one emits it data to a struct implementing a specific trait or the second one is just a callback which actually is a loop internally.
So I need either of these hooked in a way where I can trigger the UI to update. Any ideas on how to archive this?
I have also seen Subscriptions but I am honestly not sure how to use them or if they work with this at all :) I can certainly add my Messagges I want to emit to a list and from that maybe for am a Subscription. But to get there I would need some help on how to do it correct/efficent in this case :)
Beta Was this translation helpful? Give feedback.
All reactions