Skip to content

Commit fbc4dec

Browse files
committed
fix(ActivityStream): fix display order of previous activities
1 parent 671132f commit fbc4dec

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/adapters/RoomsAdapter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export default class RoomsAdapter extends WebexAdapter {
6666
* Returns an observable that emits an array of the next chunk of previous
6767
* activity data of the given roomID. If `hasMoreActivities` returns false,
6868
* the observable will complete.
69-
* **Previous activity data must be sorted oldest-to-latest.**
69+
* **Previous activity data must be sorted newest-to-oldest.**
7070
*
7171
* @param {string} ID ID of the room for which to get activities.
7272
* @returns {Observable.<Array.<string|ActivityDate>>}

src/adapters/RoomsJSONAdapter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default class RoomsJSONAdapter extends RoomsAdapter {
7272
* Returns an observable that emits an array of the next chunk of previous
7373
* activity data of the given roomID. If `hasMoreActivities` returns false,
7474
* the observable will complete.
75-
* **Previous activity data must be sorted oldest-to-latest.**
75+
* **Previous activity data must be sorted newest-to-oldest.**
7676
*
7777
* The next chunk is based on the adapter's `dataChunkSize`.
7878
*

src/components/hooks/useActivityStream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function reducer(activities, action) {
1919

2020
switch (action.type) {
2121
case PREPEND_ACTIVITIES:
22-
newActivities = action.payload.concat(activities);
22+
newActivities = action.payload.reverse().concat(activities);
2323
break;
2424
case APPEND_ACTIVITIES:
2525
newActivities = activities.concat(action.payload);

0 commit comments

Comments
 (0)