Refactor messages model; New timeline react components
This commit is contained in:
parent
d342b23cbc
commit
c41bc53614
31 changed files with 1463 additions and 3395 deletions
File diff suppressed because it is too large
Load diff
|
@ -1187,7 +1187,15 @@
|
|||
this.listenBack(view);
|
||||
},
|
||||
|
||||
forceSend({ contact, message }) {
|
||||
forceSend({ contactId, messageId }) {
|
||||
const contact = ConversationController.get(contactId);
|
||||
const message = this.model.messageCollection.get(messageId);
|
||||
if (!message) {
|
||||
throw new Error(
|
||||
`deleteMessage: Did not find message for id ${messageId}`
|
||||
);
|
||||
}
|
||||
|
||||
const dialog = new Whisper.ConfirmationDialogView({
|
||||
message: i18n('identityKeyErrorOnSend', [
|
||||
contact.getTitle(),
|
||||
|
|
|
@ -43,37 +43,38 @@
|
|||
},
|
||||
getRenderInfo() {
|
||||
const { Components } = window.Signal;
|
||||
const { type, data: props } = this.model.props;
|
||||
|
||||
if (this.model.propsForTimerNotification) {
|
||||
if (type === 'timerNotification') {
|
||||
return {
|
||||
Component: Components.TimerNotification,
|
||||
props: this.model.propsForTimerNotification,
|
||||
props,
|
||||
};
|
||||
} else if (this.model.propsForSafetyNumberNotification) {
|
||||
} else if (type === 'safetyNumberNotification') {
|
||||
return {
|
||||
Component: Components.SafetyNumberNotification,
|
||||
props: this.model.propsForSafetyNumberNotification,
|
||||
props,
|
||||
};
|
||||
} else if (this.model.propsForVerificationNotification) {
|
||||
} else if (type === 'verificationNotification') {
|
||||
return {
|
||||
Component: Components.VerificationNotification,
|
||||
props: this.model.propsForVerificationNotification,
|
||||
props,
|
||||
};
|
||||
} else if (this.model.propsForResetSessionNotification) {
|
||||
return {
|
||||
Component: Components.ResetSessionNotification,
|
||||
props: this.model.propsForResetSessionNotification,
|
||||
};
|
||||
} else if (this.model.propsForGroupNotification) {
|
||||
} else if (type === 'groupNotification') {
|
||||
return {
|
||||
Component: Components.GroupNotification,
|
||||
props: this.model.propsForGroupNotification,
|
||||
props,
|
||||
};
|
||||
} else if (type === 'resetSessionNotification') {
|
||||
return {
|
||||
Component: Components.ResetSessionNotification,
|
||||
props,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
Component: Components.Message,
|
||||
props: this.model.propsForMessage,
|
||||
props,
|
||||
};
|
||||
},
|
||||
render() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue