Skip to content

Commit

Permalink
fix replying to message focus composition box
Browse files Browse the repository at this point in the history
Relates oxen-io#1808
  • Loading branch information
Bilb committed Jul 29, 2021
1 parent 6bf95a4 commit 61277a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ts/components/session/conversation/SessionCompositionBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ class SessionCompositionBoxInner extends React.Component<Props, State> {
// if number of staged attachment changed, focus the composition box for a more natural UI
this.focusCompositionBox();
}

// focus the composition box when user clicks start to reply to a message
if (!_.isEqual(prevProps.quotedMessageProps, this.props.quotedMessageProps)) {
this.focusCompositionBox();
}
}

public render() {
Expand Down
3 changes: 1 addition & 2 deletions ts/interactions/conversationInteractions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ import {
import { getDecryptedMediaUrl } from '../session/crypto/DecryptedAttachmentsManager';
import { IMAGE_JPEG } from '../types/MIME';
import { FSv2 } from '../fileserver';
import { fromBase64ToArray, fromHexToArray, toHex } from '../session/utils/String';
import { fromHexToArray, toHex } from '../session/utils/String';
import { SessionButtonColor } from '../components/session/SessionButton';
import { perfEnd, perfStart } from '../session/utils/Performance';
import { ReplyingToMessageProps } from '../components/session/conversation/SessionCompositionBox';

export const getCompleteUrlForV2ConvoId = async (convoId: string) => {
if (convoId.match(openGroupV2ConversationIdRegex)) {
Expand Down

0 comments on commit 61277a5

Please sign in to comment.