Skip to:
Content

BuddyPress.org

Changeset 8048


Ignore:
Timestamp:
03/05/2014 06:34:34 PM (11 years ago)
Author:
imath
Message:

Prevent the last displayed activity on stream to be reloaded after a posted update

Since the introduction of the heartbeat feature to automatically check for new activities, when posting an update: an offset argument is used to load all new activities. This offset is given by the last activity id displayed on the stream, to be sure that specific activity is not reloaded, we need to increment this id by 1.

Fixes #5447

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-templates/bp-legacy/buddypress-functions.php

    r7953 r8048  
    685685        exit( '-1<div id="message" class="error"><p>' . __( 'There was a problem posting your update, please try again.', 'buddypress' ) . '</p></div>' );
    686686
    687     $last_id = isset( $_POST['offset'] ) ? absint( $_POST['offset'] ) : 0;
     687    $last_id = isset( $_POST['offset'] ) ? absint( $_POST['offset'] ) + 1 : 0;
    688688    if ( $last_id ) {
    689689        $activity_args = array( 'offset' => $last_id );
Note: See TracChangeset for help on using the changeset viewer.