diff --git a/components/ChatMenu/ChatWindow/ChatItem.js b/components/ChatMenu/ChatWindow/ChatItem.js
index 748164d..7f56002 100644
--- a/components/ChatMenu/ChatWindow/ChatItem.js
+++ b/components/ChatMenu/ChatWindow/ChatItem.js
@@ -15,7 +15,7 @@ import Markdown from 'react-native-markdown-package'
import { useMMKVBoolean, useMMKVObject, useMMKVString } from 'react-native-mmkv'
import AnimatedEllipsis from 'rn-animated-ellipsis'
import SimpleMarkdown from 'simple-markdown'
-
+import * as FS from 'expo-file-system'
import TTSMenu from './TTS'
// global chat property for editing
@@ -35,8 +35,8 @@ const ChatItem = ({ id }) => {
const [placeholderText, setPlaceholderText] = useState(message.mes)
const [editMode, setEditMode] = useState(false)
// figure this out
- //const [imageExists, setImageExists] = useState(true)
- /*useEffect(() => {
+ const [imageExists, setImageExists] = useState(true)
+ useEffect(() => {
FS.readAsStringAsync(
message.name === charName
? Characters.getImageDir(charName)
@@ -45,7 +45,7 @@ const ChatItem = ({ id }) => {
.then(() => setImageExists(true))
.catch(() => setImageExists(false))
setPlaceholderText(messages.at(id + 1).mes)
- }, [message])*/
+ }, [message])
useEffect(() => {
setEditMode(false)
@@ -138,9 +138,11 @@ const ChatItem = ({ id }) => {
#{id}
@@ -189,7 +191,10 @@ const ChatItem = ({ id }) => {
{!editMode ? (
- message.name === charName && message.mes === '' && nowGenerating ? (
+ message.name === charName &&
+ message.mes === '' &&
+ nowGenerating &&
+ id === messages.length - 2 ? (
diff --git a/components/ChatMenu/ChatWindow/ChatWindow.js b/components/ChatMenu/ChatWindow/ChatWindow.js
index dd7a287..19182c8 100644
--- a/components/ChatMenu/ChatWindow/ChatWindow.js
+++ b/components/ChatMenu/ChatWindow/ChatWindow.js
@@ -28,7 +28,7 @@ const ChatWindow = ({ messages }) => {
item.key}
renderItem={({ item, index }) => (