mirror of
https://github.com/balzack/databag.git
synced 2025-02-11 19:19: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 && (
|
||||
<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}>
|
||||
<MatIcons name="share-variant-outline" size={18} color={Colors.white} />
|
||||
</TouchableOpacity>
|
||||
@ -119,7 +119,7 @@ export function TopicItem({ item, focused, focus, hosting, remove, update, block
|
||||
<TouchableOpacity style={styles.icon} onPress={() => actions.promptBlock(block)}>
|
||||
<MatIcons name="block-helper" size={18} color={Colors.white} />
|
||||
</TouchableOpacity>
|
||||
{ !state.editable && (
|
||||
{ state.flagable && (
|
||||
<TouchableOpacity style={styles.icon} onPress={() => actions.promptReport(report)}>
|
||||
<MatIcons name="flag-outline" size={22} color={Colors.white} />
|
||||
</TouchableOpacity>
|
||||
|
@ -35,8 +35,10 @@ export function useTopicItem(item, hosting, remove, contentKey) {
|
||||
activeId: null,
|
||||
fontSize: 14,
|
||||
fontColor: Colors.text,
|
||||
shareable: false,
|
||||
editable: false,
|
||||
deletable: false,
|
||||
flagable: false,
|
||||
assets: [],
|
||||
sharing: false,
|
||||
monthLast: false,
|
||||
@ -254,10 +256,12 @@ export function useTopicItem(item, hosting, remove, contentKey) {
|
||||
}
|
||||
}
|
||||
|
||||
const shareable = 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]);
|
||||
|
||||
const unsealTopic = async (topicId, revision, topicDetail) => {
|
||||
|
Loading…
Reference in New Issue
Block a user