Don't export IProps
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
b7af39ffff
commit
2e295a94ed
|
@ -43,7 +43,7 @@ const ZOOM_COEFFICIENT = 0.0025;
|
||||||
// If we have moved only this much we can zoom
|
// If we have moved only this much we can zoom
|
||||||
const ZOOM_DISTANCE = 10;
|
const ZOOM_DISTANCE = 10;
|
||||||
|
|
||||||
export interface IProps {
|
interface IProps {
|
||||||
src: string; // the source of the image being displayed
|
src: string; // the source of the image being displayed
|
||||||
name?: string; // the main title ('name') for the image
|
name?: string; // the main title ('name') for the image
|
||||||
link?: string; // the link (if any) applied to the name of the image
|
link?: string; // the link (if any) applied to the name of the image
|
||||||
|
|
|
@ -16,12 +16,11 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { createRef } from 'react';
|
import React, { ComponentProps, createRef } from 'react';
|
||||||
import { Blurhash } from "react-blurhash";
|
import { Blurhash } from "react-blurhash";
|
||||||
|
|
||||||
import MFileBody from './MFileBody';
|
import MFileBody from './MFileBody';
|
||||||
import Modal from '../../../Modal';
|
import Modal from '../../../Modal';
|
||||||
import * as sdk from '../../../index';
|
|
||||||
import { decryptFile } from '../../../utils/DecryptFile';
|
import { decryptFile } from '../../../utils/DecryptFile';
|
||||||
import { _t } from '../../../languageHandler';
|
import { _t } from '../../../languageHandler';
|
||||||
import SettingsStore from "../../../settings/SettingsStore";
|
import SettingsStore from "../../../settings/SettingsStore";
|
||||||
|
@ -33,7 +32,7 @@ import { BLURHASH_FIELD } from "../../../ContentMessages";
|
||||||
import { MatrixEvent } from 'matrix-js-sdk/src/models/event';
|
import { MatrixEvent } from 'matrix-js-sdk/src/models/event';
|
||||||
import { RoomPermalinkCreator } from '../../../utils/permalinks/Permalinks';
|
import { RoomPermalinkCreator } from '../../../utils/permalinks/Permalinks';
|
||||||
import { IMediaEventContent } from '../../../customisations/models/IMediaEventContent';
|
import { IMediaEventContent } from '../../../customisations/models/IMediaEventContent';
|
||||||
import { IProps as ImageViewIProps } from "../elements/ImageView";
|
import ImageView from '../elements/ImageView';
|
||||||
|
|
||||||
export interface IProps {
|
export interface IProps {
|
||||||
/* the MatrixEvent to show */
|
/* the MatrixEvent to show */
|
||||||
|
@ -115,8 +114,7 @@ export default class MImageBody extends React.Component<IProps, IState> {
|
||||||
|
|
||||||
const content = this.props.mxEvent.getContent() as IMediaEventContent;
|
const content = this.props.mxEvent.getContent() as IMediaEventContent;
|
||||||
const httpUrl = this.getContentUrl();
|
const httpUrl = this.getContentUrl();
|
||||||
const ImageView = sdk.getComponent("elements.ImageView");
|
const params: ComponentProps<typeof ImageView> = {
|
||||||
const params: ImageViewIProps = {
|
|
||||||
src: httpUrl,
|
src: httpUrl,
|
||||||
name: content.body?.length > 0 ? content.body : _t('Attachment'),
|
name: content.body?.length > 0 ? content.body : _t('Attachment'),
|
||||||
mxEvent: this.props.mxEvent,
|
mxEvent: this.props.mxEvent,
|
||||||
|
|
Loading…
Reference in New Issue