mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-16 23:31:19 +03:00
Fix wrong filtered counts due to grouped boosts
This commit is contained in:
parent
552ad249e5
commit
da909e4084
1 changed files with 32 additions and 31 deletions
|
@ -431,7 +431,7 @@ function Catchup() {
|
|||
|
||||
// Deduplicate boosts
|
||||
const boostedPosts = {};
|
||||
filteredPosts = filteredPosts.filter((post) => {
|
||||
filteredPosts.forEach((post) => {
|
||||
if (post.reblog) {
|
||||
if (boostedPosts[post.reblog.id]) {
|
||||
if (boostedPosts[post.reblog.id].__BOOSTERS) {
|
||||
|
@ -439,12 +439,11 @@ function Catchup() {
|
|||
} else {
|
||||
boostedPosts[post.reblog.id].__BOOSTERS = new Set([post.account]);
|
||||
}
|
||||
return false;
|
||||
post.__HIDDEN = true;
|
||||
} else {
|
||||
boostedPosts[post.reblog.id] = post;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
if (selectedAuthor && authorCountsMap.has(selectedAuthor)) {
|
||||
|
@ -479,7 +478,9 @@ function Catchup() {
|
|||
authorCountsList.forEach((authorID, index) => {
|
||||
authorIndices[authorID] = index;
|
||||
});
|
||||
return filteredPosts.sort((a, b) => {
|
||||
return filteredPosts
|
||||
.filter((post) => !post.__HIDDEN)
|
||||
.sort((a, b) => {
|
||||
if (groupBy === 'account') {
|
||||
const aAccountID = a.account.id;
|
||||
const bAccountID = b.account.id;
|
||||
|
|
Loading…
Add table
Reference in a new issue