Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds Mobile
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
186
Merge Requests
19
Security & Compliance
Packages
Wiki
Snippets
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Minds
Minds Mobile
Commits
2de4182d
Commit
2de4182d
authored
15 hours ago
by
Martin Santangelo
Browse files
Options
Download
(fix) broke pagination after remove too many activities from a unsub channel
parent
5a0f278f
feat/update-feed-on-subscribe-or-unsubscribe
1 merge request
!474
remove the activities from the feed on unsub and reload feed on subscribing
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
src/common/services/feeds.service.js
View file @
2de4182d
...
...
@@ -347,7 +347,10 @@ export default class FeedsService {
* @param {string} guid
*/
async
removeFromOwner
(
guid
:
string
):
Promise
<
void
>
{
let
count
=
this
.
feed
.
length
;
this
.
feed
=
this
.
feed
.
filter
(
e
=>
!
e
.
owner_guid
||
e
.
owner_guid
!==
guid
);
count
-=
this
.
feed
.
length
;
this
.
offset
-=
count
;
await
feedsStorage
.
save
(
this
);
}
...
...
This diff is collapsed.
src/common/stores/FeedStore.js
View file @
2de4182d
...
...
@@ -186,11 +186,15 @@ export default class FeedStore {
@
action
removeFromOwner
(
guid
)
{
this
.
entities
=
this
.
entities
.
filter
(
e
=>
{
return
!
e
.
ownerObj
||
e
.
ownerObj
.
guid
!==
guid
}
e
=>
!
e
.
ownerObj
||
e
.
ownerObj
.
guid
!==
guid
,
);
this
.
feedsService
.
removeFromOwner
(
guid
);
// after the filter we have less than a page of data?
if
(
this
.
feedsService
.
offset
<
this
.
feedsService
.
limit
)
{
// we load another page to prevent block the pagination
this
.
loadMore
();
}
}
/**
...
...
This diff is collapsed.
Please
register
or
sign in
to comment