From c7d140f4d4bc99275a0a7927381b2059dfbb8cc8 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Mon, 22 Mar 2021 09:55:49 +1100 Subject: [PATCH] lint --- ts/components/session/menu/ConversationHeaderMenu.tsx | 2 +- ts/components/session/menu/ConversationListItemContextMenu.tsx | 2 +- ts/models/conversation.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ts/components/session/menu/ConversationHeaderMenu.tsx b/ts/components/session/menu/ConversationHeaderMenu.tsx index 967e7e2ad..84cc3e950 100644 --- a/ts/components/session/menu/ConversationHeaderMenu.tsx +++ b/ts/components/session/menu/ConversationHeaderMenu.tsx @@ -4,12 +4,12 @@ import { getAddModeratorsMenuItem, getBlockMenuItem, getCopyMenuItem, - getMarkAllReadMenuItem, getDeleteContactMenuItem, getDeleteMessagesMenuItem, getDisappearingMenuItem, getInviteContactMenuItem, getLeaveGroupMenuItem, + getMarkAllReadMenuItem, getRemoveModeratorsMenuItem, getUpdateGroupNameMenuItem, } from './Menu'; diff --git a/ts/components/session/menu/ConversationListItemContextMenu.tsx b/ts/components/session/menu/ConversationListItemContextMenu.tsx index 883a1a62d..a8db5274b 100644 --- a/ts/components/session/menu/ConversationListItemContextMenu.tsx +++ b/ts/components/session/menu/ConversationListItemContextMenu.tsx @@ -5,11 +5,11 @@ import { getBlockMenuItem, getClearNicknameMenuItem, getCopyMenuItem, - getMarkAllReadMenuItem, getDeleteContactMenuItem, getDeleteMessagesMenuItem, getInviteContactMenuItem, getLeaveGroupMenuItem, + getMarkAllReadMenuItem, } from './Menu'; export type PropsContextConversationItem = { diff --git a/ts/models/conversation.ts b/ts/models/conversation.ts index 240974cd5..dec179e1e 100644 --- a/ts/models/conversation.ts +++ b/ts/models/conversation.ts @@ -1354,7 +1354,8 @@ export class ConversationModel extends Backbone.Model { public copyPublicKey() { if (this.isPublic()) { - const openGroupUrl = this.id.substr(this.id.indexOf('@') + 1); + const atIndex = this.id.indexOf('@') as number; + const openGroupUrl = this.id.substr(atIndex + 1); window.clipboard.writeText(openGroupUrl); ToastUtils.pushCopiedToClipBoard();