Revert "Timeline: don't try to memoize getStatusIds"
This reverts commit dd58f8fce7
.
This commit is contained in:
parent
21e7215beb
commit
ca833e5eed
1 changed files with 1 additions and 2 deletions
|
@ -9,8 +9,6 @@ import StatusList, { IStatusList } from 'soapbox/components/status_list';
|
||||||
import { useAppSelector, useAppDispatch } from 'soapbox/hooks';
|
import { useAppSelector, useAppDispatch } from 'soapbox/hooks';
|
||||||
import { makeGetStatusIds } from 'soapbox/selectors';
|
import { makeGetStatusIds } from 'soapbox/selectors';
|
||||||
|
|
||||||
const getStatusIds = makeGetStatusIds();
|
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
queue: { id: 'status_list.queue_label', defaultMessage: 'Click to see {count} new {count, plural, one {post} other {posts}}' },
|
queue: { id: 'status_list.queue_label', defaultMessage: 'Click to see {count} new {count, plural, one {post} other {posts}}' },
|
||||||
});
|
});
|
||||||
|
@ -27,6 +25,7 @@ const Timeline: React.FC<ITimeline> = ({
|
||||||
...rest
|
...rest
|
||||||
}) => {
|
}) => {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
|
const getStatusIds = useCallback(makeGetStatusIds, [])();
|
||||||
|
|
||||||
const lastStatusId = useAppSelector(state => (state.timelines.get(timelineId)?.items || ImmutableOrderedSet()).last() as string | undefined);
|
const lastStatusId = useAppSelector(state => (state.timelines.get(timelineId)?.items || ImmutableOrderedSet()).last() as string | undefined);
|
||||||
const statusIds = useAppSelector(state => getStatusIds(state, { type: timelineId }));
|
const statusIds = useAppSelector(state => getStatusIds(state, { type: timelineId }));
|
||||||
|
|
Loading…
Reference in a new issue