mirror of
https://github.com/gurnec/removeddit.git
synced 2026-03-11 08:54:27 +00:00
Update comment counts as downloads progress
This commit is contained in:
parent
31dc89bf13
commit
a97fc287e5
1 changed files with 4 additions and 2 deletions
|
|
@ -363,11 +363,12 @@ class Thread extends React.Component {
|
|||
}
|
||||
|
||||
// Check what is removed / deleted according to reddit
|
||||
let removed = 0, deleted = 0
|
||||
if (isRemoved(comment.body)) {
|
||||
this.state.removed++
|
||||
removed++
|
||||
pushshiftComment.removed = true
|
||||
} else if (isDeleted(comment.body)) {
|
||||
this.state.deleted++
|
||||
deleted++
|
||||
pushshiftComment.deleted = true
|
||||
} else if (pushshiftComment !== comment) {
|
||||
if (isRemoved(pushshiftComment.body)) {
|
||||
|
|
@ -379,6 +380,7 @@ class Thread extends React.Component {
|
|||
pushshiftComment.edited = comment.edited
|
||||
}
|
||||
}
|
||||
this.setState({ removed: this.state.removed + removed, deleted: this.state.deleted + deleted })
|
||||
})
|
||||
return comments.length
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue