mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Show current quoted message above composition field
Note that substantial changes will be required for the updated Android mockups, putting the quotation into the text box next to the attachment preview.
This commit is contained in:
@@ -14,6 +14,7 @@ interface Props {
|
||||
isFromMe: string;
|
||||
isIncoming: boolean;
|
||||
onClick?: () => void;
|
||||
onClose?: () => void;
|
||||
text: string;
|
||||
}
|
||||
|
||||
@@ -153,6 +154,22 @@ export class Quote extends React.Component<Props, {}> {
|
||||
return <div className="ios-label">{label}</div>;
|
||||
}
|
||||
|
||||
public renderClose() {
|
||||
const { onClose } = this.props;
|
||||
|
||||
if (!onClose) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// We need the container to give us the flexibility to implement the iOS design.
|
||||
// We put the onClick on both because the Android theme juse uses close-container
|
||||
return (
|
||||
<div className="close-container" onClick={onClose}>
|
||||
<div className="close-button" onClick={onClose}></div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
public render() {
|
||||
const {
|
||||
authorTitle,
|
||||
@@ -186,6 +203,7 @@ export class Quote extends React.Component<Props, {}> {
|
||||
{this.renderText()}
|
||||
</div>
|
||||
{this.renderIconContainer()}
|
||||
{this.renderClose()}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user