mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 05:49:22 +00:00
Optimized code
This commit is contained in:
parent
2e0b130ac5
commit
972232b370
@ -104,15 +104,10 @@ ComunicWeb.pages.userPage.posts = {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Unlock posts loading
|
//Unlock posts loading, if required
|
||||||
|
if(result.length != 0)
|
||||||
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();
|
||||||
|
Loading…
Reference in New Issue
Block a user