mirror of
https://github.com/balzack/databag.git
synced 2025-02-12 03:29:16 +00:00
fixing topic update issues
This commit is contained in:
parent
cef54de9fe
commit
f51ed1563f
@ -282,12 +282,26 @@ export function useCardContext() {
|
||||
let token = cardProfile.guid + '.' + cardDetail.token;
|
||||
let node = cardProfile.node;
|
||||
await removeContactChannelTopic(node, token, channelId, topicId);
|
||||
try {
|
||||
resync.current.push(cardId);
|
||||
await setCards(null);
|
||||
}
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
setChannelTopicSubject: async (cardId, channelId, topicId, data) => {
|
||||
let { cardProfile, cardDetail } = cards.current.get(cardId).data;
|
||||
let token = cardProfile.guid + '.' + cardDetail.token;
|
||||
let node = cardProfile.node;
|
||||
await setContactChannelTopicSubject(node, token, channelId, topicId, data);
|
||||
try {
|
||||
resync.current.push(cardId);
|
||||
await setCards(null);
|
||||
}
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
addChannelTopic: async (cardId, channelId, message, files) => {
|
||||
let { cardProfile, cardDetail } = cards.current.get(cardId).data;
|
||||
|
@ -120,10 +120,22 @@ export function useChannelContext() {
|
||||
return await removeChannel(access.current, channelId);
|
||||
},
|
||||
removeChannelTopic: async (channelId, topicId) => {
|
||||
return await removeChannelTopic(access.current, channelId, topicId);
|
||||
await removeChannelTopic(access.current, channelId, topicId);
|
||||
try {
|
||||
await setChannels(null);
|
||||
}
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
setChannelTopicSubject: async (channelId, topicId, data) => {
|
||||
return await setChannelTopicSubject(access.current, channelId, topicId, data);
|
||||
await setChannelTopicSubject(access.current, channelId, topicId, data);
|
||||
try {
|
||||
await setChannels(null);
|
||||
}
|
||||
catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
addChannelTopic: async (channelId, message, files) => {
|
||||
if (files?.length) {
|
||||
|
@ -201,7 +201,9 @@ export function useConversationContext() {
|
||||
let subject = getSubject(chan);
|
||||
let contacts = getContacts(chan);
|
||||
let members = getMembers(chan);
|
||||
const { enableImage, enableAudio, enableVideo } = chan.data.channelDetail;
|
||||
const enableImage = chan?.data?.channelDetail?.enableImage;
|
||||
const enableAudio = chan?.data?.channelDetail?.enableAudio;
|
||||
const enableVideo = chan?.data?.channelDetail?.enableVideo;
|
||||
updateState({
|
||||
init: true,
|
||||
error: false,
|
||||
|
@ -192,7 +192,7 @@ export function VirtualList({ id, items, itemRenderer, loadMore }) {
|
||||
for (let i = 1; i < containers.current.length; i++) {
|
||||
let container = containers.current[i];
|
||||
if (container.index != index + i) {
|
||||
const item = itemView.current[index + 1];
|
||||
const item = itemView.current[index + i];
|
||||
let slot = {
|
||||
top: container.top - defaultHeight,
|
||||
height: defaultHeight,
|
||||
|
Loading…
Reference in New Issue
Block a user