diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2018-11-08 21:35:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-08 21:35:06 +0100 |
commit | dd00cd19d2536ce70442d74d72986721427691a5 (patch) | |
tree | 17e81f1ccb7081765169dc3a9c1cbc7214d65629 /app/javascript/mastodon/actions/timelines.js | |
parent | f055907857dd0ecf7b1780b4ec770c0073de7466 (diff) |
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
Diffstat (limited to 'app/javascript/mastodon/actions/timelines.js')
-rw-r--r-- | app/javascript/mastodon/actions/timelines.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/javascript/mastodon/actions/timelines.js b/app/javascript/mastodon/actions/timelines.js index 2b7962a6e..8cb06c157 100644 --- a/app/javascript/mastodon/actions/timelines.js +++ b/app/javascript/mastodon/actions/timelines.js @@ -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, }; }; |