Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Frontend
Project
Project
Details
Activity
Releases
Dependency List
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
847
Issues
847
List
Boards
Labels
Service Desk
Milestones
Merge Requests
44
Merge Requests
44
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Compare Revisions
7d9266cbd1df1e9df2192b7e474e042c2ee485ff...0a76cb90a3acc378c43561e9bc27018dcfa676cb
Source
0a76cb90a3acc378c43561e9bc27018dcfa676cb
Select Git revision
...
Target
7d9266cbd1df1e9df2192b7e474e042c2ee485ff
Select Git revision
Compare
Commits (2)
(feat): refresh newsfeed on renavigation
· e3143161
Mark Harding
authored
4 hours ago
e3143161
Merge branch 'master' of gitlab.com:minds/front into feat/media-modal-1539
· 0a76cb90
Olivia Madrid
authored
2 minutes ago
0a76cb90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
subscribed.component.ts
src/app/modules/newsfeed/feeds/subscribed.component.ts
+14
-9
No files found.
src/app/modules/newsfeed/feeds/subscribed.component.ts
View file @
0a76cb90
import
{
Component
,
Injector
,
SkipSelf
,
ViewChild
}
from
'
@angular/core
'
;
import
{
Subscription
,
BehaviorSubject
}
from
'
rxjs
'
;
import
{
filter
}
from
'
rxjs/operators
'
;
import
{
ActivatedRoute
,
Router
}
from
'
@angular/router
'
;
import
{
ActivatedRoute
,
Router
,
RouterEvent
,
NavigationEnd
}
from
'
@angular/router
'
;
import
{
Client
,
Upload
}
from
'
../../../services/api
'
;
import
{
MindsTitle
}
from
'
../../../services/ux/title
'
;
...
...
@@ -52,6 +53,7 @@ export class NewsfeedSubscribedComponent {
paramsSubscription
:
Subscription
;
reloadFeedSubscription
:
Subscription
;
routerSubscription
:
Subscription
;
@
ViewChild
(
'
poster
'
,
{
static
:
true
})
private
poster
:
PosterComponent
;
...
...
@@ -79,6 +81,16 @@ export class NewsfeedSubscribedComponent {
}
ngOnInit
()
{
this
.
routerSubscription
=
this
.
router
.
events
.
pipe
(
filter
((
event
:
RouterEvent
)
=>
event
instanceof
NavigationEnd
)
).
subscribe
(()
=>
{
this
.
showBoostRotator
=
false
;
this
.
load
(
true
,
true
);
setTimeout
(()
=>
{
this
.
showBoostRotator
=
true
;
},
100
);
});
this
.
reloadFeedSubscription
=
this
.
newsfeedService
.
onReloadFeed
.
subscribe
(()
=>
{
this
.
load
(
true
,
true
);
});
...
...
@@ -92,14 +104,6 @@ export class NewsfeedSubscribedComponent {
}
this
.
newUserPromo
=
!!
params
[
'
newUser
'
];
if
(
params
[
'
ts
'
])
{
this
.
showBoostRotator
=
false
;
this
.
load
(
true
);
setTimeout
(()
=>
{
this
.
showBoostRotator
=
true
;
},
300
);
}
});
this
.
context
.
set
(
'
activity
'
);
...
...
@@ -108,6 +112,7 @@ export class NewsfeedSubscribedComponent {
ngOnDestroy
()
{
this
.
paramsSubscription
.
unsubscribe
();
this
.
reloadFeedSubscription
.
unsubscribe
();
this
.
routerSubscription
.
unsubscribe
();
}
load
(
refresh
:
boolean
=
false
,
forceSync
:
boolean
=
false
)
{
...
...
This diff is collapsed.
Click to expand it.