Skip to content

Commit

Permalink
Show loading dots when sending message
Browse files Browse the repository at this point in the history
  • Loading branch information
fjsj committed Jan 20, 2025
1 parent 8a64438 commit b04878d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/(app)/thread/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default function ThreadPage() {
return (
<View className="flex-1 bg-background-50">
<ChatHeader currentThread={thread} getAvatarURL={getAvatarURL} />
<ChatMessageList messages={thread.messages} loading={isLoading} />
<ChatMessageList messages={thread.messages} loading={isSending || isLoading} />
<ChatMessageInput
message={message}
setMessage={setMessage}
Expand Down
2 changes: 1 addition & 1 deletion components/ChatMessageList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function ChatMessageList({ messages, loading }: ChatMessageListProps) {
windowSize={5}
removeClippedSubviews
inverted
ListFooterComponent={loading ? <LoadingDots /> : null}
ListHeaderComponent={loading ? <LoadingDots /> : null}
/>
);
}

0 comments on commit b04878d

Please sign in to comment.