Skip to:
Content

BuddyPress.org

Ticket #7896: 7896.02.patch

File 7896.02.patch, 2.1 KB (added by boonebgorges, 6 years ago)
  • src/bp-templates/bp-legacy/js/buddypress.js

    diff --git src/bp-templates/bp-legacy/js/buddypress.js src/bp-templates/bp-legacy/js/buddypress.js
    index 75c25a427..548571fa8 100644
    var newest_activities = ''; 
    1111var activity_last_recorded  = 0;
    1212
    1313jq(document).ready( function() {
     14        var activity_oldestpage = 1;
     15
    1416        /**** Page Load Actions *******************************************************/
    1517
    1618        /* Activity filter and scope set */
    jq(document).ready( function() { 
    257259                        return false;
    258260                }
    259261
    260                 /* Reset the page */
    261                 jq.cookie( 'bp-activity-oldestpage', 1, {
    262                         path: '/',
    263                         secure: ( 'https:' === window.location.protocol )
    264                 } );
    265 
    266262                /* Activity Stream Tabs */
    267263                scope  = target.attr('id').substr( 9, target.attr('id').length );
    268264                filter = jq('#activity-filter-select select').val();
    jq(document).ready( function() { 
    438434
    439435                        jq('#buddypress li.load-more').addClass('loading');
    440436
    441                         if ( ! jq.cookie('bp-activity-oldestpage') ) {
    442                                 jq.cookie('bp-activity-oldestpage', 1, {
    443                                         path: '/',
    444                                         secure: ( 'https:' === window.location.protocol )
    445                                 } );
    446                         }
    447 
    448                         oldest_page = ( jq.cookie('bp-activity-oldestpage') * 1 ) + 1;
     437                        oldest_page = activity_oldestpage + 1;
    449438                        just_posted = [];
    450439
    451440                        jq('.activity-list li.just-posted').each( function(){
    jq(document).ready( function() { 
    469458                        function(response)
    470459                        {
    471460                                jq('#buddypress li.load-more').removeClass('loading');
    472                                 jq.cookie( 'bp-activity-oldestpage', oldest_page, {
    473                                         path: '/',
    474                                         secure: ( 'https:' === window.location.protocol )
    475                                 } );
     461                                activity_oldestpage = oldest_page;
    476462                                jq('#buddypress ul.activity-list').append(response.contents);
    477463
    478464                                target.parent().hide();
    function bp_activity_request(scope, filter) { 
    18571843                        secure: ( 'https:' === window.location.protocol )
    18581844                } );
    18591845        }
    1860         jq.cookie( 'bp-activity-oldestpage', 1, {
    1861                 path: '/',
    1862                 secure: ( 'https:' === window.location.protocol )
    1863         } );
    18641846
    18651847        /* Remove selected and loading classes from tabs */
    18661848        jq('.item-list-tabs li').each( function() {