From 75ee5093610420c4961803e8baa1855059ecf166 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 11 Jun 2021 11:30:11 +0200 Subject: [PATCH] fix lint --- src/domain/session/room/timeline/ReactionsViewModel.js | 1 - src/matrix/room/BaseRoom.js | 1 - src/matrix/room/timeline/Timeline.js | 4 ++-- src/matrix/room/timeline/entries/BaseEventEntry.js | 2 +- src/matrix/room/timeline/entries/PendingEventEntry.js | 6 +----- src/platform/web/ui/session/room/timeline/ReactionsView.js | 4 ++-- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/domain/session/room/timeline/ReactionsViewModel.js b/src/domain/session/room/timeline/ReactionsViewModel.js index 83757c13..6364fc8b 100644 --- a/src/domain/session/room/timeline/ReactionsViewModel.js +++ b/src/domain/session/room/timeline/ReactionsViewModel.js @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -import {ViewModel} from "../../../ViewModel.js"; import {ObservableMap} from "../../../../observable/map/ObservableMap.js"; export class ReactionsViewModel { diff --git a/src/matrix/room/BaseRoom.js b/src/matrix/room/BaseRoom.js index b1d3f7fc..8df281fd 100644 --- a/src/matrix/room/BaseRoom.js +++ b/src/matrix/room/BaseRoom.js @@ -28,7 +28,6 @@ import {EventEntry} from "./timeline/entries/EventEntry.js"; import {ObservedEventMap} from "./ObservedEventMap.js"; import {DecryptionSource} from "../e2ee/common.js"; import {ensureLogItem} from "../../logging/utils.js"; -import {ANNOTATION_RELATION_TYPE, getRelation} from "./timeline/relations.js"; const EVENT_ENCRYPTED_TYPE = "m.room.encrypted"; diff --git a/src/matrix/room/timeline/Timeline.js b/src/matrix/room/timeline/Timeline.js index 1dc5213a..35593663 100644 --- a/src/matrix/room/timeline/Timeline.js +++ b/src/matrix/room/timeline/Timeline.js @@ -22,7 +22,7 @@ import {TimelineReader} from "./persistence/TimelineReader.js"; import {PendingEventEntry} from "./entries/PendingEventEntry.js"; import {RoomMember} from "../members/RoomMember.js"; import {PowerLevels} from "./PowerLevels.js"; -import {getRelationFromContent, getRelation, ANNOTATION_RELATION_TYPE} from "./relations.js"; +import {getRelation, ANNOTATION_RELATION_TYPE} from "./relations.js"; import {REDACTION_TYPE} from "../common.js"; export class Timeline { @@ -158,7 +158,7 @@ export class Timeline { // also look for a relation target to update with this redaction if (pee.redactingRelation) { const eventId = pee.redactingRelation.event_id; - const found = this._remoteEntries.findAndUpdate( + this._remoteEntries.findAndUpdate( e => e.id === eventId, updateOrFalse ); diff --git a/src/matrix/room/timeline/entries/BaseEventEntry.js b/src/matrix/room/timeline/entries/BaseEventEntry.js index 8c449f33..6c37457a 100644 --- a/src/matrix/room/timeline/entries/BaseEventEntry.js +++ b/src/matrix/room/timeline/entries/BaseEventEntry.js @@ -16,7 +16,7 @@ limitations under the License. import {BaseEntry} from "./BaseEntry.js"; import {REDACTION_TYPE} from "../../common.js"; -import {createAnnotation, getRelationFromContent, ANNOTATION_RELATION_TYPE} from "../relations.js"; +import {createAnnotation, ANNOTATION_RELATION_TYPE} from "../relations.js"; import {PendingAnnotations} from "../PendingAnnotations.js"; export class BaseEventEntry extends BaseEntry { diff --git a/src/matrix/room/timeline/entries/PendingEventEntry.js b/src/matrix/room/timeline/entries/PendingEventEntry.js index 69cdcedc..d9aa4b80 100644 --- a/src/matrix/room/timeline/entries/PendingEventEntry.js +++ b/src/matrix/room/timeline/entries/PendingEventEntry.js @@ -92,6 +92,7 @@ export class PendingEventEntry extends BaseEventEntry { if (this._redactionTarget) { return getRelationFromContent(this._redactionTarget.content); } + return null; } /** * returns either the relationship on this entry, @@ -105,9 +106,4 @@ export class PendingEventEntry extends BaseEventEntry { return getRelationFromContent(this._pendingEvent.content); } } - - getOwnAnnotationId(_, key) { - // TODO: implement this once local reactions are implemented - return null; - } } diff --git a/src/platform/web/ui/session/room/timeline/ReactionsView.js b/src/platform/web/ui/session/room/timeline/ReactionsView.js index 33a34c9f..15d1574a 100644 --- a/src/platform/web/ui/session/room/timeline/ReactionsView.js +++ b/src/platform/web/ui/session/room/timeline/ReactionsView.js @@ -23,7 +23,7 @@ export class ReactionsView extends ListView { className: "Timeline_messageReactions", tagName: "div", list: reactionsViewModel.reactions, - onItemClick: (reactionView, evt) => reactionView.onClick(), + onItemClick: reactionView => reactionView.onClick(), } super(options, reactionVM => new ReactionView(reactionVM)); } @@ -40,4 +40,4 @@ class ReactionView extends TemplateView { onClick() { this.value.toggleReaction(); } -} \ No newline at end of file +}