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
|
@ -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])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue