forked from mystiq/hydrogen-web
Remove mapSideEffect
This commit is contained in:
parent
bb45d0eae9
commit
13cba84445
1 changed files with 5 additions and 7 deletions
|
@ -24,13 +24,11 @@ import {VideoView} from "./VideoView";
|
|||
|
||||
export class ReplyPreviewView extends TemplateView {
|
||||
render(t, vm) {
|
||||
const replyContainer = t.div({className: "ReplyPreviewView"});
|
||||
t.mapSideEffect(vm => vm.body, () => {
|
||||
while (replyContainer.lastChild) {
|
||||
replyContainer.removeChild(replyContainer.lastChild);
|
||||
}
|
||||
replyContainer.appendChild(vm.isRedacted? this._renderRedaction(vm) : this._renderReplyPreview(t, vm));
|
||||
})
|
||||
const replyContainer = t.div({ className: "ReplyPreviewView" }, [
|
||||
vm.isRedacted
|
||||
? this._renderRedaction(vm)
|
||||
: this._renderReplyPreview(t, vm),
|
||||
]);
|
||||
return replyContainer;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue