Don't mutate state in TimelineItem
This commit is contained in:
parent
1cc7c5dc2d
commit
80c1ad6ee3
5 changed files with 127 additions and 61 deletions
|
@ -99,6 +99,7 @@ import {
|
|||
getActiveCall,
|
||||
} from '../state/selectors/calling';
|
||||
import { getAccountSelector } from '../state/selectors/accounts';
|
||||
import { getContactNameColorSelector } from '../state/selectors/conversations';
|
||||
import {
|
||||
MessageReceipts,
|
||||
MessageReceiptType,
|
||||
|
@ -378,6 +379,14 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
const accountSelector = getAccountSelector(state);
|
||||
return accountSelector(identifier);
|
||||
},
|
||||
contactNameColorSelector: (
|
||||
conversationId: string,
|
||||
contactId: string
|
||||
) => {
|
||||
const state = window.reduxStore.getState();
|
||||
const contactNameColorSelector = getContactNameColorSelector(state);
|
||||
return contactNameColorSelector(conversationId, contactId);
|
||||
},
|
||||
}),
|
||||
errors,
|
||||
contacts,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue