mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
fix handling of failed posts
This commit is contained in:
parent
0ac7dffd29
commit
1d271d2eb8
@ -106,7 +106,7 @@ export function TopicItem({ item, focused, focus, hosting, remove, update, block
|
|||||||
{ state.sharing && (
|
{ state.sharing && (
|
||||||
<ActivityIndicator style={styles.share} color={Colors.white} size="small" />
|
<ActivityIndicator style={styles.share} color={Colors.white} size="small" />
|
||||||
)}
|
)}
|
||||||
{ !state.sharing && contentKey == null && (
|
{ state.shareable && !state.sharing && contentKey == null && (
|
||||||
<TouchableOpacity style={styles.share} onPress={shareMessage}>
|
<TouchableOpacity style={styles.share} onPress={shareMessage}>
|
||||||
<MatIcons name="share-variant-outline" size={18} color={Colors.white} />
|
<MatIcons name="share-variant-outline" size={18} color={Colors.white} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
@ -119,7 +119,7 @@ export function TopicItem({ item, focused, focus, hosting, remove, update, block
|
|||||||
<TouchableOpacity style={styles.icon} onPress={() => actions.promptBlock(block)}>
|
<TouchableOpacity style={styles.icon} onPress={() => actions.promptBlock(block)}>
|
||||||
<MatIcons name="block-helper" size={18} color={Colors.white} />
|
<MatIcons name="block-helper" size={18} color={Colors.white} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
{ !state.editable && (
|
{ state.flagable && (
|
||||||
<TouchableOpacity style={styles.icon} onPress={() => actions.promptReport(report)}>
|
<TouchableOpacity style={styles.icon} onPress={() => actions.promptReport(report)}>
|
||||||
<MatIcons name="flag-outline" size={22} color={Colors.white} />
|
<MatIcons name="flag-outline" size={22} color={Colors.white} />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
@ -35,8 +35,10 @@ export function useTopicItem(item, hosting, remove, contentKey) {
|
|||||||
activeId: null,
|
activeId: null,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontColor: Colors.text,
|
fontColor: Colors.text,
|
||||||
|
shareable: false,
|
||||||
editable: false,
|
editable: false,
|
||||||
deletable: false,
|
deletable: false,
|
||||||
|
flagable: false,
|
||||||
assets: [],
|
assets: [],
|
||||||
sharing: false,
|
sharing: false,
|
||||||
monthLast: false,
|
monthLast: false,
|
||||||
@ -254,10 +256,12 @@ export function useTopicItem(item, hosting, remove, contentKey) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const shareable = parsed;
|
||||||
const editable = guid === identity?.guid && parsed;
|
const editable = guid === identity?.guid && parsed;
|
||||||
const deletable = editable || hosting;
|
const flagable = guid !== identity?.guid;
|
||||||
|
const deletable = guid === identity?.guid || hosting;
|
||||||
|
|
||||||
updateState({ logo, name, nameSet, known, sealed, message, clickable, fontSize, fontColor, timestamp, transform, status, assets, deletable, editable, editData: parsed, editMessage: message, editType: dataType });
|
updateState({ logo, name, nameSet, known, sealed, message, clickable, fontSize, fontColor, timestamp, transform, status, assets, deletable, shareable, editable, flagable, editData: parsed, editMessage: message, editType: dataType });
|
||||||
}, [conversation.state, card.state, account.state, profile.state, item, contentKey]);
|
}, [conversation.state, card.state, account.state, profile.state, item, contentKey]);
|
||||||
|
|
||||||
const unsealTopic = async (topicId, revision, topicDetail) => {
|
const unsealTopic = async (topicId, revision, topicDetail) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user