Skip to content

Commit

Permalink
fix: potential fix for incorrect character portraits
Browse files Browse the repository at this point in the history
  • Loading branch information
Vali-98 committed Feb 22, 2024
1 parent f5dd44d commit 5779de2
Show file tree
Hide file tree
Showing 4 changed files with 23,955 additions and 23,945 deletions.
6 changes: 6 additions & 0 deletions app/Settings.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { FontAwesome } from '@expo/vector-icons'
import { Global, Color, Users } from '@globals'
import { useRouter } from 'expo-router'
import { nativeApplicationVersion } from 'expo-application'
import React from 'react'
import { SafeAreaView, View, Text, Image, StyleSheet, TouchableOpacity } from 'react-native'
import { useMMKVString } from 'react-native-mmkv'
Expand Down Expand Up @@ -69,6 +70,11 @@ const Settings = () => {
<Text style={styles.largeButtonText}>Lorebooks</Text>
</TouchableOpacity>
)}

<Text style={{ alignSelf: 'center', color: Color.Offwhite, marginTop: 8 }}>
{__DEV__ && 'DEV BUILD\t'}
{'v' + require(`../app.json`).expo.version}
</Text>
</View>
</SafeAreaView>
)
Expand Down
6 changes: 5 additions & 1 deletion components/ChatMenu/ChatWindow/ChatFrame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ const ChatFrame: React.FC<ChatFrameProps> = ({
})

useEffect(() => {
setImageSource({ uri: imageDir })
const newdir =
message.name === userName
? Users.getImageDir(userName)
: Characters.getImageDir(charName)
setImageSource({ uri: newdir })
}, [charName])

const handleImageError = () => {
Expand Down
Loading

0 comments on commit 5779de2

Please sign in to comment.