From 5db84bd89c8808b0895c7206e8a6a58043f9f8dc Mon Sep 17 00:00:00 2001
From: Matthias Nott <mnott@mnsoft.org>
Date: Sat, 07 Mar 2026 18:04:16 +0100
Subject: [PATCH] feat: heartbeat fix, copy messages, copy/share images, hide unknown duration

---
 components/chat/ImageViewer.tsx |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/components/chat/ImageViewer.tsx b/components/chat/ImageViewer.tsx
index e10aa5f..0bd0188 100644
--- a/components/chat/ImageViewer.tsx
+++ b/components/chat/ImageViewer.tsx
@@ -10,6 +10,7 @@
   View,
 } from "react-native";
 import { cacheDirectory, writeAsStringAsync } from "expo-file-system/legacy";
+import * as Clipboard from "expo-clipboard";
 import * as Sharing from "expo-sharing";
 
 /** Apple-style share icon (square with upward arrow) */
@@ -68,6 +69,14 @@
 export function ImageViewer({ visible, imageBase64, onClose }: ImageViewerProps) {
   const { width, height } = Dimensions.get("window");
 
+  const handleCopy = useCallback(async () => {
+    try {
+      await Clipboard.setImageAsync(`data:image/png;base64,${imageBase64}`);
+    } catch (err: any) {
+      Alert.alert("Copy Error", err?.message ?? String(err));
+    }
+  }, [imageBase64]);
+
   const handleShare = useCallback(async () => {
     try {
       const fileUri = `${cacheDirectory}pailot-screenshot-${Date.now()}.png`;
@@ -105,6 +114,20 @@
           }}
         >
           <Pressable
+            onPress={handleCopy}
+            hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }}
+            style={{
+              width: 40,
+              height: 40,
+              borderRadius: 20,
+              backgroundColor: "rgba(255,255,255,0.15)",
+              alignItems: "center",
+              justifyContent: "center",
+            }}
+          >
+            <Text style={{ color: "#fff", fontSize: 18 }}>📋</Text>
+          </Pressable>
+          <Pressable
             onPress={handleShare}
             hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }}
             style={{

--
Gitblit v1.3.1