mirror of
https://github.com/balzack/databag.git
synced 2025-04-22 01:25:17 +00:00
added pan/zoom on images
This commit is contained in:
parent
5bb3c851ca
commit
75519d036d
@ -622,7 +622,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.15;
|
||||
MARKETING_VERSION = 1.17;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-ObjC",
|
||||
@ -656,7 +656,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.15;
|
||||
MARKETING_VERSION = 1.17;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-ObjC",
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "src",
|
||||
"dependencies": {
|
||||
"react-native-awesome-gallery": "^0.3.5",
|
||||
"react-native-fs": "^2.20.0"
|
||||
}
|
||||
}
|
||||
|
@ -4,40 +4,22 @@ import { styles } from './ImageAsset.styled';
|
||||
import Colors from 'constants/Colors';
|
||||
import Ionicons from 'react-native-vector-icons/AntDesign';
|
||||
import FastImage from 'react-native-fast-image'
|
||||
import Gallery from 'react-native-awesome-gallery';
|
||||
|
||||
export function ImageAsset({ asset, dismiss }) {
|
||||
const { state, actions } = useImageAsset(asset);
|
||||
|
||||
return (
|
||||
<TouchableOpacity style={styles.container} activeOpacity={1} onPress={actions.showControls}>
|
||||
<FastImage source={{ uri: asset.thumb }} onLoad={actions.setRatio}
|
||||
style={{ ...styles.thumb, width: state.imageWidth, height: state.imageHeight }}
|
||||
resizeMode={FastImage.resizeMode.contain} />
|
||||
<TouchableOpacity activeOpacity={1} style={{ display: 'flex', width: '100%', height: '100%' }} onPress={actions.showControls}>
|
||||
{ state.url && (
|
||||
<FastImage source={{ uri: state.url }} onLoad={actions.loaded}
|
||||
style={{ ...styles.main, width: state.imageWidth, height: state.imageHeight }}
|
||||
resizeMode={FastImage.resizeMode.contain} />
|
||||
<Gallery data={[ state.url ]} onIndexChange={actions.loaded}
|
||||
style={{ ...styles.main }} />
|
||||
)}
|
||||
|
||||
{ state.loaded && state.controls && (
|
||||
{ state.controls && (
|
||||
<TouchableOpacity style={styles.close} onPress={dismiss}>
|
||||
<Ionicons name={'close'} size={32} color={Colors.white} />
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
|
||||
{ state.failed && (
|
||||
<TouchableOpacity style={styles.loading} onPress={dismiss}>
|
||||
<ActivityIndicator color={Colors.alert} size="large" />
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
{ !state.loaded && !state.failed && (
|
||||
<TouchableOpacity style={styles.loading} onPress={dismiss}>
|
||||
<ActivityIndicator color={Colors.white} size="large" />
|
||||
{ asset.total > 1 && (
|
||||
<Text style={styles.decrypting}>{ asset.block } / { asset.total }</Text>
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
|
@ -80,7 +80,6 @@ export function useConversation() {
|
||||
const { logo, subject } = getChannelSubjectLogo(cardId, profileGuid, channel, cards, cardImageUrl);
|
||||
|
||||
if (channel?.topicRevision && channel.readRevision !== channel.topicRevision) {
|
||||
console.log("READ:", channel.topicRevision);
|
||||
conversation.actions.setChannelReadRevision(channel.topicRevision);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user