kind of works, no crashes, but inefficient and not everything is refreshed

This commit is contained in:
or-else
2021-08-09 14:03:33 -07:00
parent 17a658e373
commit 58e319b58e
26 changed files with 81 additions and 32 deletions
+3 -2
View File
@@ -1214,10 +1214,11 @@ class TinodeWeb extends React.Component {
const topic = this.tinode.getTopic(topicName);
if (topic) {
const params = {};
let attachments;
if (pub) {
params.public = pub;
if (pub.photo && pub.photo.ref) {
params.attachments = [pub.photo.ref];
attachments = [pub.photo.ref];
}
}
if (priv) {
@@ -1227,7 +1228,7 @@ class TinodeWeb extends React.Component {
if (defacs) {
params.defacs = defacs;
}
topic.setMeta({desc: params}).catch((err) => {
topic.setMeta({desc: params, attachments: attachments}).catch((err) => {
this.handleError(err.message, 'err');
});
}