forked from mystiq/hydrogen-web
Improve error code
This commit is contained in:
parent
67da746b48
commit
4a12acf157
2 changed files with 5 additions and 5 deletions
|
@ -90,10 +90,10 @@ class ReplyPreviewTile extends TextTile {
|
|||
}
|
||||
|
||||
get decryptionError() {
|
||||
return !!this._entry.decryptionError;
|
||||
return this._entry.decryptionError;
|
||||
}
|
||||
|
||||
get error() {
|
||||
return this.isRedacted || this.decryptionError;
|
||||
get hasError() {
|
||||
return this.isRedacted || !!this.decryptionError;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ export class ReplyPreviewView extends TemplateView {
|
|||
while (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;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ export class ReplyPreviewView extends TemplateView {
|
|||
return "This message has been deleted.";
|
||||
}
|
||||
else if (vm.decryptionError) {
|
||||
return "This message could not be decrypted."
|
||||
return vm.decryptionError.message;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue