Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Commits on Source (2)
Pro Feeds not working
· 9b97502d
Marcelo Rivera
authored
Oct 16, 2019
and
Mark Harding
committed
Oct 16, 2019
9b97502d
Merge branch 'fix/filter-issue-in-pro' into 'master'
· 453a078a
Mark Harding
authored
Oct 16, 2019
Pro Feeds not working Closes
#2107
See merge request
!594
453a078a
Hide whitespace changes
Inline
Side-by-side
src/app/modules/pro/channel/list/list.component.ts
View file @
453a078a
...
...
@@ -7,7 +7,7 @@ import {
OnInit
,
}
from
'
@angular/core
'
;
import
{
ActivatedRoute
,
Router
}
from
'
@angular/router
'
;
import
{
Subscription
}
from
'
rxjs
'
;
import
{
BehaviorSubject
,
Subscription
}
from
'
rxjs
'
;
import
{
FeedsService
}
from
'
../../../../common/services/feeds.service
'
;
import
{
NavItems
,
...
...
@@ -17,6 +17,7 @@ import {
import
{
OverlayModalService
}
from
'
../../../../services/ux/overlay-modal
'
;
import
{
MindsTitle
}
from
'
../../../../services/ux/title
'
;
import
{
filter
}
from
'
rxjs/operators
'
;
import
{
map
}
from
'
rxjs/operators
'
;
@
Component
({
selector
:
'
m-pro--channel-list
'
,
...
...
@@ -41,6 +42,8 @@ export class ProChannelListComponent implements OnInit, OnDestroy {
selectedHashtag
:
string
=
'
all
'
;
entities$
;
constructor
(
public
feedsService
:
FeedsService
,
protected
modalService
:
OverlayModalService
,
...
...
@@ -50,7 +53,20 @@ export class ProChannelListComponent implements OnInit, OnDestroy {
protected
router
:
Router
,
protected
cd
:
ChangeDetectorRef
,
protected
injector
:
Injector
)
{}
)
{
this
.
entities$
=
this
.
feedsService
.
feed
.
pipe
(
map
((
elements
:
BehaviorSubject
<
any
>
[])
=>
{
return
elements
.
filter
((
element
:
BehaviorSubject
<
any
>
)
=>
{
const
entity
=
element
.
getValue
();
return
(
!!
entity
.
thumbnail_src
||
!!
entity
.
custom_data
||
(
entity
.
thumbnails
&&
entity
.
thumbnails
.
length
>
0
)
);
});
})
);
}
ngOnInit
()
{
this
.
params$
=
this
.
route
.
params
.
subscribe
(
params
=>
{
...
...
@@ -166,12 +182,6 @@ export class ProChannelListComponent implements OnInit, OnDestroy {
this
.
channelService
.
pushMenuNavItems
(
navItems
,
true
);
}
get
entities
$
()
{
return
this
.
feedsService
.
feed
.
pipe
(
filter
((
entity
:
any
)
=>
!!
entity
.
thumbnail_src
)
);
}
get
hasMore
$
()
{
return
this
.
feedsService
.
hasMore
;
}
...
...