[Fix] Refresh sidebar comments list when a thread is unresolved (#6326)

This commit is contained in:
Rishabh Saxena 2021-08-02 16:05:58 +05:30 committed by GitHub
parent 538fe8ea00
commit 5d6d9f75f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,11 +17,11 @@ const handleUpdateCommentThreadEvent = (
commentThreadInStore?.pinnedState?.active !==
action.payload?.pinnedState?.active;
const isNowResolved =
!commentThreadInStore?.resolvedState?.active &&
const resolvedStateUpdated =
!commentThreadInStore?.resolvedState?.active !==
action.payload?.resolvedState?.active;
const shouldRefreshList = isNowResolved || pinnedStateChanged;
const shouldRefreshList = resolvedStateUpdated || pinnedStateChanged;
state.commentThreadsMap[id] = {
...(commentThreadInStore || {}),