Reduce traffic

This commit is contained in:
Pierre 2018-05-26 16:16:32 +02:00
parent 9325cdd68b
commit 2c07e76684

View File

@ -107,6 +107,12 @@ ComunicWeb.pages.userPage.posts = {
//Unlock posts loading //Unlock posts loading
ComunicWeb.pages.userPage.posts._load_post_locked = false; ComunicWeb.pages.userPage.posts._load_post_locked = false;
//Lock posts loading, if not any post has been shown
if(result.length == 0){
//Avoid useless traffic
ComunicWeb.pages.userPage.posts._load_post_locked = true;
}
//Call callback (if any) //Call callback (if any)
if(callback) if(callback)
callback(); callback();
@ -139,7 +145,6 @@ ComunicWeb.pages.userPage.posts = {
if(this._last_post_id == 0){ if(this._last_post_id == 0){
this._no_posts_msg(target); this._no_posts_msg(target);
} }
}, },
/** /**