...
 
Commits (2)
......@@ -722,6 +722,9 @@ exports[`channel subscribers component should render correctly 1`] = `
"metadataService": null,
"offset": "",
"refreshing": false,
"viewed": Viewed {
"viewed": Map {},
},
},
"loadList": [MockFunction],
"refresh": [MockFunction],
......@@ -1096,6 +1099,9 @@ exports[`channel subscribers component should render correctly 1`] = `
"metadataService": null,
"offset": "",
"refreshing": false,
"viewed": Viewed {
"viewed": Map {},
},
},
"loadList": [MockFunction],
"refresh": [MockFunction],
......@@ -1470,6 +1476,9 @@ exports[`channel subscribers component should render correctly 1`] = `
"metadataService": null,
"offset": "",
"refreshing": false,
"viewed": Viewed {
"viewed": Map {},
},
},
"loadList": [MockFunction],
"refresh": [MockFunction],
......
......@@ -3,6 +3,7 @@ import channelService from '../../channel/ChannelService';
import { revokeBoost, rejectBoost, acceptBoost} from '../../boost/BoostService';
import logService from '../services/log.service';
import metadataService from '../services/metadata.service';
import Viewed from './Viewed';
/**
* Common infinite scroll list
......@@ -34,6 +35,11 @@ export default class OffsetListStore {
*/
metadataService = null;
/**
* Viewed store
*/
viewed = new Viewed;
/**
* Constructor
* @param {string} type 'shallow'|'ref'|null
......
......@@ -19,6 +19,7 @@ import CenteredLoading from '../common/components/CenteredLoading';
import commentsStoreProvider from '../comments/CommentsStoreProvider';
import logService from '../common/services/log.service';
import i18n from '../common/services/i18n.service';
import OffsetFeedListStore from '../common/stores/OffsetFeedListStore';
/**
* Activity screen
......@@ -61,10 +62,15 @@ export default class ActivityScreen extends Component {
}
if (params.entity && params.entity._list) {
params.entity._list.viewed.addViewed(
params.entity,
params.entity._list.metadataService
);
// this second condition it's for legacy boost feed
if (params.entity._list instanceof OffsetFeedListStore) {
params.entity._list.addViewed(params.entity);
} else {
params.entity._list.viewed.addViewed(
params.entity,
params.entity._list.metadataService
);
}
}
}
......