diff --git a/components/ChatMessageBubble.tsx b/components/ChatMessageBubble.tsx
index c2fa97b..090e9d6 100644
--- a/components/ChatMessageBubble.tsx
+++ b/components/ChatMessageBubble.tsx
@@ -2,6 +2,7 @@ import { useMedplumProfile } from "@medplum/react-hooks";
import { useVideoPlayer } from "expo-video";
import { VideoView } from "expo-video";
import { CirclePlay, FileDown, UserRound } from "lucide-react-native";
+import { useColorScheme } from "nativewind";
import { memo, useCallback, useRef, useState } from "react";
import { Pressable, StyleSheet, View } from "react-native";
import { Alert } from "react-native";
@@ -15,7 +16,6 @@ import type { ChatMessage } from "@/models/chat";
import type { AttachmentWithUrl } from "@/types/attachment";
import { formatTime } from "@/utils/datetime";
import { isMediaExpired, mediaKey, shareFile } from "@/utils/media";
-import { getThemeColor } from "@/utils/theme";
interface ChatMessageBubbleProps {
message: ChatMessage;
@@ -82,6 +82,7 @@ VideoAttachment.displayName = "VideoAttachment";
function FileAttachment({ attachment }: { attachment: AttachmentWithUrl }) {
const [isDownloading, setIsDownloading] = useState(false);
+ const { colorScheme } = useColorScheme();
const handleShare = useCallback(async () => {
setIsDownloading(true);
@@ -102,7 +103,7 @@ function FileAttachment({ attachment }: { attachment: AttachmentWithUrl }) {
disabled={isDownloading}
>
{isDownloading ? (
-
+
) : (
)}
diff --git a/components/CreateThreadModal.tsx b/components/CreateThreadModal.tsx
index ea6d28e..e85adb6 100644
--- a/components/CreateThreadModal.tsx
+++ b/components/CreateThreadModal.tsx
@@ -1,5 +1,6 @@
import { useRouter } from "expo-router";
import { X } from "lucide-react-native";
+import { useColorScheme } from "nativewind";
import { useCallback, useState } from "react";
import { Modal as RNModal, Pressable } from "react-native";
import Animated, { FadeIn, FadeOut } from "react-native-reanimated";
@@ -9,7 +10,6 @@ import { Icon } from "@/components/ui/icon";
import { Input, InputField } from "@/components/ui/input";
import { Text } from "@/components/ui/text";
import { View } from "@/components/ui/view";
-import { getThemeColor } from "@/utils/theme";
interface CreateThreadModalProps {
isOpen: boolean;
@@ -69,6 +69,8 @@ interface ModalFooterProps {
}
function ModalFooter({ onClose, onCreate, isCreating, isValid }: ModalFooterProps) {
+ const { colorScheme } = useColorScheme();
+
return (