Read the statement by Michael Teeuw here.
Synchronous requests [solved]
-
I won’t pretend I completely understand what you did there :sweat_smile:
Is it okay if I copy that code, I managed to modify it in a way that seems to work :) -
@paviro Yeah, but try to understand what I did. Thats the best way to learn. Let me know what you don’t understand. I’ll explain.
-
I do not quite understand how the
itemsReceivedCallback
works :confused: -
Does work great now! The only problem is sometimes a list is empty on a refresh even tough it should not be :/
{ inbox: [], 'ViRO Entertainment': [ 'Todo1', 'Todo2', 'Todo3' ] }
-
I’m on my phone now, so not really able to explain the callbacks. Will do that later.
Regarding the empty lists: try debugging by putting some log statements on places where You receive and send data.
-
It is not the socket connection. The fetcher sometimes returns an empty list :/
-
@paviro try debugging the Fetchet on the same way. ;)
-
I am on it but I can’t find the problem… :confounded:
WhenbroadcastItems
is fired and thereforefetcher.onReceive
triggered the lists are populated. But oncebroadcastTodos()
collects the tasks by looping over thefetchers
some lists appear to be empty. Any chance you could have a look? -
Will fork your module tomorrow and give it a try.
-
Thanks! :)