Remove pointer cursor when clicking on quote won't do anything

This commit is contained in:
Scott Nonnenberg 2018-04-13 15:49:05 -07:00
parent 9ad55c803f
commit c283ba1a12
No known key found for this signature in database
GPG key ID: 5F82280C35134661
3 changed files with 12 additions and 10 deletions

View file

@ -366,10 +366,6 @@
this.timerView.update();
},
getQuoteObjectUrl() {
// Potential sources of objectUrl, as provided in Conversation.processQuotes
// 1. model.quotedMessage.imageUrl
// 2. model.quoteThumbnail.objectUrl
if (this.model.quotedMessageFromDatabase) {
return this.model.quotedMessageFromDatabase.imageUrl;
}
@ -415,6 +411,12 @@
const authorColor = contact ? contact.getColor() : 'grey';
const isFromMe = contact ? contact.id === OUR_NUMBER : false;
const isIncoming = this.model.isIncoming();
const onClick = () => {
const { quotedMessage } = this.model;
if (quotedMessage) {
this.model.trigger('scroll-to-message', { id: quotedMessage.id });
}
};
const props = {
attachments: (quote.attachments || []).map(processAttachment),
@ -423,12 +425,7 @@
authorTitle,
isFromMe,
isIncoming,
onClick: () => {
const { quotedMessage } = this.model;
if (quotedMessage) {
this.model.trigger('scroll-to-message', { id: quotedMessage.id });
}
},
onClick: this.model.quotedMessage ? onClick : null,
text: quote.text,
};

View file

@ -460,6 +460,10 @@ span.status {
@include message-replies-colors;
@include twenty-percent-colors;
&.no-click {
cursor: auto;
}
cursor: pointer;
display: flex;
flex-direction: row;

View file

@ -173,6 +173,7 @@ export class Quote extends React.Component<Props, {}> {
authorColor,
'quote',
isFromMe ? 'from-me' : null,
!onClick ? 'no-click' : null,
);
return (