Closed artudi54 closed 12 months ago
Hello,
You're right, the design is the tilesDownloaded.send(spec)
should always be called, because the "tileCollectorKernel" actor keeps track of which tile is being processed. Without tilesDownloaded.send(spec)
being called, subsequent attempts to download the tile will be skipped.
So I inadvertently broke this contract in the commit you linked.
Thanks!
Thanks for the quick merge. Could you release a new version with this fix? I could then include it in my app.
Yes, I've just published 3.1.8 on mavencentral. It may take one hour or so to be available.
Hello
Since the commit ee06fba22a9fe4f6c2a67a095fdb1ed9d70938f8 function
redrawTiles
stopped working.I managed to find the reason for this. In the old code in the function
CoroutineScope.worker
instructiontilesDownloaded.send(spec)
was always called, regardless of the bitmap being succesfully loaded or not. It was placed insidefinally
block, so whether we gotnull
bitmap and calledcontinue
, or we got an exception it was called for every tile.In the current implementation it is only called when we get the bitmap correctly. Current behaviour causes
redrawTiles
to not work (at least for me). I adjusted the code accordingly, to bring back the old behaviour, while leaving the new load algorithm intact and it seems to have solved the issue.I don't know exactly what those channels are doing, I just found an issue and a possible fix for it. If you have a better solution than this one, then feel free to do it your own way.
Best regards