mirror of
https://github.com/balzack/databag.git
synced 2025-02-14 12:39:17 +00:00
fix issue where contacts channel not showing of first load
This commit is contained in:
parent
7559c39bca
commit
356ec4dc45
@ -669,7 +669,7 @@ SPEC CHECKSUMS:
|
||||
FirebaseInstallations: 99d24bac0243cf8b0e96cf5426340d211f0bcc80
|
||||
FirebaseMessaging: 4487bbff9b9b927ba1dd3ea40d1ceb58e4ee3cb5
|
||||
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
|
||||
glog: 3d02b25ca00c2d456734d0bcff864cbc62f6ae1a
|
||||
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
|
||||
GoogleDataTransport: 1c8145da7117bd68bbbed00cf304edb6a24de00f
|
||||
GoogleUtilities: 1d20a6ad97ef46f67bbdec158ce00563a671ebb7
|
||||
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
|
||||
|
@ -312,10 +312,10 @@ export function useCardContext() {
|
||||
const { notifiedView, notifiedProfile, notifiedArticle, notifiedChannel } = card.data;
|
||||
if (status.notifiedView !== notifiedView) {
|
||||
await store.actions.clearCardChannelItems(guid, card.id);
|
||||
clearCardChannels(card.id);
|
||||
await updateCardChannelItems(card.id, cardServer, cardToken, notifiedView, null);
|
||||
await store.actions.setCardItemNotifiedChannel(guid, card.id, notifiedChannel);
|
||||
await store.actions.setCardItemNotifiedView(guid, card.id, notifiedView);
|
||||
clearCardChannels(card.id);
|
||||
}
|
||||
else {
|
||||
if (status.notifiedChannel != notifiedChannel) {
|
||||
@ -348,6 +348,7 @@ export function useCardContext() {
|
||||
const updateCardChannelItems = async (cardId, cardServer, cardToken, notifiedView, notifiedChannel) => {
|
||||
const { guid } = session.current;
|
||||
const delta = await getContactChannels(cardServer, cardToken, notifiedView, notifiedChannel);
|
||||
|
||||
for (let channel of delta) {
|
||||
if (channel.data) {
|
||||
if (channel.data.channelDetail && channel.data.channelSummary) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { useEffect, useState, useRef, useContext } from 'react';
|
||||
import SQLite from "react-native-sqlite-storage";
|
||||
|
||||
const DATABAG_DB = 'databag_v050.db';
|
||||
const DATABAG_DB = 'databag_v064.db';
|
||||
|
||||
export function useStoreContext() {
|
||||
const [state, setState] = useState({});
|
||||
|
Loading…
Reference in New Issue
Block a user