Use local instead of global loading indicator for timelines, account timelines (#9224)
So that opening a profile feels faster. Also, pinned toots are not shown before other toots have loaded. Also, if no toots are loaded, added empty message
This commit is contained in:
@ -97,13 +97,12 @@ export const expandAccountTimeline = (accountId, { maxId, withReplies }
|
||||
export const expandAccountFeaturedTimeline = accountId => expandTimeline(`account:${accountId}:pinned`, `/api/v1/accounts/${accountId}/statuses`, { pinned: true });
|
||||
export const expandAccountMediaTimeline = (accountId, { maxId } = {}) => expandTimeline(`account:${accountId}:media`, `/api/v1/accounts/${accountId}/statuses`, { max_id: maxId, only_media: true });
|
||||
export const expandListTimeline = (id, { maxId } = {}, done = noOp) => expandTimeline(`list:${id}`, `/api/v1/timelines/list/${id}`, { max_id: maxId }, done);
|
||||
|
||||
export const expandHashtagTimeline = (hashtag, { maxId, tags } = {}, done = noOp) => {
|
||||
return expandTimeline(`hashtag:${hashtag}`, `/api/v1/timelines/tag/${hashtag}`, {
|
||||
max_id: maxId,
|
||||
any: parseTags(tags, 'any'),
|
||||
all: parseTags(tags, 'all'),
|
||||
none: parseTags(tags, 'none'),
|
||||
any: parseTags(tags, 'any'),
|
||||
all: parseTags(tags, 'all'),
|
||||
none: parseTags(tags, 'none'),
|
||||
}, done);
|
||||
};
|
||||
|
||||
@ -111,6 +110,7 @@ export function expandTimelineRequest(timeline) {
|
||||
return {
|
||||
type: TIMELINE_EXPAND_REQUEST,
|
||||
timeline,
|
||||
skipLoading: true,
|
||||
};
|
||||
};
|
||||
|
||||
@ -121,6 +121,7 @@ export function expandTimelineSuccess(timeline, statuses, next, partial) {
|
||||
statuses,
|
||||
next,
|
||||
partial,
|
||||
skipLoading: true,
|
||||
};
|
||||
};
|
||||
|
||||
@ -129,6 +130,7 @@ export function expandTimelineFail(timeline, error) {
|
||||
type: TIMELINE_EXPAND_FAIL,
|
||||
timeline,
|
||||
error,
|
||||
skipLoading: true,
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user