Run a minor code quality checker over the repo (#8524)
* Run a minor code quality checker over the repo Largely targeted at spelling of common words and misc code issues. * Update snapshots
This commit is contained in:
parent
89d7760f36
commit
548290b006
56 changed files with 72 additions and 72 deletions
|
@ -237,7 +237,7 @@ export default abstract class BasePlatform {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Restarts the application, without neccessarily reloading
|
* Restarts the application, without necessarily reloading
|
||||||
* any application code
|
* any application code
|
||||||
*/
|
*/
|
||||||
abstract reload();
|
abstract reload();
|
||||||
|
|
|
@ -948,7 +948,7 @@ export default class CallHandler extends EventEmitter {
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
if (consultFirst) {
|
if (consultFirst) {
|
||||||
// if we're consulting, we just start by placing a call to the transfer
|
// if we're consulting, we just start by placing a call to the transfer
|
||||||
// target (passing the transferee so the actual tranfer can happen later)
|
// target (passing the transferee so the actual transfer can happen later)
|
||||||
this.dialNumber(destination, call);
|
this.dialNumber(destination, call);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,7 @@ const transformTags: IExtendedSanitizeOptions["transformTags"] = { // custom to
|
||||||
delete attribs.target;
|
delete attribs.target;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Delete the href attrib if it is falsey
|
// Delete the href attrib if it is falsy
|
||||||
delete attribs.href;
|
delete attribs.href;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ limitations under the License.
|
||||||
* reflect the actual height the scaled thumbnail occupies.
|
* reflect the actual height the scaled thumbnail occupies.
|
||||||
*
|
*
|
||||||
* This is very useful for calculating how much height a thumbnail will actually
|
* This is very useful for calculating how much height a thumbnail will actually
|
||||||
* consume in the timeline, when performing scroll offset calcuations
|
* consume in the timeline, when performing scroll offset calculations
|
||||||
* (e.g. scroll locking)
|
* (e.g. scroll locking)
|
||||||
*/
|
*/
|
||||||
export function thumbHeight(fullWidth: number, fullHeight: number, thumbWidth: number, thumbHeight: number) {
|
export function thumbHeight(fullWidth: number, fullHeight: number, thumbWidth: number, thumbHeight: number) {
|
||||||
|
|
|
@ -52,7 +52,7 @@ export function looksLikeDirectMessageRoom(room: Room, myUserId: string): boolea
|
||||||
// Used to split rooms via tags
|
// Used to split rooms via tags
|
||||||
const tagNames = Object.keys(room.tags);
|
const tagNames = Object.keys(room.tags);
|
||||||
// Used for 1:1 direct chats
|
// Used for 1:1 direct chats
|
||||||
// Show 1:1 chats in seperate "Direct Messages" section as long as they haven't
|
// Show 1:1 chats in separate "Direct Messages" section as long as they haven't
|
||||||
// been moved to a different tag section
|
// been moved to a different tag section
|
||||||
const totalMemberCount = room.currentState.getJoinedMemberCount() +
|
const totalMemberCount = room.currentState.getJoinedMemberCount() +
|
||||||
room.currentState.getInvitedMemberCount();
|
room.currentState.getInvitedMemberCount();
|
||||||
|
|
|
@ -291,7 +291,7 @@ export default class CreateKeyBackupDialog extends React.PureComponent<IProps, I
|
||||||
changeText = _t("Use a different passphrase?");
|
changeText = _t("Use a different passphrase?");
|
||||||
} else if (!this.state.passPhrase.startsWith(this.state.passPhraseConfirm)) {
|
} else if (!this.state.passPhrase.startsWith(this.state.passPhraseConfirm)) {
|
||||||
// only tell them they're wrong if they've actually gone wrong.
|
// only tell them they're wrong if they've actually gone wrong.
|
||||||
// Security concious readers will note that if you left element-web unattended
|
// Security conscious readers will note that if you left element-web unattended
|
||||||
// on this screen, this would make it easy for a malicious person to guess
|
// on this screen, this would make it easy for a malicious person to guess
|
||||||
// your passphrase one letter at a time, but they could get this faster by
|
// your passphrase one letter at a time, but they could get this faster by
|
||||||
// just opening the browser's developer tools and reading it.
|
// just opening the browser's developer tools and reading it.
|
||||||
|
|
|
@ -649,7 +649,7 @@ export default class CreateSecretStorageDialog extends React.PureComponent<IProp
|
||||||
changeText = _t("Use a different passphrase?");
|
changeText = _t("Use a different passphrase?");
|
||||||
} else if (!this.state.passPhrase.startsWith(this.state.passPhraseConfirm)) {
|
} else if (!this.state.passPhrase.startsWith(this.state.passPhraseConfirm)) {
|
||||||
// only tell them they're wrong if they've actually gone wrong.
|
// only tell them they're wrong if they've actually gone wrong.
|
||||||
// Security concious readers will note that if you left element-web unattended
|
// Security conscious readers will note that if you left element-web unattended
|
||||||
// on this screen, this would make it easy for a malicious person to guess
|
// on this screen, this would make it easy for a malicious person to guess
|
||||||
// your passphrase one letter at a time, but they could get this faster by
|
// your passphrase one letter at a time, but they could get this faster by
|
||||||
// just opening the browser's developer tools and reading it.
|
// just opening the browser's developer tools and reading it.
|
||||||
|
|
|
@ -135,7 +135,7 @@ export default class CountryDropdown extends React.Component<IProps, IState> {
|
||||||
});
|
});
|
||||||
|
|
||||||
// default value here too, otherwise we need to handle null / undefined
|
// default value here too, otherwise we need to handle null / undefined
|
||||||
// values between mounting and the initial value propgating
|
// values between mounting and the initial value propagating
|
||||||
const value = this.props.value || this.state.defaultCountry.iso2;
|
const value = this.props.value || this.state.defaultCountry.iso2;
|
||||||
|
|
||||||
return <Dropdown
|
return <Dropdown
|
||||||
|
|
|
@ -56,7 +56,7 @@ const getLabel = (hasStoppingErrors: boolean, hasLocationErrors: boolean): strin
|
||||||
return _t('An error occurred while stopping your live location');
|
return _t('An error occurred while stopping your live location');
|
||||||
}
|
}
|
||||||
if (hasLocationErrors) {
|
if (hasLocationErrors) {
|
||||||
return _t('An error occured whilst sharing your live location');
|
return _t('An error occurred whilst sharing your live location');
|
||||||
}
|
}
|
||||||
return _t('You are sharing your live location');
|
return _t('You are sharing your live location');
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,7 +29,7 @@ import LiveTimeRemaining from './LiveTimeRemaining';
|
||||||
|
|
||||||
const getLabel = (hasLocationPublishError: boolean, hasStopSharingError: boolean): string => {
|
const getLabel = (hasLocationPublishError: boolean, hasStopSharingError: boolean): string => {
|
||||||
if (hasLocationPublishError) {
|
if (hasLocationPublishError) {
|
||||||
return _t('An error occured whilst sharing your live location, please try again');
|
return _t('An error occurred whilst sharing your live location, please try again');
|
||||||
}
|
}
|
||||||
if (hasStopSharingError) {
|
if (hasStopSharingError) {
|
||||||
return _t('An error occurred while stopping your live location, please try again');
|
return _t('An error occurred while stopping your live location, please try again');
|
||||||
|
|
|
@ -25,7 +25,7 @@ import { EventType } from "matrix-js-sdk/src/@types/event";
|
||||||
import { _t } from '../../../languageHandler';
|
import { _t } from '../../../languageHandler';
|
||||||
import dis from "../../../dispatcher/dispatcher";
|
import dis from "../../../dispatcher/dispatcher";
|
||||||
import { Action } from "../../../dispatcher/actions";
|
import { Action } from "../../../dispatcher/actions";
|
||||||
import { IDialogProps } from "../dialogs/IDialogProps";
|
import { IDialogProps } from "./IDialogProps";
|
||||||
import BaseDialog from "../dialogs/BaseDialog";
|
import BaseDialog from "../dialogs/BaseDialog";
|
||||||
import InfoDialog from "../dialogs/InfoDialog";
|
import InfoDialog from "../dialogs/InfoDialog";
|
||||||
import DialogButtons from "../elements/DialogButtons";
|
import DialogButtons from "../elements/DialogButtons";
|
||||||
|
|
|
@ -263,7 +263,7 @@ const ExportDialog: React.FC<IProps> = ({ room, onFinished }) => {
|
||||||
else onFinished(false);
|
else onFinished(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const confirmCanel = async () => {
|
const confirmCancel = async () => {
|
||||||
await exporter?.cancelExport();
|
await exporter?.cancelExport();
|
||||||
setExportCancelled(true);
|
setExportCancelled(true);
|
||||||
setExporting(false);
|
setExporting(false);
|
||||||
|
@ -346,7 +346,7 @@ const ExportDialog: React.FC<IProps> = ({ room, onFinished }) => {
|
||||||
hasCancel={true}
|
hasCancel={true}
|
||||||
cancelButton={_t("Continue")}
|
cancelButton={_t("Continue")}
|
||||||
onCancel={() => setCancelWarning(false)}
|
onCancel={() => setCancelWarning(false)}
|
||||||
onPrimaryButtonClick={confirmCanel}
|
onPrimaryButtonClick={confirmCancel}
|
||||||
/>
|
/>
|
||||||
</BaseDialog>
|
</BaseDialog>
|
||||||
);
|
);
|
||||||
|
|
|
@ -29,7 +29,7 @@ interface IProps extends IDialogProps {
|
||||||
error: string;
|
error: string;
|
||||||
}>>;
|
}>>;
|
||||||
source: string;
|
source: string;
|
||||||
continuation: () => void;
|
continuation: () => Promise<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
const KeySignatureUploadFailedDialog: React.FC<IProps> = ({
|
const KeySignatureUploadFailedDialog: React.FC<IProps> = ({
|
||||||
|
|
|
@ -52,7 +52,7 @@ const socials = [
|
||||||
}, {
|
}, {
|
||||||
name: 'Reddit',
|
name: 'Reddit',
|
||||||
img: require("../../../../res/img/social/reddit.png"),
|
img: require("../../../../res/img/social/reddit.png"),
|
||||||
url: (url) => `http://www.reddit.com/submit?url=${url}`,
|
url: (url) => `https://www.reddit.com/submit?url=${url}`,
|
||||||
}, {
|
}, {
|
||||||
name: 'email',
|
name: 'email',
|
||||||
img: require("../../../../res/img/social/email-1.png"),
|
img: require("../../../../res/img/social/email-1.png"),
|
||||||
|
|
|
@ -44,7 +44,7 @@ enum ProgressState {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IProps extends IDialogProps {
|
interface IProps extends IDialogProps {
|
||||||
// if false, will close the dialog as soon as the restore completes succesfully
|
// if false, will close the dialog as soon as the restore completes successfully
|
||||||
// default: true
|
// default: true
|
||||||
showSummary?: boolean;
|
showSummary?: boolean;
|
||||||
// If specified, gather the key from the user but then call the function with the backup
|
// If specified, gather the key from the user but then call the function with the backup
|
||||||
|
|
|
@ -96,7 +96,7 @@ export default function AccessibleButton({
|
||||||
// that might receive focus as a result of the AccessibleButtonClick action
|
// that might receive focus as a result of the AccessibleButtonClick action
|
||||||
// It's because we are using html buttons at a few places e.g. inside dialogs
|
// It's because we are using html buttons at a few places e.g. inside dialogs
|
||||||
// And divs which we report as role button to assistive technologies.
|
// And divs which we report as role button to assistive technologies.
|
||||||
// Browsers handle space and enter keypresses differently and we are only adjusting to the
|
// Browsers handle space and enter key presses differently and we are only adjusting to the
|
||||||
// inconsistencies here
|
// inconsistencies here
|
||||||
newProps.onKeyDown = (e) => {
|
newProps.onKeyDown = (e) => {
|
||||||
const action = getKeyBindingsManager().getAccessibilityAction(e);
|
const action = getKeyBindingsManager().getAccessibilityAction(e);
|
||||||
|
|
|
@ -57,7 +57,7 @@ interface IProps {
|
||||||
// which bypasses permission prompts as it was added explicitly by that user
|
// which bypasses permission prompts as it was added explicitly by that user
|
||||||
room?: Room;
|
room?: Room;
|
||||||
threadId?: string | null;
|
threadId?: string | null;
|
||||||
// Specifying 'fullWidth' as true will render the app tile to fill the width of the app drawer continer.
|
// Specifying 'fullWidth' as true will render the app tile to fill the width of the app drawer container.
|
||||||
// This should be set to true when there is only one widget in the app drawer, otherwise it should be false.
|
// This should be set to true when there is only one widget in the app drawer, otherwise it should be false.
|
||||||
fullWidth?: boolean;
|
fullWidth?: boolean;
|
||||||
// Optional. If set, renders a smaller view of the widget
|
// Optional. If set, renders a smaller view of the widget
|
||||||
|
@ -288,7 +288,7 @@ export default class AppTile extends React.Component<IProps, IState> {
|
||||||
private setupSgListeners() {
|
private setupSgListeners() {
|
||||||
this.sgWidget.on("preparing", this.onWidgetPreparing);
|
this.sgWidget.on("preparing", this.onWidgetPreparing);
|
||||||
this.sgWidget.on("ready", this.onWidgetReady);
|
this.sgWidget.on("ready", this.onWidgetReady);
|
||||||
// emits when the capabilites have been setup or changed
|
// emits when the capabilities have been set up or changed
|
||||||
this.sgWidget.on("capabilitiesNotified", this.onWidgetCapabilitiesNotified);
|
this.sgWidget.on("capabilitiesNotified", this.onWidgetCapabilitiesNotified);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -543,7 +543,7 @@ export default class AppTile extends React.Component<IProps, IState> {
|
||||||
const sandboxFlags = "allow-forms allow-popups allow-popups-to-escape-sandbox " +
|
const sandboxFlags = "allow-forms allow-popups allow-popups-to-escape-sandbox " +
|
||||||
"allow-same-origin allow-scripts allow-presentation allow-downloads";
|
"allow-same-origin allow-scripts allow-presentation allow-downloads";
|
||||||
|
|
||||||
// Additional iframe feature pemissions
|
// Additional iframe feature permissions
|
||||||
// (see - https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-permissions-in-cross-origin-iframes and https://wicg.github.io/feature-policy/)
|
// (see - https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-permissions-in-cross-origin-iframes and https://wicg.github.io/feature-policy/)
|
||||||
const iframeFeatures = "microphone; camera; encrypted-media; autoplay; display-capture; clipboard-write;";
|
const iframeFeatures = "microphone; camera; encrypted-media; autoplay; display-capture; clipboard-write;";
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ export default class ErrorBoundary extends React.PureComponent<{}, IState> {
|
||||||
// in their own `console.error` invocation.
|
// in their own `console.error` invocation.
|
||||||
logger.error(error);
|
logger.error(error);
|
||||||
logger.error(
|
logger.error(
|
||||||
"The above error occured while React was rendering the following components:",
|
"The above error occurred while React was rendering the following components:",
|
||||||
componentStack,
|
componentStack,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ export default class LanguageDropdown extends React.Component<IProps, IState> {
|
||||||
});
|
});
|
||||||
|
|
||||||
// default value here too, otherwise we need to handle null / undefined
|
// default value here too, otherwise we need to handle null / undefined
|
||||||
// values between mounting and the initial value propgating
|
// values between mounting and the initial value propagating
|
||||||
let language = SettingsStore.getValue("language", null, /*excludeDefault:*/true);
|
let language = SettingsStore.getValue("language", null, /*excludeDefault:*/true);
|
||||||
let value = null;
|
let value = null;
|
||||||
if (language) {
|
if (language) {
|
||||||
|
|
|
@ -167,7 +167,7 @@ export default class ReplyChain extends React.Component<IProps, IState> {
|
||||||
await this.matrixClient.getEventTimeline(this.room.getUnfilteredTimelineSet(), eventId);
|
await this.matrixClient.getEventTimeline(this.room.getUnfilteredTimelineSet(), eventId);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// if it fails catch the error and return early, there's no point trying to find the event in this case.
|
// if it fails catch the error and return early, there's no point trying to find the event in this case.
|
||||||
// Return null as it is falsey and thus should be treated as an error (as the event cannot be resolved).
|
// Return null as it is falsy and thus should be treated as an error (as the event cannot be resolved).
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return this.room.findEventById(eventId);
|
return this.room.findEventById(eventId);
|
||||||
|
|
|
@ -99,7 +99,7 @@ export default class SpellCheckLanguagesDropdown extends React.Component<SpellCh
|
||||||
});
|
});
|
||||||
|
|
||||||
// default value here too, otherwise we need to handle null / undefined;
|
// default value here too, otherwise we need to handle null / undefined;
|
||||||
// values between mounting and the initial value propgating
|
// values between mounting and the initial value propagating
|
||||||
let language = SettingsStore.getValue("language", null, /*excludeDefault:*/true);
|
let language = SettingsStore.getValue("language", null, /*excludeDefault:*/true);
|
||||||
let value = null;
|
let value = null;
|
||||||
if (language) {
|
if (language) {
|
||||||
|
|
|
@ -52,7 +52,7 @@ export default class TruncatedList extends React.Component<IProps> {
|
||||||
return this.props.getChildren(start, end);
|
return this.props.getChildren(start, end);
|
||||||
} else {
|
} else {
|
||||||
// XXX: I'm not sure why anything would pass null into this, it seems
|
// XXX: I'm not sure why anything would pass null into this, it seems
|
||||||
// like a bizzare case to handle, but I'm preserving the behaviour.
|
// like a bizarre case to handle, but I'm preserving the behaviour.
|
||||||
// (see commit 38d5c7d5c5d5a34dc16ef5d46278315f5c57f542)
|
// (see commit 38d5c7d5c5d5a34dc16ef5d46278315f5c57f542)
|
||||||
return React.Children.toArray(this.props.children).filter((c) => {
|
return React.Children.toArray(this.props.children).filter((c) => {
|
||||||
return c != null;
|
return c != null;
|
||||||
|
|
|
@ -485,14 +485,14 @@ export default class MImageBody extends React.Component<IBodyProps, IState> {
|
||||||
return this.wrapImage(contentUrl, thumbnail);
|
return this.wrapImage(contentUrl, thumbnail);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overidden by MStickerBody
|
// Overridden by MStickerBody
|
||||||
protected wrapImage(contentUrl: string, children: JSX.Element): JSX.Element {
|
protected wrapImage(contentUrl: string, children: JSX.Element): JSX.Element {
|
||||||
return <a href={contentUrl} target={this.props.forExport ? "_blank" : undefined} onClick={this.onClick}>
|
return <a href={contentUrl} target={this.props.forExport ? "_blank" : undefined} onClick={this.onClick}>
|
||||||
{ children }
|
{ children }
|
||||||
</a>;
|
</a>;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overidden by MStickerBody
|
// Overridden by MStickerBody
|
||||||
protected getPlaceholder(width: number, height: number): JSX.Element {
|
protected getPlaceholder(width: number, height: number): JSX.Element {
|
||||||
const blurhash = this.props.mxEvent.getContent().info?.[BLURHASH_FIELD];
|
const blurhash = this.props.mxEvent.getContent().info?.[BLURHASH_FIELD];
|
||||||
|
|
||||||
|
@ -506,12 +506,12 @@ export default class MImageBody extends React.Component<IBodyProps, IState> {
|
||||||
return <Spinner w={32} h={32} />;
|
return <Spinner w={32} h={32} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overidden by MStickerBody
|
// Overridden by MStickerBody
|
||||||
protected getTooltip(): JSX.Element {
|
protected getTooltip(): JSX.Element {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Overidden by MStickerBody
|
// Overridden by MStickerBody
|
||||||
protected getFileBody(): string | JSX.Element {
|
protected getFileBody(): string | JSX.Element {
|
||||||
if (this.props.forExport) return null;
|
if (this.props.forExport) return null;
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -49,7 +49,7 @@ interface IState {
|
||||||
// @ts-ignore - TS wants a string key, but we know better
|
// @ts-ignore - TS wants a string key, but we know better
|
||||||
apps: {[id: Container]: IApp[]};
|
apps: {[id: Container]: IApp[]};
|
||||||
resizingVertical: boolean; // true when changing the height of the apps drawer
|
resizingVertical: boolean; // true when changing the height of the apps drawer
|
||||||
resizingHorizontal: boolean; // true when chagning the distribution of the width between widgets
|
resizingHorizontal: boolean; // true when changing the distribution of the width between widgets
|
||||||
resizing: boolean;
|
resizing: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,7 +259,7 @@ export default class AppsDrawer extends React.Component<IProps, IState> {
|
||||||
mx_AppsDrawer_2apps: apps.length === 2,
|
mx_AppsDrawer_2apps: apps.length === 2,
|
||||||
mx_AppsDrawer_3apps: apps.length === 3,
|
mx_AppsDrawer_3apps: apps.length === 3,
|
||||||
});
|
});
|
||||||
const appConatiners =
|
const appContainers =
|
||||||
<div className="mx_AppsContainer" ref={this.collectResizer}>
|
<div className="mx_AppsContainer" ref={this.collectResizer}>
|
||||||
{ apps.map((app, i) => {
|
{ apps.map((app, i) => {
|
||||||
if (i < 1) return app;
|
if (i < 1) return app;
|
||||||
|
@ -272,7 +272,7 @@ export default class AppsDrawer extends React.Component<IProps, IState> {
|
||||||
|
|
||||||
let drawer;
|
let drawer;
|
||||||
if (widgetIsMaxmised) {
|
if (widgetIsMaxmised) {
|
||||||
drawer = appConatiners;
|
drawer = appContainers;
|
||||||
} else {
|
} else {
|
||||||
drawer = <PersistentVResizer
|
drawer = <PersistentVResizer
|
||||||
room={this.props.room}
|
room={this.props.room}
|
||||||
|
@ -282,7 +282,7 @@ export default class AppsDrawer extends React.Component<IProps, IState> {
|
||||||
handleWrapperClass="mx_AppsContainer_resizerHandleContainer"
|
handleWrapperClass="mx_AppsContainer_resizerHandleContainer"
|
||||||
className="mx_AppsContainer_resizer"
|
className="mx_AppsContainer_resizer"
|
||||||
resizeNotifier={this.props.resizeNotifier}>
|
resizeNotifier={this.props.resizeNotifier}>
|
||||||
{ appConatiners }
|
{ appContainers }
|
||||||
</PersistentVResizer>;
|
</PersistentVResizer>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ export default class AuxPanel extends React.Component<IProps, IState> {
|
||||||
const severity = ev.getContent().severity || "normal";
|
const severity = ev.getContent().severity || "normal";
|
||||||
const stateKey = ev.getStateKey();
|
const stateKey = ev.getStateKey();
|
||||||
|
|
||||||
// We want a non-empty title but can accept falsey values (e.g.
|
// We want a non-empty title but can accept falsy values (e.g.
|
||||||
// zero)
|
// zero)
|
||||||
if (title && value !== undefined) {
|
if (title && value !== undefined) {
|
||||||
counters.push({
|
counters.push({
|
||||||
|
|
|
@ -212,7 +212,7 @@ interface IProps {
|
||||||
// whether or not to display thread info
|
// whether or not to display thread info
|
||||||
showThreadInfo?: boolean;
|
showThreadInfo?: boolean;
|
||||||
|
|
||||||
// if specified and `true`, the message his behing
|
// if specified and `true`, the message is being
|
||||||
// hidden for moderation from other users but is
|
// hidden for moderation from other users but is
|
||||||
// displayed to the current user either because they're
|
// displayed to the current user either because they're
|
||||||
// the author or they are a moderator
|
// the author or they are a moderator
|
||||||
|
|
|
@ -66,7 +66,7 @@ export default class VerificationRequestToast extends React.PureComponent<IProps
|
||||||
request.on(VerificationRequestEvent.Change, this.checkRequestIsPending);
|
request.on(VerificationRequestEvent.Change, this.checkRequestIsPending);
|
||||||
// We should probably have a separate class managing the active verification toasts,
|
// We should probably have a separate class managing the active verification toasts,
|
||||||
// rather than monitoring this in the toast component itself, since we'll get problems
|
// rather than monitoring this in the toast component itself, since we'll get problems
|
||||||
// like the toasdt not going away when the verification is cancelled unless it's the
|
// like the toast not going away when the verification is cancelled unless it's the
|
||||||
// one on the top (ie. the one that's mounted).
|
// one on the top (ie. the one that's mounted).
|
||||||
// As a quick & dirty fix, check the toast is still relevant when it mounts (this prevents
|
// As a quick & dirty fix, check the toast is still relevant when it mounts (this prevents
|
||||||
// a toast hanging around after logging in if you did a verification as part of login).
|
// a toast hanging around after logging in if you did a verification as part of login).
|
||||||
|
|
|
@ -28,7 +28,7 @@ export enum ComposerType {
|
||||||
interface IBaseComposerInsertPayload extends ActionPayload {
|
interface IBaseComposerInsertPayload extends ActionPayload {
|
||||||
action: Action.ComposerInsert;
|
action: Action.ComposerInsert;
|
||||||
timelineRenderingType: TimelineRenderingType;
|
timelineRenderingType: TimelineRenderingType;
|
||||||
composerType?: ComposerType; // falsey if should be re-dispatched to the correct composer
|
composerType?: ComposerType; // falsy if should be re-dispatched to the correct composer
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IComposerInsertMentionPayload extends IBaseComposerInsertPayload {
|
interface IComposerInsertMentionPayload extends IBaseComposerInsertPayload {
|
||||||
|
|
|
@ -178,7 +178,7 @@ function getTextNodeValue(node: Node): string {
|
||||||
if (nodeText.length !== 1) {
|
if (nodeText.length !== 1) {
|
||||||
return nodeText.replace(CARET_NODE_CHAR, "");
|
return nodeText.replace(CARET_NODE_CHAR, "");
|
||||||
} else {
|
} else {
|
||||||
// only contains ZWS, which is ignored, so return emtpy string
|
// only contains ZWS, which is ignored, so return empty string
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -37,7 +37,7 @@ export function formatRange(range: Range, action: Formatting): void {
|
||||||
range.trim();
|
range.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Edgecase when just selecting whitespace or new line.
|
// Edge case when just selecting whitespace or new line.
|
||||||
// There should be no reason to format whitespace, so we can just return.
|
// There should be no reason to format whitespace, so we can just return.
|
||||||
if (range.length === 0) {
|
if (range.length === 0) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -2957,11 +2957,11 @@
|
||||||
"View List": "View List",
|
"View List": "View List",
|
||||||
"Close sidebar": "Close sidebar",
|
"Close sidebar": "Close sidebar",
|
||||||
"An error occurred while stopping your live location": "An error occurred while stopping your live location",
|
"An error occurred while stopping your live location": "An error occurred while stopping your live location",
|
||||||
"An error occured whilst sharing your live location": "An error occured whilst sharing your live location",
|
"An error occurred whilst sharing your live location": "An error occurred whilst sharing your live location",
|
||||||
"You are sharing your live location": "You are sharing your live location",
|
"You are sharing your live location": "You are sharing your live location",
|
||||||
"%(timeRemaining)s left": "%(timeRemaining)s left",
|
"%(timeRemaining)s left": "%(timeRemaining)s left",
|
||||||
"Live location enabled": "Live location enabled",
|
"Live location enabled": "Live location enabled",
|
||||||
"An error occured whilst sharing your live location, please try again": "An error occured whilst sharing your live location, please try again",
|
"An error occurred whilst sharing your live location, please try again": "An error occurred whilst sharing your live location, please try again",
|
||||||
"An error occurred while stopping your live location, please try again": "An error occurred while stopping your live location, please try again",
|
"An error occurred while stopping your live location, please try again": "An error occurred while stopping your live location, please try again",
|
||||||
"Stop sharing": "Stop sharing",
|
"Stop sharing": "Stop sharing",
|
||||||
"Stop sharing and close": "Stop sharing and close",
|
"Stop sharing and close": "Stop sharing and close",
|
||||||
|
|
|
@ -91,7 +91,7 @@ export default abstract class BaseEventIndexManager {
|
||||||
*
|
*
|
||||||
* @param {MatrixEvent} ev The event that should be added to the index.
|
* @param {MatrixEvent} ev The event that should be added to the index.
|
||||||
* @param {IMatrixProfile} profile The profile of the event sender at the
|
* @param {IMatrixProfile} profile The profile of the event sender at the
|
||||||
* time of the event receival.
|
* time the event was received.
|
||||||
*
|
*
|
||||||
* @return {Promise} A promise that will resolve when the was queued up for
|
* @return {Promise} A promise that will resolve when the was queued up for
|
||||||
* addition.
|
* addition.
|
||||||
|
|
|
@ -596,7 +596,7 @@ export default class EventIndex extends EventEmitter {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If all events were already indexed we assume that we catched
|
// If all events were already indexed we assume that we caught
|
||||||
// up with our index and don't need to crawl the room further.
|
// up with our index and don't need to crawl the room further.
|
||||||
// Let us delete the checkpoint in that case, otherwise push
|
// Let us delete the checkpoint in that case, otherwise push
|
||||||
// the new checkpoint to be used by the crawler.
|
// the new checkpoint to be used by the crawler.
|
||||||
|
@ -612,7 +612,7 @@ export default class EventIndex extends EventEmitter {
|
||||||
this.crawlerCheckpoints.push(newCheckpoint);
|
this.crawlerCheckpoints.push(newCheckpoint);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.log("EventIndex: Error durring a crawl", e);
|
logger.log("EventIndex: Error during a crawl", e);
|
||||||
// An error occurred, put the checkpoint back so we
|
// An error occurred, put the checkpoint back so we
|
||||||
// can retry.
|
// can retry.
|
||||||
this.crawlerCheckpoints.push(checkpoint);
|
this.crawlerCheckpoints.push(checkpoint);
|
||||||
|
@ -797,7 +797,7 @@ export default class EventIndex extends EventEmitter {
|
||||||
// to get our events in the BACKWARDS direction but populate them in the
|
// to get our events in the BACKWARDS direction but populate them in the
|
||||||
// forwards direction.
|
// forwards direction.
|
||||||
// This needs to happen because a fill request might come with an
|
// This needs to happen because a fill request might come with an
|
||||||
// exisitng timeline e.g. if you close and re-open the FilePanel.
|
// existing timeline e.g. if you close and re-open the FilePanel.
|
||||||
if (fromEvent === null) {
|
if (fromEvent === null) {
|
||||||
matrixEvents.reverse();
|
matrixEvents.reverse();
|
||||||
direction = direction == EventTimeline.BACKWARDS ? EventTimeline.FORWARDS: EventTimeline.BACKWARDS;
|
direction = direction == EventTimeline.BACKWARDS ? EventTimeline.FORWARDS: EventTimeline.BACKWARDS;
|
||||||
|
|
|
@ -67,7 +67,7 @@ export class EventIndexPeg {
|
||||||
/**
|
/**
|
||||||
* Initialize the event index.
|
* Initialize the event index.
|
||||||
*
|
*
|
||||||
* @returns {boolean} True if the event index was succesfully initialized,
|
* @returns {boolean} True if the event index was successfully initialized,
|
||||||
* false otherwise.
|
* false otherwise.
|
||||||
*/
|
*/
|
||||||
async initEventIndex() {
|
async initEventIndex() {
|
||||||
|
@ -118,7 +118,7 @@ export class EventIndexPeg {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if event indexing support is installed for the platfrom.
|
* Check if event indexing support is installed for the platform.
|
||||||
*
|
*
|
||||||
* Event indexing might require additional optional modules to be installed,
|
* Event indexing might require additional optional modules to be installed,
|
||||||
* this tells us if those are installed. Note that this should only be
|
* this tells us if those are installed. Note that this should only be
|
||||||
|
|
|
@ -75,7 +75,7 @@ export class IntegrationManagerInstance {
|
||||||
client.setTermsInteractionCallback((policyInfo, agreedUrls) => {
|
client.setTermsInteractionCallback((policyInfo, agreedUrls) => {
|
||||||
// To avoid visual glitching of two modals stacking briefly, we customise the
|
// To avoid visual glitching of two modals stacking briefly, we customise the
|
||||||
// terms dialog sizing when it will appear for the integration manager so that
|
// terms dialog sizing when it will appear for the integration manager so that
|
||||||
// it gets the same basic size as the IM's own modal.
|
// it gets the same basic size as the integration manager's own modal.
|
||||||
return dialogTermsInteractionCallback(
|
return dialogTermsInteractionCallback(
|
||||||
policyInfo, agreedUrls, 'mx_TermsDialog_forIntegrationManager',
|
policyInfo, agreedUrls, 'mx_TermsDialog_forIntegrationManager',
|
||||||
);
|
);
|
||||||
|
|
|
@ -132,7 +132,7 @@ export const VectorPushRulesDefinitions = {
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// Messages just sent to a group chat room
|
// Messages just sent to a group chat room
|
||||||
// 1:1 room messages are catched by the .m.rule.room_one_to_one rule if any defined
|
// 1:1 room messages are caught by the .m.rule.room_one_to_one rule if any defined
|
||||||
// By opposition, all other room messages are from group chat rooms.
|
// By opposition, all other room messages are from group chat rooms.
|
||||||
".m.rule.message": new VectorPushRuleDefinition({
|
".m.rule.message": new VectorPushRuleDefinition({
|
||||||
description: _td("Messages in group chats"), // passed through _t() translation in src/components/views/settings/Notifications.js
|
description: _td("Messages in group chats"), // passed through _t() translation in src/components/views/settings/Notifications.js
|
||||||
|
@ -144,7 +144,7 @@ export const VectorPushRulesDefinitions = {
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// Encrypted messages just sent to a group chat room
|
// Encrypted messages just sent to a group chat room
|
||||||
// Encrypted 1:1 room messages are catched by the .m.rule.encrypted_room_one_to_one rule if any defined
|
// Encrypted 1:1 room messages are caught by the .m.rule.encrypted_room_one_to_one rule if any defined
|
||||||
// By opposition, all other room messages are from group chat rooms.
|
// By opposition, all other room messages are from group chat rooms.
|
||||||
".m.rule.encrypted": new VectorPushRuleDefinition({
|
".m.rule.encrypted": new VectorPushRuleDefinition({
|
||||||
description: _td("Encrypted messages in group chats"), // passed through _t() translation in src/components/views/settings/Notifications.js
|
description: _td("Encrypted messages in group chats"), // passed through _t() translation in src/components/views/settings/Notifications.js
|
||||||
|
|
|
@ -100,7 +100,7 @@ export default class ThemeWatcher {
|
||||||
// itself completely redundant since we just override the result here and we're
|
// itself completely redundant since we just override the result here and we're
|
||||||
// now effectively just using the ThemeController as a place to store the static
|
// now effectively just using the ThemeController as a place to store the static
|
||||||
// variable. The system theme setting probably ought to have an equivalent
|
// variable. The system theme setting probably ought to have an equivalent
|
||||||
// controller that honours the same flag, although probablt better would be to
|
// controller that honours the same flag, although probably better would be to
|
||||||
// have the theme logic in one place rather than split between however many
|
// have the theme logic in one place rather than split between however many
|
||||||
// different places.
|
// different places.
|
||||||
if (ThemeController.isLogin) return 'light';
|
if (ThemeController.isLogin) return 'light';
|
||||||
|
|
|
@ -43,7 +43,7 @@ import {
|
||||||
TimedGeoUri,
|
TimedGeoUri,
|
||||||
watchPosition,
|
watchPosition,
|
||||||
} from "../utils/beacon";
|
} from "../utils/beacon";
|
||||||
import { getCurrentPosition } from "../utils/beacon/geolocation";
|
import { getCurrentPosition } from "../utils/beacon";
|
||||||
|
|
||||||
const isOwnBeacon = (beacon: Beacon, userId: string): boolean => beacon.beaconInfoOwner === userId;
|
const isOwnBeacon = (beacon: Beacon, userId: string): boolean => beacon.beaconInfoOwner === userId;
|
||||||
|
|
||||||
|
@ -456,7 +456,7 @@ export class OwnBeaconStore extends AsyncStoreWithClient<OwnBeaconStoreState> {
|
||||||
private onWatchedPosition = (position: GeolocationPosition) => {
|
private onWatchedPosition = (position: GeolocationPosition) => {
|
||||||
const timedGeoPosition = mapGeolocationPositionToTimedGeo(position);
|
const timedGeoPosition = mapGeolocationPositionToTimedGeo(position);
|
||||||
|
|
||||||
// if this is our first position, publish immediateley
|
// if this is our first position, publish immediately
|
||||||
if (!this.lastPublishedPositionTimestamp) {
|
if (!this.lastPublishedPositionTimestamp) {
|
||||||
this.publishLocationToBeacons(timedGeoPosition);
|
this.publishLocationToBeacons(timedGeoPosition);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -504,7 +504,7 @@ export class RoomViewStore extends Store<ActionPayload> {
|
||||||
// since we should still consider a join to be in progress until the room
|
// since we should still consider a join to be in progress until the room
|
||||||
// & member events come down the sync.
|
// & member events come down the sync.
|
||||||
//
|
//
|
||||||
// This flag remains true after the room has been sucessfully joined,
|
// This flag remains true after the room has been successfully joined,
|
||||||
// (this store doesn't listen for the appropriate member events)
|
// (this store doesn't listen for the appropriate member events)
|
||||||
// so you should always observe the joined state from the member event
|
// so you should always observe the joined state from the member event
|
||||||
// if a room object is present.
|
// if a room object is present.
|
||||||
|
|
|
@ -44,9 +44,9 @@ class WidgetEchoStore extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the widgets for a room, substracting those that are pending deletion.
|
* Gets the widgets for a room, subtracting those that are pending deletion.
|
||||||
* Widgets that are pending addition are not included, since widgets are
|
* Widgets that are pending addition are not included, since widgets are
|
||||||
* represted as MatrixEvents, so to do this we'd have to create fake MatrixEvents,
|
* represented as MatrixEvents, so to do this we'd have to create fake MatrixEvents,
|
||||||
* and we don't really need the actual widget events anyway since we just want to
|
* and we don't really need the actual widget events anyway since we just want to
|
||||||
* show a spinner / prevent widgets being added twice.
|
* show a spinner / prevent widgets being added twice.
|
||||||
*
|
*
|
||||||
|
|
|
@ -38,7 +38,7 @@ const traverseSpaceDescendants = (
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper function to traverse space heirachy and flatten
|
* Helper function to traverse space hierarchy and flatten
|
||||||
* @param spaceEntityMap ie map of rooms or dm userIds
|
* @param spaceEntityMap ie map of rooms or dm userIds
|
||||||
* @param spaceDescendantMap map of spaces and their children
|
* @param spaceDescendantMap map of spaces and their children
|
||||||
* @returns set of all rooms
|
* @returns set of all rooms
|
||||||
|
|
|
@ -91,7 +91,7 @@ export class WidgetMessagingStore extends AsyncStoreWithClient<unknown> {
|
||||||
/**
|
/**
|
||||||
* Gets the widget messaging class for a given widget UID.
|
* Gets the widget messaging class for a given widget UID.
|
||||||
* @param {string} widgetUid The widget UID.
|
* @param {string} widgetUid The widget UID.
|
||||||
* @returns {ClientWidgetApi} The widget API, or a falsey value if not found.
|
* @returns {ClientWidgetApi} The widget API, or a falsy value if not found.
|
||||||
*/
|
*/
|
||||||
public getMessagingForUid(widgetUid: string): ClientWidgetApi {
|
public getMessagingForUid(widgetUid: string): ClientWidgetApi {
|
||||||
return this.widgetMap.get(widgetUid);
|
return this.widgetMap.get(widgetUid);
|
||||||
|
|
|
@ -142,7 +142,7 @@ export default class DMRoomMap {
|
||||||
/**
|
/**
|
||||||
* Gets the DM room which the given IDs share, if any.
|
* Gets the DM room which the given IDs share, if any.
|
||||||
* @param {string[]} ids The identifiers (user IDs and email addresses) to look for.
|
* @param {string[]} ids The identifiers (user IDs and email addresses) to look for.
|
||||||
* @returns {Room} The DM room which all IDs given share, or falsey if no common room.
|
* @returns {Room} The DM room which all IDs given share, or falsy if no common room.
|
||||||
*/
|
*/
|
||||||
public getDMRoomForIdentifiers(ids: string[]): Room {
|
public getDMRoomForIdentifiers(ids: string[]): Room {
|
||||||
// TODO: [Canonical DMs] Handle lookups for email addresses.
|
// TODO: [Canonical DMs] Handle lookups for email addresses.
|
||||||
|
|
|
@ -25,7 +25,7 @@ import { _t, _td, Tags, TranslatedString } from '../languageHandler';
|
||||||
*
|
*
|
||||||
* @param {string} limitType The limit_type from the error
|
* @param {string} limitType The limit_type from the error
|
||||||
* @param {string} adminContact The admin_contact from the error
|
* @param {string} adminContact The admin_contact from the error
|
||||||
* @param {Object} strings Translateable string for different
|
* @param {Object} strings Translatable string for different
|
||||||
* limit_type. Must include at least the empty string key
|
* limit_type. Must include at least the empty string key
|
||||||
* which is the default. Strings may include an 'a' tag
|
* which is the default. Strings may include an 'a' tag
|
||||||
* for the admin contact link.
|
* for the admin contact link.
|
||||||
|
|
|
@ -64,7 +64,7 @@ export function presentableTextForFile(
|
||||||
// big a file they are downloading.
|
// big a file they are downloading.
|
||||||
// The content.info also contains a MIME-type but we don't display
|
// The content.info also contains a MIME-type but we don't display
|
||||||
// it since it is "ugly", users generally aren't aware what it
|
// it since it is "ugly", users generally aren't aware what it
|
||||||
// means and the type of the attachment can usually be inferrered
|
// means and the type of the attachment can usually be inferred
|
||||||
// from the file extension.
|
// from the file extension.
|
||||||
text += ' (' + filesize(content.info.size) + ')';
|
text += ' (' + filesize(content.info.size) + ')';
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ export class LazyValue<T> {
|
||||||
* Whether or not a cached value is present.
|
* Whether or not a cached value is present.
|
||||||
*/
|
*/
|
||||||
public get present(): boolean {
|
public get present(): boolean {
|
||||||
// we use a tracking variable just in case the final value is falsey
|
// we use a tracking variable just in case the final value is falsy
|
||||||
return this.done;
|
return this.done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ const keyMap = new EnhancedMap<Object, EnhancedMap<string, unknown>>();
|
||||||
* second call comes through late. There are various functions named "forget"
|
* second call comes through late. There are various functions named "forget"
|
||||||
* to have the cache be cleared of a result.
|
* to have the cache be cleared of a result.
|
||||||
*
|
*
|
||||||
* Singleflights in our usecase are tied to an instance of something, combined
|
* Singleflights in our use case are tied to an instance of something, combined
|
||||||
* with a string key to differentiate between multiple possible actions. This
|
* with a string key to differentiate between multiple possible actions. This
|
||||||
* means that a "save" key will be scoped to the instance which defined it and
|
* means that a "save" key will be scoped to the instance which defined it and
|
||||||
* not leak between other instances. This is done to avoid having to concatenate
|
* not leak between other instances. This is done to avoid having to concatenate
|
||||||
|
|
|
@ -54,7 +54,7 @@ export const useBeacon = (beaconInfoEvent: MatrixEvent): Beacon | undefined => {
|
||||||
}
|
}
|
||||||
}, [beaconInfoEvent, matrixClient]);
|
}, [beaconInfoEvent, matrixClient]);
|
||||||
|
|
||||||
// beacon update will fire when this beacon is superceded
|
// beacon update will fire when this beacon is superseded
|
||||||
// check the updated event id for equality to the matrix event
|
// check the updated event id for equality to the matrix event
|
||||||
const beaconInstanceEventId = useEventEmitterState(
|
const beaconInstanceEventId = useEventEmitterState(
|
||||||
beacon,
|
beacon,
|
||||||
|
|
|
@ -175,7 +175,7 @@ export class ThreepidMember extends Member {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a getter that would be falsey on all other implementations. Until we have
|
// This is a getter that would be falsy on all other implementations. Until we have
|
||||||
// better type support in the react-sdk we can use this trick to determine the kind
|
// better type support in the react-sdk we can use this trick to determine the kind
|
||||||
// of 3PID we're dealing with, if any.
|
// of 3PID we're dealing with, if any.
|
||||||
get isEmail(): boolean {
|
get isEmail(): boolean {
|
||||||
|
|
|
@ -120,7 +120,7 @@ a.mx_reply_anchor:hover {
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_ReplyChain_Export {
|
.mx_ReplyChain_Export {
|
||||||
margin-top: 0px;
|
margin-top: 0;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ export default class ElementPermalinkConstructor extends PermalinkConstructor {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses an app route (`(user|room)/identifer`) to a Matrix entity
|
* Parses an app route (`(user|room)/identifier`) to a Matrix entity
|
||||||
* (room, user).
|
* (room, user).
|
||||||
* @param {string} route The app route
|
* @param {string} route The app route
|
||||||
* @returns {PermalinkParts}
|
* @returns {PermalinkParts}
|
||||||
|
|
|
@ -274,7 +274,7 @@ export function makeUserPermalink(userId: string): string {
|
||||||
|
|
||||||
export function makeRoomPermalink(roomId: string): string {
|
export function makeRoomPermalink(roomId: string): string {
|
||||||
if (!roomId) {
|
if (!roomId) {
|
||||||
throw new Error("can't permalink a falsey roomId");
|
throw new Error("can't permalink a falsy roomId");
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the roomId isn't actually a room ID, don't try to list the servers.
|
// If the roomId isn't actually a room ID, don't try to list the servers.
|
||||||
|
|
|
@ -168,7 +168,7 @@ describe('<LeftPanelLiveShareWarning />', () => {
|
||||||
const component = getComponent();
|
const component = getComponent();
|
||||||
// error mode
|
// error mode
|
||||||
expect(component.find('.mx_LeftPanelLiveShareWarning').at(0).text()).toEqual(
|
expect(component.find('.mx_LeftPanelLiveShareWarning').at(0).text()).toEqual(
|
||||||
'An error occured whilst sharing your live location',
|
'An error occurred whilst sharing your live location',
|
||||||
);
|
);
|
||||||
|
|
||||||
act(() => {
|
act(() => {
|
||||||
|
|
|
@ -359,7 +359,7 @@ describe('<RoomLiveShareWarning />', () => {
|
||||||
|
|
||||||
// renders wire error ui
|
// renders wire error ui
|
||||||
expect(component.find('.mx_RoomLiveShareWarning_label').text()).toEqual(
|
expect(component.find('.mx_RoomLiveShareWarning_label').text()).toEqual(
|
||||||
'An error occured whilst sharing your live location, please try again',
|
'An error occurred whilst sharing your live location, please try again',
|
||||||
);
|
);
|
||||||
expect(findByTestId(component, 'room-live-share-wire-error-close-button').length).toBeTruthy();
|
expect(findByTestId(component, 'room-live-share-wire-error-close-button').length).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|
|
@ -69,7 +69,7 @@ exports[`<LeftPanelLiveShareWarning /> when user has live location monitor rende
|
||||||
role="button"
|
role="button"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
>
|
>
|
||||||
An error occured whilst sharing your live location
|
An error occurred whilst sharing your live location
|
||||||
</div>
|
</div>
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
</LeftPanelLiveShareWarning>
|
</LeftPanelLiveShareWarning>
|
||||||
|
|
|
@ -32,7 +32,7 @@ exports[`<RoomLiveShareWarning /> when user has live beacons and geolocation is
|
||||||
<span
|
<span
|
||||||
className="mx_RoomLiveShareWarning_label"
|
className="mx_RoomLiveShareWarning_label"
|
||||||
>
|
>
|
||||||
An error occured whilst sharing your live location, please try again
|
An error occurred whilst sharing your live location, please try again
|
||||||
</span>
|
</span>
|
||||||
<AccessibleButton
|
<AccessibleButton
|
||||||
className="mx_RoomLiveShareWarning_stopButton"
|
className="mx_RoomLiveShareWarning_stopButton"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue