mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Improve error code
This commit is contained in:
parent
67da746b48
commit
4a12acf157
@ -90,10 +90,10 @@ class ReplyPreviewTile extends TextTile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get decryptionError() {
|
get decryptionError() {
|
||||||
return !!this._entry.decryptionError;
|
return this._entry.decryptionError;
|
||||||
}
|
}
|
||||||
|
|
||||||
get error() {
|
get hasError() {
|
||||||
return this.isRedacted || this.decryptionError;
|
return this.isRedacted || !!this.decryptionError;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ export class ReplyPreviewView extends TemplateView {
|
|||||||
while (replyContainer.lastChild) {
|
while (replyContainer.lastChild) {
|
||||||
replyContainer.removeChild(replyContainer.lastChild);
|
replyContainer.removeChild(replyContainer.lastChild);
|
||||||
}
|
}
|
||||||
replyContainer.appendChild(vm.error? this._renderError(vm) : this._renderReplyPreview(vm));
|
replyContainer.appendChild(vm.hasError? this._renderError(vm) : this._renderReplyPreview(vm));
|
||||||
})
|
})
|
||||||
return replyContainer;
|
return replyContainer;
|
||||||
}
|
}
|
||||||
@ -49,7 +49,7 @@ export class ReplyPreviewView extends TemplateView {
|
|||||||
return "This message has been deleted.";
|
return "This message has been deleted.";
|
||||||
}
|
}
|
||||||
else if (vm.decryptionError) {
|
else if (vm.decryptionError) {
|
||||||
return "This message could not be decrypted."
|
return vm.decryptionError.message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user