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
821
Issues
821
List
Boards
Labels
Service Desk
Milestones
Merge Requests
47
Merge Requests
47
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
Commits
ac7bc7cb
Commit
ac7bc7cb
authored
3 minutes ago
by
Mark Harding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(chore): some small changes to in feed boosts
parent
196bd999
master
No related merge requests found
Pipeline
#72679158
running with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
featured-content.component.ts
...components/featured-content/featured-content.component.ts
+3
-2
featured-content.service.ts
...n/components/featured-content/featured-content.service.ts
+9
-3
No files found.
src/app/common/components/featured-content/featured-content.component.ts
View file @
ac7bc7cb
...
...
@@ -66,12 +66,13 @@ export class FeaturedContentComponent implements OnInit {
update
()
{
this
.
clear
();
const
{
component
,
injector
}
=
this
.
resolve
();
if
(
!
this
.
dynamicHost
)
{
console
.
log
(
'
tried to load a boost but no dynamicHost found
'
,
this
.
entity
);
return
;
}
const
{
component
,
injector
}
=
this
.
resolve
();
if
(
component
)
{
const
componentFactory
=
this
.
componentFactoryResolver
.
resolveComponentFactory
(
component
);
...
...
This diff is collapsed.
Click to expand it.
src/app/common/components/featured-content/featured-content.service.ts
View file @
ac7bc7cb
import
{
Injectable
}
from
"
@angular/core
"
;
import
{
filter
,
first
,
map
,
switchMap
}
from
'
rxjs/operators
'
;
import
{
filter
,
first
,
map
,
switchMap
,
mergeMap
,
skip
,
take
}
from
'
rxjs/operators
'
;
import
{
FeedsService
}
from
"
../../services/feeds.service
"
;
@
Injectable
()
...
...
@@ -18,14 +18,20 @@ export class FeaturedContentService {
}
async
fetch
()
{
if
(
this
.
offset
>=
this
.
feedsService
.
rawFeed
.
getValue
().
length
)
{
this
.
offset
=
-
1
;
}
return
await
this
.
feedsService
.
feed
.
pipe
(
filter
(
feed
=>
feed
.
length
>
0
),
first
(),
map
(
feed
=>
feed
[
this
.
offset
++
]),
mergeMap
(
feed
=>
feed
),
skip
(
this
.
offset
++
),
take
(
1
),
switchMap
(
async
entity
=>
{
if
(
!
entity
)
if
(
!
entity
)
{
return
false
;
}
return
await
entity
.
pipe
(
first
()).
toPromise
();
}),
).
toPromise
();
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment