ASNetworkImageNode image disappears when "displaysAsynchronously = false" and reloadData()
Hello. I found a bug, when I wanted to "displaysAsynchronously = false" my ASNetworkImageNode. At first time image shows correctly, but after reloadData is called, it disappears.
To reproduce this bug (in ASDKGram example):
- PhotoCellNode need to add “_userAvatarImageNode.displaysAsynchronously = false;”
- ASDK PhotoFeedNodeController - in loadView method I just added
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.tableNode reloadData];
})
It seems that setNeedsDisplay is not working as expected when image get from cache, if we call setNeedsDisplay after e.g. 0.1 seconds, it will redraw image as expected.
It seems calling [self.imageNode recursivelyEnsureDisplaySynchronously:YES]; in cell's didLoad method fixed the issue. @ArmandsB can you confirm that it fixed in your case? I know that calling [self.imageNode recursivelyEnsureDisplaySynchronously:YES]; is not the right solution, we may call this only when user makes pull-to-refresh.
Sorry for long (very) wait, but using [self.imageNode recursivelyEnsureDisplaySynchronously:YES]; fixes this issue.
In the newest versions, the image disappears when you scroll it off the viewport, then takes a few seconds to reappear
I confirm this issue still happening