Use classes instead of loosely defined functions, use prebuilt function for color binding

This commit is contained in:
Jaiwanth
2021-05-24 19:17:07 +05:30
parent 0029bf566b
commit e6c4ab3993
2 changed files with 163 additions and 106 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import { MatrixClientPeg } from "../../MatrixClientPeg";
import { arrayFastClone } from "../arrays";
import { TimelineWindow } from "matrix-js-sdk/src/timeline-window";
import Room from 'matrix-js-sdk/src/models/room';
import exportAsHTML from "./HtmlExport";
import HTMLExporter from "./HtmlExport";
export enum exportFormats {
HTML = "HTML",
@@ -44,7 +44,7 @@ const exportConversationalHistory = async (room: Room, format: string, options)
const res = getTimelineConversation(room);
switch (format) {
case exportFormats.HTML:
await exportAsHTML(res, room);
new HTMLExporter(res, room).export();
break;
case exportFormats.JSON:
break;