Remove Quote from MessageContextMenu as it is unsupported by WYSIWYG (#11914)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
668e3a3bd9
commit
b34012f289
2 changed files with 1 additions and 33 deletions
|
@ -49,7 +49,6 @@ import ViewSource from "../../structures/ViewSource";
|
||||||
import { createRedactEventDialog } from "../dialogs/ConfirmRedactDialog";
|
import { createRedactEventDialog } from "../dialogs/ConfirmRedactDialog";
|
||||||
import ShareDialog from "../dialogs/ShareDialog";
|
import ShareDialog from "../dialogs/ShareDialog";
|
||||||
import RoomContext, { TimelineRenderingType } from "../../../contexts/RoomContext";
|
import RoomContext, { TimelineRenderingType } from "../../../contexts/RoomContext";
|
||||||
import { ComposerInsertPayload } from "../../../dispatcher/payloads/ComposerInsertPayload";
|
|
||||||
import EndPollDialog from "../dialogs/EndPollDialog";
|
import EndPollDialog from "../dialogs/EndPollDialog";
|
||||||
import { isPollEnded } from "../messages/MPollBody";
|
import { isPollEnded } from "../messages/MPollBody";
|
||||||
import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload";
|
import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload";
|
||||||
|
@ -286,15 +285,6 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
|
||||||
this.closeMenu();
|
this.closeMenu();
|
||||||
};
|
};
|
||||||
|
|
||||||
private onQuoteClick = (): void => {
|
|
||||||
dis.dispatch<ComposerInsertPayload>({
|
|
||||||
action: Action.ComposerInsert,
|
|
||||||
event: this.props.mxEvent,
|
|
||||||
timelineRenderingType: this.context.timelineRenderingType,
|
|
||||||
});
|
|
||||||
this.closeMenu();
|
|
||||||
};
|
|
||||||
|
|
||||||
private onShareClick = (e: ButtonEvent): void => {
|
private onShareClick = (e: ButtonEvent): void => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
Modal.createDialog(ShareDialog, {
|
Modal.createDialog(ShareDialog, {
|
||||||
|
@ -524,18 +514,6 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
let quoteButton: JSX.Element | undefined;
|
|
||||||
if (eventTileOps && canSendMessages) {
|
|
||||||
// this event is rendered using TextualBody
|
|
||||||
quoteButton = (
|
|
||||||
<IconizedContextMenuOption
|
|
||||||
iconClassName="mx_MessageContextMenu_iconQuote"
|
|
||||||
label={_t("action|quote")}
|
|
||||||
onClick={this.onQuoteClick}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Bridges can provide a 'external_url' to link back to the source.
|
// Bridges can provide a 'external_url' to link back to the source.
|
||||||
let externalURLButton: JSX.Element | undefined;
|
let externalURLButton: JSX.Element | undefined;
|
||||||
if (
|
if (
|
||||||
|
@ -709,7 +687,6 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
|
||||||
{viewInRoomButton}
|
{viewInRoomButton}
|
||||||
{openInMapSiteButton}
|
{openInMapSiteButton}
|
||||||
{endPollButton}
|
{endPollButton}
|
||||||
{quoteButton}
|
|
||||||
{forwardButton}
|
{forwardButton}
|
||||||
{pinButton}
|
{pinButton}
|
||||||
{permalinkButton}
|
{permalinkButton}
|
||||||
|
|
|
@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { MatrixEvent } from "matrix-js-sdk/src/matrix";
|
|
||||||
|
|
||||||
import { ActionPayload } from "../payloads";
|
import { ActionPayload } from "../payloads";
|
||||||
import { Action } from "../actions";
|
import { Action } from "../actions";
|
||||||
import { TimelineRenderingType } from "../../contexts/RoomContext";
|
import { TimelineRenderingType } from "../../contexts/RoomContext";
|
||||||
|
@ -35,15 +33,8 @@ interface IComposerInsertMentionPayload extends IBaseComposerInsertPayload {
|
||||||
userId: string;
|
userId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IComposerInsertQuotePayload extends IBaseComposerInsertPayload {
|
|
||||||
event: MatrixEvent;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IComposerInsertPlaintextPayload extends IBaseComposerInsertPayload {
|
interface IComposerInsertPlaintextPayload extends IBaseComposerInsertPayload {
|
||||||
text: string;
|
text: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ComposerInsertPayload =
|
export type ComposerInsertPayload = IComposerInsertMentionPayload | IComposerInsertPlaintextPayload;
|
||||||
| IComposerInsertMentionPayload
|
|
||||||
| IComposerInsertQuotePayload
|
|
||||||
| IComposerInsertPlaintextPayload;
|
|
||||||
|
|
Loading…
Reference in a new issue