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:
parent
4c99ce8f3e
commit
ece53b3511
3 changed files with 10 additions and 4 deletions
|
@ -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 () {
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
|
@ -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[] = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue