Skip to content

Commit

Permalink
Fix wrong attachments when sending simple message
Browse files Browse the repository at this point in the history
  • Loading branch information
fjsj committed Jan 15, 2025
1 parent c77cfa3 commit 5545900
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions components/ChatMessageInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function ChatMessageInput({
<Button
variant="outline"
size="md"
onPress={onAttachment}
onPress={() => onAttachment()}
disabled={isAttaching}
className="mr-3 aspect-square border-outline-300 p-2 disabled:bg-background-300"
>
Expand All @@ -44,7 +44,7 @@ export function ChatMessageInput({
<Button
variant="solid"
size="md"
onPress={onSend}
onPress={() => onSend()}
disabled={!message.trim() || isSending}
className="ml-3 aspect-square rounded-full bg-success-500 p-2 disabled:bg-background-300"
>
Expand Down
2 changes: 1 addition & 1 deletion components/CreateThreadModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function CreateThreadModal({ isOpen, onClose, onCreateThread }: CreateThr
</View>
</ModalBody>
<ModalFooter>
<Button variant="outline" onPress={onClose} className="mr-2">
<Button variant="outline" onPress={() => onClose()} className="mr-2">
<ButtonText>Cancel</ButtonText>
</Button>
<Button
Expand Down
4 changes: 2 additions & 2 deletions components/ThreadList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function ThreadItem({
return (
<Animated.View entering={FadeInDown.delay(index * 50).springify()}>
<Pressable
onPress={onPress}
onPress={() => onPress()}
className="overflow-hidden bg-background-0 active:bg-secondary-100"
>
<View className="flex-row items-center gap-3 p-4">
Expand Down Expand Up @@ -96,7 +96,7 @@ function EmptyState({ onCreateThread }: { onCreateThread?: () => void }) {
variant="solid"
action="primary"
size="md"
onPress={onCreateThread}
onPress={() => onCreateThread()}
>
<ButtonIcon as={PlusIcon} size="sm" />
<ButtonText>New Thread</ButtonText>
Expand Down
2 changes: 1 addition & 1 deletion components/ThreadListHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function ThreadListHeader({ onLogout, onCreateThread }: ThreadListHeaderP

<View className="flex-row items-center gap-2">
{isPatient && onCreateThread && (
<Button variant="outline" action="primary" size="sm" onPress={onCreateThread}>
<Button variant="outline" action="primary" size="sm" onPress={() => onCreateThread()}>
<ButtonIcon as={PlusIcon} size="sm" />
<ButtonText>New Thread</ButtonText>
</Button>
Expand Down

0 comments on commit 5545900

Please sign in to comment.