From 4eaac1eb035b5b5ce4a48e6ea1e4c79bcff74a5f Mon Sep 17 00:00:00 2001 From: ayesha waris <73840786+ayeshoali@users.noreply.github.com> Date: Tue, 27 Dec 2022 18:24:58 +0500 Subject: [PATCH] fix: loading icon and filter menu shows when api call is in progress in my posts tab (#389) --- src/discussions/posts/data/slices.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/discussions/posts/data/slices.js b/src/discussions/posts/data/slices.js index c5c6bce5..6501f9ff 100644 --- a/src/discussions/posts/data/slices.js +++ b/src/discussions/posts/data/slices.js @@ -57,7 +57,6 @@ const threadsSlice = createSlice({ if (state.author !== payload.author) { state.pages = []; state.author = payload.author; - state.totalThreads = null; } state.status = RequestStatus.IN_PROGRESS; }, @@ -161,9 +160,11 @@ const threadsSlice = createSlice({ }, updateThreadFailed: (state) => { state.postStatus = RequestStatus.FAILED; + state.totalThreads = 0; }, updateThreadDenied: (state) => { state.postStatus = RequestStatus.DENIED; + state.totalThreads = 0; }, deleteThreadRequest: (state) => { state.postStatus = RequestStatus.IN_PROGRESS;