forked from mystiq/hydrogen-web
Move method as local function
This commit is contained in:
parent
0ae3c60d6d
commit
88f9ad09a2
1 changed files with 3 additions and 4 deletions
|
@ -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 => {
|
t.mapSideEffect(vm => vm.body, body => {
|
||||||
while (this._shouldRemove(container.lastChild)) {
|
while (shouldRemove(container.lastChild)) {
|
||||||
container.removeChild(container.lastChild);
|
container.removeChild(container.lastChild);
|
||||||
}
|
}
|
||||||
for (const part of body.parts) {
|
for (const part of body.parts) {
|
||||||
|
@ -52,9 +54,6 @@ export class TextMessageView extends BaseMessageView {
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
|
|
||||||
_shouldRemove(element) {
|
|
||||||
return element && element.className !== "ReplyPreviewView" && element.nodeName !== "#comment";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue