Proper styling for View Once messages which are deleted for everyone
This commit is contained in:
parent
492bb283ee
commit
523843f30e
1 changed files with 8 additions and 4 deletions
|
@ -1407,6 +1407,11 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
||||||
}
|
}
|
||||||
|
|
||||||
isTapToView(): boolean {
|
isTapToView(): boolean {
|
||||||
|
// If a message is deleted for everyone, that overrides all other styling
|
||||||
|
if (this.get('deletedForEveryone')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return Boolean(this.get('isViewOnce') || this.get('messageTimer'));
|
return Boolean(this.get('isViewOnce') || this.get('messageTimer'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1515,12 +1520,11 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
||||||
additionalProperties = {},
|
additionalProperties = {},
|
||||||
shouldPersist = true
|
shouldPersist = true
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
if (this.get('isErased')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
window.log.info(`Erasing data for message ${this.idForLogging()}`);
|
window.log.info(`Erasing data for message ${this.idForLogging()}`);
|
||||||
|
|
||||||
|
// Note: There are cases where we want to re-erase a given message. For example, when
|
||||||
|
// a viewed (or outgoing) View-Once message is deleted for everyone.
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.deleteData();
|
await this.deleteData();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue