From bafb55afa9da978258c8c1476809b2997a2a7a3f Mon Sep 17 00:00:00 2001 From: Ahtisham Shahid Date: Wed, 1 Feb 2023 14:17:43 +0500 Subject: [PATCH] fix: use threads api in case of search (#419) * fix: use threads api in case of search --- src/discussions/posts/PostsList.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/discussions/posts/PostsList.jsx b/src/discussions/posts/PostsList.jsx index 9ef5642b..12ca8a9e 100644 --- a/src/discussions/posts/PostsList.jsx +++ b/src/discussions/posts/PostsList.jsx @@ -50,8 +50,7 @@ function PostsList({ topicIds, isFilterChanged, }; - - if (showOwnPosts) { + if (showOwnPosts && filters.search === '') { dispatch(fetchUserPosts(courseId, params)); } else { dispatch(fetchThreads(courseId, params));