Move method as local function

This commit is contained in:
RMidhunSuresh 2022-01-06 17:19:05 +05:30
parent 0ae3c60d6d
commit 88f9ad09a2

View file

@ -39,8 +39,10 @@ export class TextMessageView extends BaseMessageView {
}
}));
const shouldRemove = (element) => element && element.className !== "ReplyPreviewView" && element.nodeName !== "#comment";
t.mapSideEffect(vm => vm.body, body => {
while (this._shouldRemove(container.lastChild)) {
while (shouldRemove(container.lastChild)) {
container.removeChild(container.lastChild);
}
for (const part of body.parts) {
@ -52,9 +54,6 @@ export class TextMessageView extends BaseMessageView {
return container;
}
_shouldRemove(element) {
return element && element.className !== "ReplyPreviewView" && element.nodeName !== "#comment";
}
}