Skip to content

Commit

Permalink
fix: fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
KeeJef committed Nov 15, 2023
1 parent 8054964 commit 12fc3d6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
9 changes: 6 additions & 3 deletions ts/components/conversation/SessionConversation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ import { MessageDetail } from './message/message-item/MessageDetail';

import { HTMLDirection } from '../../util/i18n';
import { SessionSpinner } from '../basic/SessionSpinner';
import { deleteMessagesByIdForEveryone } from '../../interactions/conversations/unsendingInteractions';

const DEFAULT_JPEG_QUALITY = 0.85;
import { deleteMessagesByIdForEveryone } from '../../interactions/conversations/unsendingInteractions';
// tslint:disable: jsx-curly-spacing
interface State {
isDraggingFile: boolean;
Expand Down Expand Up @@ -344,11 +344,14 @@ export class SessionConversation extends React.Component<Props, State> {
if (selectionMode) {
window.inboxStore?.dispatch(resetSelectedMessageIds());
}
break;
break;
case 'Backspace':
case 'Delete':
if (selectionMode) {
void deleteMessagesByIdForEveryone(this.props.selectedMessages, this.props.selectedConversationKey);
void deleteMessagesByIdForEveryone(
this.props.selectedMessages,
this.props.selectedConversationKey
);
}
break;
default:
Expand Down
10 changes: 5 additions & 5 deletions ts/components/dialog/SessionConfirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,18 @@ export const SessionConfirm = (props: SessionConfirmDialogProps) => {
}
};

if (shouldShowConfirm && !shouldShowConfirm) {
return null;
}

useKey('Enter', () => {
onClickOkHandler();
void onClickOkHandler();
});

useKey('Escape', () => {
onClickCancelHandler();
});

if (shouldShowConfirm && !shouldShowConfirm) {
return null;
}

/**
* Performs specified on close action then removes the modal.
*/
Expand Down

0 comments on commit 12fc3d6

Please sign in to comment.