Handle post deletions by removing from active views (close #37)
This commit is contained in:
parent
ace0e6bfd9
commit
ebc2033d18
7 changed files with 59 additions and 4 deletions
|
@ -46,9 +46,11 @@ export const Home = observer(function Home({
|
|||
)
|
||||
|
||||
useEffect(() => {
|
||||
const feedCleanup = store.me.mainFeed.registerListeners()
|
||||
const pollInterval = setInterval(() => doPoll(), 15e3)
|
||||
const cleanup = () => {
|
||||
clearInterval(pollInterval)
|
||||
feedCleanup()
|
||||
}
|
||||
|
||||
if (!visible) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue