mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Remove mapSideEffect
This commit is contained in:
parent
bb45d0eae9
commit
13cba84445
@ -24,13 +24,11 @@ import {VideoView} from "./VideoView";
|
|||||||
|
|
||||||
export class ReplyPreviewView extends TemplateView {
|
export class ReplyPreviewView extends TemplateView {
|
||||||
render(t, vm) {
|
render(t, vm) {
|
||||||
const replyContainer = t.div({className: "ReplyPreviewView"});
|
const replyContainer = t.div({ className: "ReplyPreviewView" }, [
|
||||||
t.mapSideEffect(vm => vm.body, () => {
|
vm.isRedacted
|
||||||
while (replyContainer.lastChild) {
|
? this._renderRedaction(vm)
|
||||||
replyContainer.removeChild(replyContainer.lastChild);
|
: this._renderReplyPreview(t, vm),
|
||||||
}
|
]);
|
||||||
replyContainer.appendChild(vm.isRedacted? this._renderRedaction(vm) : this._renderReplyPreview(t, vm));
|
|
||||||
})
|
|
||||||
return replyContainer;
|
return replyContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user