mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +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) {
|
||||
console.log(err);
|
||||
entry.offsync = true;
|
||||
entry.card.offsync = true;
|
||||
await store.actions.setCardItemOffsync(guid, card.id);
|
||||
}
|
||||
}
|
||||
|
@ -354,7 +354,7 @@ export function useConversationContext() {
|
||||
else if (channelId) {
|
||||
channel.actions.setTopicFlag(channelId, topicId);
|
||||
}
|
||||
setTopicField(topicId, 'blocked', 1);
|
||||
setTopicField(topicId, 'blocked', true);
|
||||
updateState({ topics: topics.current });
|
||||
},
|
||||
clearTopicFlag: async (topicId) => {
|
||||
@ -365,7 +365,7 @@ export function useConversationContext() {
|
||||
else if (channelId) {
|
||||
channel.actions.clearTopicFlag(channelId, topicId);
|
||||
}
|
||||
setTopicField(topicId, 'blocked', 0);
|
||||
setTopicField(topicId, 'blocked', false);
|
||||
updateState({ topics: topics.current });
|
||||
},
|
||||
getTopicAssetUrl: (topicId, assetId) => {
|
||||
|
@ -180,8 +180,8 @@ export function useStoreContext() {
|
||||
notifiedProfile: card.notified_profile,
|
||||
notifiedArticle: card.notified_article,
|
||||
notifiedChannel: card.notified_channel,
|
||||
offsync: card.offsync,
|
||||
blocked: card.blocked,
|
||||
offsync: card.offsync === 1,
|
||||
blocked: card.blocked === 1,
|
||||
}));
|
||||
},
|
||||
|
||||
|
@ -35,10 +35,10 @@ export function CardItem({ item, openContact, enableIce, call, message }) {
|
||||
)}
|
||||
</View>
|
||||
)}
|
||||
{ item.status === 'connected' && item.offsync === 1 && (
|
||||
{ item.status === 'connected' && item.offsync && (
|
||||
<View style={styles.offsync} />
|
||||
)}
|
||||
{ item.status === 'connected' && item.offsync !== 1 && (
|
||||
{ item.status === 'connected' && !item.offsync && (
|
||||
<View style={styles.connected} />
|
||||
)}
|
||||
{ item.status === 'requested' && (
|
||||
|
@ -91,7 +91,7 @@ export function useConversation() {
|
||||
}
|
||||
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 });
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user