1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

JS-5703: fix

This commit is contained in:
Andrew Simachev 2024-10-29 09:52:18 +01:00
parent 748610bf40
commit 08319fa02d
No known key found for this signature in database
GPG key ID: 1DFE44B21443F0EF
4 changed files with 27 additions and 11 deletions

View file

@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Anytype Web Clipper",
"description": "Save web content to the Anytype — open, encrypted, and local-first application that connects everything as objects.",
"version": "0.0.6",
"version": "0.0.7",
"icons": {
"16": "img/icon16x16.png",
"128": "img/icon128x128.png"

View file

@ -39,7 +39,7 @@ window.AnytypeGlobalConfig = {
emojiUrl: J.Extension.clipper.emojiUrl,
menuBorderTop: 16,
menuBorderBottom: 16,
flagsMw: { request: false },
flagsMw: { request: true },
};
let rootId = '';

View file

@ -169,7 +169,6 @@ const Create = observer(class Create extends React.Component<I.PageComponent, St
this.initSpace();
this.initName();
this.initType();
this.setState({ withContent: Boolean(Storage.get('withContent')) });
});
};
@ -186,17 +185,9 @@ const Create = observer(class Create extends React.Component<I.PageComponent, St
return;
};
let check = null;
let spaceId = S.Common.space || Storage.get('lastSpaceId');
if (!spaceId) {
spaceId = spaces.find(it => it.isPersonal)?.id;
};
if (spaceId) {
check = spaces.find(it => it.id == spaceId);
};
if (!spaceId || !check) {
spaceId = spaces[0].id;
};
@ -362,6 +353,7 @@ const Create = observer(class Create extends React.Component<I.PageComponent, St
onClose: () => $(element).removeClass('isFocused'),
data: {
canAdd: true,
canEdit: true,
filter: '',
value: this.details.tag,
maxCount: relation.maxCount,

View file

@ -872,11 +872,19 @@ class UtilData {
if (!subId) {
console.error('[U.Data].searchSubscribe: subId is empty');
if (callBack) {
callBack({});
};
return;
};
if (!spaceId) {
console.error('[U.Data].searchSubscribe: spaceId is empty');
if (callBack) {
callBack({});
};
return;
};
@ -910,16 +918,28 @@ class UtilData {
if (!subId) {
console.error('[U.Data].subscribeIds: subId is empty');
if (callBack) {
callBack({});
};
return;
};
if (!spaceId) {
console.error('[U.Data].subscribeIds: spaceId is empty');
if (callBack) {
callBack({});
};
return;
};
if (!ids.length) {
console.error('[U.Data].subscribeIds: ids list is empty');
if (callBack) {
callBack({});
};
return;
};
@ -967,6 +987,10 @@ class UtilData {
if (!spaceId) {
console.error('[U.Data].search: spaceId is empty');
if (callBack) {
callBack({});
};
return;
};