mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
fix block send in mobile
This commit is contained in:
parent
1252e52dba
commit
c342ed73b4
@ -154,22 +154,22 @@ export function AddTopic({ contentKey, shareIntent, setShareIntent }) {
|
||||
blurOnSubmit={true} onSubmitEditing={sendMessage} returnKeyType="send"
|
||||
autoCapitalize="sentences" placeholder="New Message" multiline={true} />
|
||||
<View style={styles.addButtons}>
|
||||
{ !state.locked && state.enableImage && (
|
||||
{ state.enableImage && (
|
||||
<TouchableOpacity style={styles.addButton} onPress={addImage}>
|
||||
<AntIcons name="picture" size={20} color={Colors.text} />
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
{ !state.locked && state.enableVideo && (
|
||||
{ state.enableVideo && (
|
||||
<TouchableOpacity style={styles.addButton} onPress={addVideo}>
|
||||
<MatIcons name="video-outline" size={24} color={Colors.text} />
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
{ !state.locked && state.enableAudio && (
|
||||
{ state.enableAudio && (
|
||||
<TouchableOpacity style={styles.addButton} onPress={addAudio}>
|
||||
<MatIcons name="music-box-outline" size={20} color={Colors.text} />
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
{ !state.locked && (
|
||||
{ (state.enableImage || state.enableVideo || state.enableAudio) && (
|
||||
<View style={styles.divider} />
|
||||
)}
|
||||
<TouchableOpacity style={styles.addButton} onPress={actions.showFontSize}>
|
||||
|
@ -38,9 +38,6 @@ export function useAddTopic(contentKey) {
|
||||
|
||||
useEffect(() => {
|
||||
let conflict = false;
|
||||
if (state.locked && state.assets.length > 0) {
|
||||
conflict = true;
|
||||
}
|
||||
state.assets.forEach(asset => {
|
||||
if (asset.type === 'image' && !state.enableImage) {
|
||||
conflict = true;
|
||||
@ -114,7 +111,7 @@ export function useAddTopic(contentKey) {
|
||||
return null;
|
||||
}
|
||||
const block = await RNFS.read(file, len, pos, 'base64');
|
||||
return getEncryptedBlock(block, contentKey);
|
||||
return encryptBlock(block, contentKey);
|
||||
}
|
||||
return { data: url, encrypted: true, size: stat.size, getEncryptedBlock };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user