Rename rendering context to timeline rendering type

pull/21833/head
Germain Souquet 2021-10-01 14:50:35 +01:00
parent 94573568fd
commit 25896880ca
1 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ import SettingsStore from "../../../settings/SettingsStore";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/src/logger";
import { withMatrixClientHOC, MatrixClientProps } from '../../../contexts/MatrixClientContext'; import { withMatrixClientHOC, MatrixClientProps } from '../../../contexts/MatrixClientContext';
import RoomContext, { AppRenderingContext } from '../../../contexts/RoomContext'; import RoomContext, { TimelineRenderingType } from '../../../contexts/RoomContext';
function getHtmlReplyFallback(mxEvent: MatrixEvent): string { function getHtmlReplyFallback(mxEvent: MatrixEvent): string {
const html = mxEvent.getContent().formatted_body; const html = mxEvent.getContent().formatted_body;
@ -70,7 +70,7 @@ function getTextReplyFallback(mxEvent: MatrixEvent): string {
function createEditContent( function createEditContent(
model: EditorModel, model: EditorModel,
editedEvent: MatrixEvent, editedEvent: MatrixEvent,
renderingContext?: AppRenderingContext, renderingContext?: TimelineRenderingType,
): IContent { ): IContent {
const isEmote = containsEmote(model); const isEmote = containsEmote(model);
if (isEmote) { if (isEmote) {
@ -112,7 +112,7 @@ function createEditContent(
}, },
}; };
if (renderingContext === AppRenderingContext.Thread) { if (renderingContext === TimelineRenderingType.Thread) {
relation['m.relates_to'][UNSTABLE_ELEMENT_REPLY_IN_THREAD.name] = true; relation['m.relates_to'][UNSTABLE_ELEMENT_REPLY_IN_THREAD.name] = true;
} }