mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 20:49:16 +00:00
fix for delayed rendering of offsync card status
This commit is contained in:
parent
c9d0dca5b0
commit
e5fdfefcb7
@ -186,7 +186,7 @@ export function useCardContext() {
|
|||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
entry.offsync = true;
|
entry.card.offsync = true;
|
||||||
await store.actions.setCardItemOffsync(guid, card.id);
|
await store.actions.setCardItemOffsync(guid, card.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -354,7 +354,7 @@ export function useConversationContext() {
|
|||||||
else if (channelId) {
|
else if (channelId) {
|
||||||
channel.actions.setTopicFlag(channelId, topicId);
|
channel.actions.setTopicFlag(channelId, topicId);
|
||||||
}
|
}
|
||||||
setTopicField(topicId, 'blocked', 1);
|
setTopicField(topicId, 'blocked', true);
|
||||||
updateState({ topics: topics.current });
|
updateState({ topics: topics.current });
|
||||||
},
|
},
|
||||||
clearTopicFlag: async (topicId) => {
|
clearTopicFlag: async (topicId) => {
|
||||||
@ -365,7 +365,7 @@ export function useConversationContext() {
|
|||||||
else if (channelId) {
|
else if (channelId) {
|
||||||
channel.actions.clearTopicFlag(channelId, topicId);
|
channel.actions.clearTopicFlag(channelId, topicId);
|
||||||
}
|
}
|
||||||
setTopicField(topicId, 'blocked', 0);
|
setTopicField(topicId, 'blocked', false);
|
||||||
updateState({ topics: topics.current });
|
updateState({ topics: topics.current });
|
||||||
},
|
},
|
||||||
getTopicAssetUrl: (topicId, assetId) => {
|
getTopicAssetUrl: (topicId, assetId) => {
|
||||||
|
@ -180,8 +180,8 @@ export function useStoreContext() {
|
|||||||
notifiedProfile: card.notified_profile,
|
notifiedProfile: card.notified_profile,
|
||||||
notifiedArticle: card.notified_article,
|
notifiedArticle: card.notified_article,
|
||||||
notifiedChannel: card.notified_channel,
|
notifiedChannel: card.notified_channel,
|
||||||
offsync: card.offsync,
|
offsync: card.offsync === 1,
|
||||||
blocked: card.blocked,
|
blocked: card.blocked === 1,
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -35,10 +35,10 @@ export function CardItem({ item, openContact, enableIce, call, message }) {
|
|||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
{ item.status === 'connected' && item.offsync === 1 && (
|
{ item.status === 'connected' && item.offsync && (
|
||||||
<View style={styles.offsync} />
|
<View style={styles.offsync} />
|
||||||
)}
|
)}
|
||||||
{ item.status === 'connected' && item.offsync !== 1 && (
|
{ item.status === 'connected' && !item.offsync && (
|
||||||
<View style={styles.connected} />
|
<View style={styles.connected} />
|
||||||
)}
|
)}
|
||||||
{ item.status === 'requested' && (
|
{ item.status === 'requested' && (
|
||||||
|
@ -91,7 +91,7 @@ export function useConversation() {
|
|||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
});
|
});
|
||||||
const filtered = sorted.filter(item => !(item.blocked === 1));
|
const filtered = sorted.filter(item => !(item.blocked));
|
||||||
|
|
||||||
updateState({ hosted, loaded, logo, subject, topics: filtered, delayed: false });
|
updateState({ hosted, loaded, logo, subject, topics: filtered, delayed: false });
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user