wrap mutation in runInAction (#1305)

zio/stable
Eric Bailey 2023-08-28 13:55:56 -05:00 committed by GitHub
parent a3cb12f584
commit c77fd588e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import React, {useRef} from 'react'
import {runInAction} from 'mobx'
import {observer} from 'mobx-react-lite'
import {
ActivityIndicator,
@ -361,7 +362,9 @@ function* flattenThread(
}
}
} else if (!isAscending && !post.parent && post.post.replyCount) {
post._hasMore = true
runInAction(() => {
post._hasMore = true
})
}
}