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

small webclipper refactoring

This commit is contained in:
Andrew Simachev 2024-07-02 11:44:54 +02:00
parent 4c99ce8f3e
commit ece53b3511
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8
3 changed files with 10 additions and 4 deletions

View file

@ -90,7 +90,7 @@ const Create = observer(class Create extends React.Component<I.PageComponent, St
};
componentDidMount (): void {
U.Data.createSpaceSubscriptions(() => this.init());
U.Data.createAllSubscriptions(() => this.init());
};
componentDidUpdate (): void {
@ -175,7 +175,7 @@ const Create = observer(class Create extends React.Component<I.PageComponent, St
onSpaceChange (id: string): void {
S.Common.spaceSet(id);
U.Data.createSpaceSubscriptions();
U.Data.createAllSubscriptions();
};
getWrapperWidth () {

View file

@ -165,7 +165,7 @@ const Create = observer(class Create extends React.Component<I.PageComponent, St
};
componentDidMount(): void {
U.Data.createSpaceSubscriptions(() => {
U.Data.createAllSubscriptions(() => {
this.initSpace();
this.initName();
this.initType();
@ -264,7 +264,7 @@ const Create = observer(class Create extends React.Component<I.PageComponent, St
onSpaceChange (id: string): void {
S.Common.spaceSet(id);
U.Data.createSpaceSubscriptions(() => this.forceUpdate());
U.Data.createAllSubscriptions(() => this.forceUpdate());
Storage.set('lastSpaceId', id);
};

View file

@ -246,6 +246,12 @@ class UtilData {
analytics.event('OpenAccount');
};
createAllSubscriptions (callBack?: () => void) {
this.createGlobalSubscriptions(() => {
this.createSpaceSubscriptions(callBack);
});
};
createGlobalSubscriptions (callBack?: () => void) {
const { account } = S.Auth;
const list: any[] = [