mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-24 18:08:50 +00:00
Ask to include groups posts in latest posts thread.
This commit is contained in:
parent
476f1b24a7
commit
547daf4741
@ -60,9 +60,11 @@ ComunicWeb.components.posts.interface = {
|
||||
* Get the list of the latest posts
|
||||
*
|
||||
* @param {number} lastPostID The ID of the loast loaded post (or 0)
|
||||
* @param {boolean} include_groups Specify whether groups posts should be
|
||||
* included or not
|
||||
* @param {function} callback What to do when we got response
|
||||
*/
|
||||
get_latest: function(lastPostID, callback){
|
||||
get_latest: function(lastPostID, include_groups, callback){
|
||||
|
||||
if(lastPostID > 0)
|
||||
lastPostID--;
|
||||
@ -70,7 +72,8 @@ ComunicWeb.components.posts.interface = {
|
||||
//Prepare API request
|
||||
var APIuri = "posts/get_latest";
|
||||
var params = {
|
||||
startFrom: lastPostID
|
||||
startFrom: lastPostID,
|
||||
include_groups: include_groups
|
||||
};
|
||||
|
||||
//Perform the request
|
||||
|
@ -92,7 +92,7 @@ ComunicWeb.pages.latestPosts.main = {
|
||||
_load_list: function(target){
|
||||
|
||||
//Perform a request on the server to get the list of latest posts
|
||||
ComunicWeb.components.posts.interface.get_latest(this._last_post_id, function(response){
|
||||
ComunicWeb.components.posts.interface.get_latest(this._last_post_id, true, function(response){
|
||||
|
||||
//Check for errors - display a modal
|
||||
if(response.error){
|
||||
|
Loading…
Reference in New Issue
Block a user