Switch to importing more things from the main js-sdk export (#11377)

This commit is contained in:
Michael Telatynski 2023-08-10 09:01:14 +01:00 committed by GitHub
parent a1328d8ef7
commit ef385e6028
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 136 additions and 95 deletions

View file

@ -22,10 +22,11 @@ import {
RoomStateEvent,
MatrixError,
IUsageLimit,
SyncStateData,
SyncState,
} from "matrix-js-sdk/src/matrix";
import { MatrixCall } from "matrix-js-sdk/src/webrtc/call";
import classNames from "classnames";
import { ISyncStateData, SyncState } from "matrix-js-sdk/src/sync";
import { isOnlyCtrlOrCmdKeyEvent, Key } from "../../Keyboard";
import PageTypes from "../../PageTypes";
@ -109,7 +110,7 @@ interface IProps {
}
interface IState {
syncErrorData?: ISyncStateData;
syncErrorData?: SyncStateData;
usageLimitDismissed: boolean;
usageLimitEventContent?: IUsageLimit;
usageLimitEventTs?: number;
@ -294,7 +295,7 @@ class LoggedInView extends React.Component<IProps, IState> {
});
};
private onSync = (syncState: SyncState | null, oldSyncState: SyncState | null, data?: ISyncStateData): void => {
private onSync = (syncState: SyncState | null, oldSyncState: SyncState | null, data?: SyncStateData): void => {
const oldErrCode = (this.state.syncErrorData?.error as MatrixError)?.errcode;
const newErrCode = (data?.error as MatrixError)?.errcode;
if (syncState === oldSyncState && oldErrCode === newErrCode) return;