Remove the Description from the location picker (#7485)

This commit is contained in:
Andy Balaam 2022-01-10 10:07:51 +00:00 committed by GitHub
parent fe16f224ea
commit 9562deb28c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 212 deletions

View file

@ -58,7 +58,6 @@ import Modal from "../../../Modal";
import RoomContext from '../../../contexts/RoomContext';
import ErrorDialog from "../dialogs/ErrorDialog";
import PollCreateDialog from "../elements/PollCreateDialog";
import LocationShareType from "../location/LocationShareType";
import { SettingUpdatedPayload } from "../../../dispatcher/payloads/SettingUpdatedPayload";
import { CollapsibleButton, ICollapsibleButtonProps } from './CollapsibleButton';
import { LocationButton, textForLocation } from '../location/LocationButton';
@ -453,18 +452,13 @@ export default class MessageComposer extends React.Component<IProps, IState> {
return true;
};
private shareLocation = (
uri: string,
ts: number,
_type: LocationShareType,
description: string | null,
): boolean => {
private shareLocation = (uri: string, ts: number): boolean => {
if (!uri) return false;
try {
const text = textForLocation(uri, ts, description);
const text = textForLocation(uri, ts, null);
MatrixClientPeg.get().sendMessage(
this.props.room.roomId,
makeLocationContent(text, uri, ts, description),
makeLocationContent(text, uri, ts, null),
);
} catch (e) {
logger.error("Error sending location:", e);