Handle post deletions by removing from active views (close #37)
This commit is contained in:
@@ -25,8 +25,9 @@ export const PostThread = ({navIdx, visible, params}: ScreenParams) => {
|
||||
}
|
||||
useEffect(() => {
|
||||
let aborted = false
|
||||
const threadCleanup = view.registerListeners()
|
||||
if (!visible) {
|
||||
return
|
||||
return threadCleanup
|
||||
}
|
||||
setTitle()
|
||||
store.shell.setMinimalShellMode(false)
|
||||
@@ -44,6 +45,7 @@ export const PostThread = ({navIdx, visible, params}: ScreenParams) => {
|
||||
}
|
||||
return () => {
|
||||
aborted = true
|
||||
threadCleanup()
|
||||
}
|
||||
}, [visible, store.nav, store.log, name])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user