From 1c8ae3650e2553a12c55e319cbc3f455872d1ebf Mon Sep 17 00:00:00 2001 From: William Grant Date: Fri, 16 Jun 2023 18:23:22 +1000 Subject: [PATCH] fix: pass yarn ready --- ts/components/conversation/SessionRightPanel.tsx | 4 ++-- ts/components/menu/Menu.tsx | 4 ++-- ts/interactions/conversationInteractions.ts | 4 ++-- ts/models/conversation.ts | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ts/components/conversation/SessionRightPanel.tsx b/ts/components/conversation/SessionRightPanel.tsx index 2869a6200..83a87cf9d 100644 --- a/ts/components/conversation/SessionRightPanel.tsx +++ b/ts/components/conversation/SessionRightPanel.tsx @@ -292,8 +292,8 @@ export const SessionRightPanelWithDetails = () => { const showAddRemoveModeratorsButton = weAreAdmin && !commonNoShow && isPublic; const showUpdateGroupMembersButton = !isPublic && isGroup && !commonNoShow; - const deleteConvoAction = () => { - showLeaveGroupByConvoId(selectedConvoKey, selectedUsername); + const deleteConvoAction = async () => { + await showLeaveGroupByConvoId(selectedConvoKey, selectedUsername); }; return ( diff --git a/ts/components/menu/Menu.tsx b/ts/components/menu/Menu.tsx index f4448d4ee..c8adb622c 100644 --- a/ts/components/menu/Menu.tsx +++ b/ts/components/menu/Menu.tsx @@ -142,8 +142,8 @@ export const LeaveGroupOrCommunityMenuItem = () => { if (!isKickedFromGroup && !isLeft && !isPrivate) { return ( { - showLeaveGroupByConvoId(convoId, username); + onClick={async () => { + await showLeaveGroupByConvoId(convoId, username); }} > {isPublic diff --git a/ts/interactions/conversationInteractions.ts b/ts/interactions/conversationInteractions.ts index fd942f432..447ee7fbc 100644 --- a/ts/interactions/conversationInteractions.ts +++ b/ts/interactions/conversationInteractions.ts @@ -713,7 +713,7 @@ export async function callRecipient(pubkey: string, canCall: boolean) { /** * Updates the interaction state for a conversation. Remember to run clearConversationInteractionState() when the interaction is complete and we don't want to show it in the UI anymore. - * @param conversationId + * @param conversationId id of the converation we want to interact with * @param type the type of conversation interaciton we are doing * @param status the status of that interaction */ @@ -740,7 +740,7 @@ export async function updateConversationInteractionState({ /** * Clears the interaction state for a conversation. We would use this when we don't need to show anything in the UI once an action is complete. - * @param conversationId + * @param conversationId id of the conversation whose interaction we want to clear */ export async function clearConversationInteractionState({ conversationId, diff --git a/ts/models/conversation.ts b/ts/models/conversation.ts index 333fd510b..8b764e7e9 100644 --- a/ts/models/conversation.ts +++ b/ts/models/conversation.ts @@ -1859,6 +1859,7 @@ export class ConversationModel extends Backbone.Model { }); } + // tslint:disable-next-line cyclomatic-complexity private async bouncyUpdateLastMessage() { if (!this.id || !this.get('active_at') || this.isHidden()) { return;