Skip to content

Commit

Permalink
fix(ActivityStream): fix display order of previous activities
Browse files Browse the repository at this point in the history
  • Loading branch information
lalli-flores committed Oct 8, 2019
1 parent 671132f commit fbc4dec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/adapters/RoomsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class RoomsAdapter extends WebexAdapter {
* Returns an observable that emits an array of the next chunk of previous
* activity data of the given roomID. If `hasMoreActivities` returns false,
* the observable will complete.
* **Previous activity data must be sorted oldest-to-latest.**
* **Previous activity data must be sorted newest-to-oldest.**
*
* @param {string} ID ID of the room for which to get activities.
* @returns {Observable.<Array.<string|ActivityDate>>}
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/RoomsJSONAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class RoomsJSONAdapter extends RoomsAdapter {
* Returns an observable that emits an array of the next chunk of previous
* activity data of the given roomID. If `hasMoreActivities` returns false,
* the observable will complete.
* **Previous activity data must be sorted oldest-to-latest.**
* **Previous activity data must be sorted newest-to-oldest.**
*
* The next chunk is based on the adapter's `dataChunkSize`.
*
Expand Down
2 changes: 1 addition & 1 deletion src/components/hooks/useActivityStream.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function reducer(activities, action) {

switch (action.type) {
case PREPEND_ACTIVITIES:
newActivities = action.payload.concat(activities);
newActivities = action.payload.reverse().concat(activities);
break;
case APPEND_ACTIVITIES:
newActivities = activities.concat(action.payload);
Expand Down

0 comments on commit fbc4dec

Please sign in to comment.