From bf6798e1096ad0145f2e833239e5135e4309dec9 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 13 Jan 2020 13:28:33 -0700 Subject: [PATCH] Appease the linter --- src/Avatar.js | 3 ++- src/Resend.js | 12 ++++++------ src/components/structures/TimelinePanel.js | 2 -- src/components/views/room_settings/AliasSettings.js | 1 + test/components/stub-component.js | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Avatar.js b/src/Avatar.js index 47d08aac21..5a330c31e9 100644 --- a/src/Avatar.js +++ b/src/Avatar.js @@ -20,6 +20,7 @@ import DMRoomMap from './utils/DMRoomMap'; import {getHttpUriForMxc} from "matrix-js-sdk/src/content-repo"; export function avatarUrlForMember(member, width, height, resizeMethod) { + let url; if (member && member.getAvatarUrl) { url = member.getAvatarUrl( MatrixClientPeg.get().getHomeserverUrl(), @@ -34,7 +35,7 @@ export function avatarUrlForMember(member, width, height, resizeMethod) { // member can be null here currently since on invites, the JS SDK // does not have enough info to build a RoomMember object for // the inviter. - url = this.defaultAvatarUrlForString(member ? member.userId : ''); + url = defaultAvatarUrlForString(member ? member.userId : ''); } return url; } diff --git a/src/Resend.js b/src/Resend.js index 1d73212340..6d6c18cf27 100644 --- a/src/Resend.js +++ b/src/Resend.js @@ -21,29 +21,29 @@ import { EventStatus } from 'matrix-js-sdk'; export default class Resend { static resendUnsentEvents(room) { - room.getPendingEvents().filter(function (ev) { + room.getPendingEvents().filter(function(ev) { return ev.status === EventStatus.NOT_SENT; - }).forEach(function (event) { + }).forEach(function(event) { Resend.resend(event); }); } static cancelUnsentEvents(room) { - room.getPendingEvents().filter(function (ev) { + room.getPendingEvents().filter(function(ev) { return ev.status === EventStatus.NOT_SENT; - }).forEach(function (event) { + }).forEach(function(event) { Resend.removeFromQueue(event); }); } static resend(event) { const room = MatrixClientPeg.get().getRoom(event.getRoomId()); - MatrixClientPeg.get().resendEvent(event, room).then(function (res) { + MatrixClientPeg.get().resendEvent(event, room).then(function(res) { dis.dispatch({ action: 'message_sent', event: event, }); - }, function (err) { + }, function(err) { // XXX: temporary logging to try to diagnose // https://github.com/vector-im/riot-web/issues/3148 console.log('Resend got send failure: ' + err.name + '(' + err + ')'); diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index 1d50a51579..30b02bfcca 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -1136,8 +1136,6 @@ const TimelinePanel = createReactClass({ const messagePanel = this._messagePanel.current; if (messagePanel === undefined) return null; - const EventTile = sdk.getComponent('rooms.EventTile'); - const wrapperRect = ReactDOM.findDOMNode(messagePanel).getBoundingClientRect(); const myUserId = MatrixClientPeg.get().credentials.userId; diff --git a/src/components/views/room_settings/AliasSettings.js b/src/components/views/room_settings/AliasSettings.js index b5febb689e..ee5a505b32 100644 --- a/src/components/views/room_settings/AliasSettings.js +++ b/src/components/views/room_settings/AliasSettings.js @@ -24,6 +24,7 @@ import { _t } from '../../../languageHandler'; import Field from "../elements/Field"; import ErrorDialog from "../dialogs/ErrorDialog"; import AccessibleButton from "../elements/AccessibleButton"; +import Modal from "../../../Modal"; class EditableAliasesList extends EditableItemList { constructor(props) { diff --git a/test/components/stub-component.js b/test/components/stub-component.js index 5638ada09d..a5c3b44409 100644 --- a/test/components/stub-component.js +++ b/test/components/stub-component.js @@ -17,4 +17,4 @@ export default function(opts) { } return createReactClass(opts); -}; +}