Skip to content

Commit b23d8d3

Browse files
committed
Remove editing code (we check this in a better way in componentDidUpdate)
1 parent 6a6fef6 commit b23d8d3

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

src/components/views/messages/TextualBody.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
66
Please see LICENSE files in the repository root for full details.
77
*/
88

9-
import React, { type JSX, createRef, type SyntheticEvent, type MouseEvent, useCallback, useEffect } from "react";
9+
import React, {
10+
type JSX,
11+
createRef,
12+
type SyntheticEvent,
13+
type MouseEvent,
14+
useCallback,
15+
useEffect,
16+
useMemo,
17+
} from "react";
1018
import { MsgType } from "matrix-js-sdk/src/matrix";
1119
import {
1220
UrlPreviewGroupView,
@@ -316,15 +324,6 @@ class InnerTextualBody extends React.Component<IBodyProps & { urlPreviewViewMode
316324
export default function TextualBody(props: IBodyProps): React.ReactElement {
317325
const [mediaVisible] = useMediaVisible(props.mxEvent);
318326

319-
/**
320-
* TODO: Ignore while editing.
321-
const stoppedEditing = prevProps.editState && !this.props.editState;
322-
const messageWasEdited = prevProps.replacingEventId !== this.props.replacingEventId;
323-
if (messageWasEdited || stoppedEditing) {
324-
this.urlPreviewVMRef.current?.recomputeSnapshot();
325-
}
326-
*/
327-
328327
const onUrlPreviewImageClicked = useCallback((preview: UrlPreviewViewSnapshotPreview): void => {
329328
if (!preview.image?.imageFull) {
330329
// Should never get this far, but doesn't hurt to check.

0 commit comments

Comments
 (0)