Hello every one, I’m writing a picture heavy app, where I’m utilising progressive image loading. Where I send a blurred small image (base64) first then a S3 signed link. I’m trying to do infinite scrolling by simply increasing the limit but without any luck… It works flawlessly with regular publications…
The problem is I can’t figure out how to do infinite scrolling with the low level technique…
Code:
const limit = 20;
const cll = Cll.find({}, {limit, sort});
const handle = cll.observeChanges({
added(id, fields){
// remove some stuff from fields
pub.added('cllName', id, fields);
}
});
pub.ready();
if(userIsAuthed){
cll.forEach(item =>{
s3.getSignedUrl('getObject', {params}, (err, url) => pub.changed('cllName', id, {url}));
});
}
//stop the observer on stop
I simply change the limit, it completely resets the publication, is there a way I could mitigate this? Without using pesky workarounds? Thanks