Skip to content

Commit

Permalink
fix: loader instead of empty conversation #1148 (#1149)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikbry authored Aug 1, 2024
1 parent 1357bae commit 01d86a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions webapp/features/Threads/Thread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function Thread({

const { t } = useTranslation();

const [messageUpdating, setMessageUpdating] = useState<boolean>(true);
const [messageUpdating, setMessageUpdating] = useState<boolean>(false);
useEffect(() => {
if (conversationId && messagesState[conversationId] !== StorageState.OK) {
if (!isConversationMessagesLoaded(conversationId)) {
Expand Down Expand Up @@ -459,10 +459,8 @@ function Thread({
threadState === StorageState.INIT ||
threadState === StorageState.LOADING ||
(conversationId &&
(messagesState[conversationId] === undefined ||
messagesState[conversationId] === StorageState.INIT ||
(messagesState[conversationId] === StorageState.INIT ||
messagesState[conversationId] === StorageState.LOADING));

return (
<ContentView
header={
Expand Down
2 changes: 1 addition & 1 deletion webapp/features/Threads/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export default function MainThreads({ selectedThreadId, view = ViewName.Recent }
/>
);

const isLoading = workspaceStorage.isLoading() || threadStorage.isLoading();
const isLoading = workspaceStorage.isLoading();

if (isLoading) {
return <Loading />;
Expand Down

0 comments on commit 01d86a5

Please sign in to comment.