From 5d6d9f75f47a4b4a4e8970f0556767d6d53b52a1 Mon Sep 17 00:00:00 2001 From: Rishabh Saxena Date: Mon, 2 Aug 2021 16:05:58 +0530 Subject: [PATCH] [Fix] Refresh sidebar comments list when a thread is unresolved (#6326) --- .../commentsReducer/handleUpdateCommentThreadEvent.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/client/src/reducers/uiReducers/commentsReducer/handleUpdateCommentThreadEvent.ts b/app/client/src/reducers/uiReducers/commentsReducer/handleUpdateCommentThreadEvent.ts index fcff6f63af..423b976788 100644 --- a/app/client/src/reducers/uiReducers/commentsReducer/handleUpdateCommentThreadEvent.ts +++ b/app/client/src/reducers/uiReducers/commentsReducer/handleUpdateCommentThreadEvent.ts @@ -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 || {}),