@@ -124,10 +124,10 @@ export const ClientProvider: FC<Props> = ({ children }) => {
|
|||||||
|
|
||||||
const onSync = (state: SyncState, _old: SyncState, data: ISyncStateData) => {
|
const onSync = (state: SyncState, _old: SyncState, data: ISyncStateData) => {
|
||||||
setState((currentState) => {
|
setState((currentState) => {
|
||||||
return {
|
const disconnected = isDisconnected(state, data);
|
||||||
...currentState,
|
return disconnected === currentState.disconnected
|
||||||
disconnected: isDisconnected(state, data),
|
? currentState
|
||||||
};
|
: { ...currentState, disconnected };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ export const ClientProvider: FC<Props> = ({ children }) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let clientWithListener;
|
let clientWithListener: MatrixClient;
|
||||||
init()
|
init()
|
||||||
.then(({ client, isPasswordlessUser }) => {
|
.then(({ client, isPasswordlessUser }) => {
|
||||||
clientWithListener = client;
|
clientWithListener = client;
|
||||||
|
|||||||
@@ -23,5 +23,5 @@ limitations under the License.
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
top: 76px;
|
top: 76px;
|
||||||
width: 100%;
|
width: calc(100% - 58px);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export class Initializer {
|
|||||||
private isInitialized = false;
|
private isInitialized = false;
|
||||||
|
|
||||||
public static isInitialized(): boolean {
|
public static isInitialized(): boolean {
|
||||||
return Boolean(Initializer.internalInstance?.isInitialized);
|
return Initializer.internalInstance?.isInitialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static initBeforeReact() {
|
public static initBeforeReact() {
|
||||||
|
|||||||
Reference in New Issue
Block a user