mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Move method as local function
This commit is contained in:
parent
0ae3c60d6d
commit
88f9ad09a2
@ -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 New Issue
Block a user