Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
9b094118
Commit
9b094118
authored
8 years ago
by
Eugen Rochko
Browse files
Options
Downloads
Patches
Plain Diff
Don't show loading bar when checking account timeline for newer stuff
parent
46be4631
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/assets/javascripts/components/actions/accounts.jsx
+16
-11
16 additions, 11 deletions
app/assets/javascripts/components/actions/accounts.jsx
with
16 additions
and
11 deletions
app/assets/javascripts/components/actions/accounts.jsx
+
16
−
11
View file @
9b094118
...
...
@@ -80,21 +80,23 @@ export function fetchAccount(id) {
export
function
fetchAccountTimeline
(
id
,
replace
=
false
)
{
return
(
dispatch
,
getState
)
=>
{
dispatch
(
fetchAccountTimelineRequest
(
id
));
const
ids
=
getState
().
getIn
([
'
timelines
'
,
'
accounts_timelines
'
,
id
],
Immutable
.
List
());
const
newestId
=
ids
.
size
>
0
?
ids
.
first
()
:
null
;
let
params
=
''
;
let
skipLoading
=
false
;
if
(
newestId
!==
null
&&
!
replace
)
{
params
=
`?since_id=
${
newestId
}
`
;
params
=
`?since_id=
${
newestId
}
`
;
skipLoading
=
true
;
}
dispatch
(
fetchAccountTimelineRequest
(
id
,
skipLoading
));
api
(
getState
).
get
(
`/api/v1/accounts/
${
id
}
/statuses
${
params
}
`
).
then
(
response
=>
{
dispatch
(
fetchAccountTimelineSuccess
(
id
,
response
.
data
,
replace
));
dispatch
(
fetchAccountTimelineSuccess
(
id
,
response
.
data
,
replace
,
skipLoading
));
}).
catch
(
error
=>
{
dispatch
(
fetchAccountTimelineFail
(
id
,
error
));
dispatch
(
fetchAccountTimelineFail
(
id
,
error
,
skipLoading
));
});
};
};
...
...
@@ -201,27 +203,30 @@ export function unfollowAccountFail(error) {
};
};
export
function
fetchAccountTimelineRequest
(
id
)
{
export
function
fetchAccountTimelineRequest
(
id
,
skipLoading
)
{
return
{
type
:
ACCOUNT_TIMELINE_FETCH_REQUEST
,
id
id
,
skipLoading
};
};
export
function
fetchAccountTimelineSuccess
(
id
,
statuses
,
replace
)
{
export
function
fetchAccountTimelineSuccess
(
id
,
statuses
,
replace
,
skipLoading
)
{
return
{
type
:
ACCOUNT_TIMELINE_FETCH_SUCCESS
,
id
,
statuses
,
replace
replace
,
skipLoading
};
};
export
function
fetchAccountTimelineFail
(
id
,
error
)
{
export
function
fetchAccountTimelineFail
(
id
,
error
,
skipLoading
)
{
return
{
type
:
ACCOUNT_TIMELINE_FETCH_FAIL
,
id
,
error
error
,
skipLoading
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment