Remove pointer cursor when clicking on quote won't do anything
This commit is contained in:
parent
9ad55c803f
commit
c283ba1a12
3 changed files with 12 additions and 10 deletions
|
@ -366,10 +366,6 @@
|
||||||
this.timerView.update();
|
this.timerView.update();
|
||||||
},
|
},
|
||||||
getQuoteObjectUrl() {
|
getQuoteObjectUrl() {
|
||||||
// Potential sources of objectUrl, as provided in Conversation.processQuotes
|
|
||||||
// 1. model.quotedMessage.imageUrl
|
|
||||||
// 2. model.quoteThumbnail.objectUrl
|
|
||||||
|
|
||||||
if (this.model.quotedMessageFromDatabase) {
|
if (this.model.quotedMessageFromDatabase) {
|
||||||
return this.model.quotedMessageFromDatabase.imageUrl;
|
return this.model.quotedMessageFromDatabase.imageUrl;
|
||||||
}
|
}
|
||||||
|
@ -415,6 +411,12 @@
|
||||||
const authorColor = contact ? contact.getColor() : 'grey';
|
const authorColor = contact ? contact.getColor() : 'grey';
|
||||||
const isFromMe = contact ? contact.id === OUR_NUMBER : false;
|
const isFromMe = contact ? contact.id === OUR_NUMBER : false;
|
||||||
const isIncoming = this.model.isIncoming();
|
const isIncoming = this.model.isIncoming();
|
||||||
|
const onClick = () => {
|
||||||
|
const { quotedMessage } = this.model;
|
||||||
|
if (quotedMessage) {
|
||||||
|
this.model.trigger('scroll-to-message', { id: quotedMessage.id });
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const props = {
|
const props = {
|
||||||
attachments: (quote.attachments || []).map(processAttachment),
|
attachments: (quote.attachments || []).map(processAttachment),
|
||||||
|
@ -423,12 +425,7 @@
|
||||||
authorTitle,
|
authorTitle,
|
||||||
isFromMe,
|
isFromMe,
|
||||||
isIncoming,
|
isIncoming,
|
||||||
onClick: () => {
|
onClick: this.model.quotedMessage ? onClick : null,
|
||||||
const { quotedMessage } = this.model;
|
|
||||||
if (quotedMessage) {
|
|
||||||
this.model.trigger('scroll-to-message', { id: quotedMessage.id });
|
|
||||||
}
|
|
||||||
},
|
|
||||||
text: quote.text,
|
text: quote.text,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -460,6 +460,10 @@ span.status {
|
||||||
@include message-replies-colors;
|
@include message-replies-colors;
|
||||||
@include twenty-percent-colors;
|
@include twenty-percent-colors;
|
||||||
|
|
||||||
|
&.no-click {
|
||||||
|
cursor: auto;
|
||||||
|
}
|
||||||
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
|
@ -173,6 +173,7 @@ export class Quote extends React.Component<Props, {}> {
|
||||||
authorColor,
|
authorColor,
|
||||||
'quote',
|
'quote',
|
||||||
isFromMe ? 'from-me' : null,
|
isFromMe ? 'from-me' : null,
|
||||||
|
!onClick ? 'no-click' : null,
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue