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
824
Issues
824
List
Boards
Labels
Service Desk
Milestones
Merge Requests
48
Merge Requests
48
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
3956dba5d0158b870cbf5cc3b36f3a1d6ea33a74...1b7b3d3da7afae80a49532b51b995a2398048d1c
Source
1b7b3d3da7afae80a49532b51b995a2398048d1c
Select Git revision
...
Target
3956dba5d0158b870cbf5cc3b36f3a1d6ea33a74
Select Git revision
Compare
Commits (3)
(chore): increase boost outlets and lower latency
· 196bd999
Mark Harding
authored
6 hours ago
196bd999
(chore): some small changes to in feed boosts
· ac7bc7cb
Mark Harding
authored
3 hours ago
ac7bc7cb
Merge remote-tracking branch 'origin/master' into feat/disable-comments-526
· 1b7b3d3d
Brian Hatchet
authored
11 minutes ago
1b7b3d3d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
10 deletions
+17
-10
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
+10
-4
sorted.component.ts
src/app/modules/newsfeed/feeds/sorted.component.ts
+4
-4
No files found.
src/app/common/components/featured-content/featured-content.component.ts
View file @
1b7b3d3d
...
...
@@ -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 @
1b7b3d3d
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
()
...
...
@@ -11,21 +11,27 @@ export class FeaturedContentService {
protected
feedsService
:
FeedsService
,
)
{
this
.
feedsService
.
setLimit
(
50
)
.
setLimit
(
12
)
.
setOffset
(
0
)
.
setEndpoint
(
'
api/v2/boost/feed
'
)
.
fetch
();
}
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.
src/app/modules/newsfeed/feeds/sorted.component.ts
View file @
1b7b3d3d
...
...
@@ -295,10 +295,10 @@ export class NewsfeedSortedComponent implements OnInit, OnDestroy {
}
shouldShowBoost
(
i
:
number
)
{
if
(
this
.
query
)
{
return
false
;
}
//
if (this.query) {
//
return false;
//
}
return
(
i
>
0
&&
(
i
%
8
)
===
0
&&
i
<=
40
)
||
i
===
2
;
return
(
i
>
0
&&
(
i
%
5
)
===
0
&&
i
<=
80
)
||
i
===
1
;
}
}
This diff is collapsed.
Click to expand it.