From 18c9b2bed2f563e8b96f6fa1593d789d55de1501 Mon Sep 17 00:00:00 2001
From: alunturner <56027671+alunturner@users.noreply.github.com>
Date: Tue, 14 Feb 2023 11:07:36 +0000
Subject: [PATCH] Hide indent button in rte (#10149)
* add conditional rendering for indent and unindent buttons
* bump rte to 1.1.1
---
package.json | 2 +-
.../components/FormattingButtons.tsx | 29 ++++++++++--------
.../components/FormattingButtons-test.tsx | 30 ++++++++++++++++---
yarn.lock | 8 ++---
4 files changed, 48 insertions(+), 21 deletions(-)
diff --git a/package.json b/package.json
index fb8dda8154..4a4cfd2e4f 100644
--- a/package.json
+++ b/package.json
@@ -57,7 +57,7 @@
"dependencies": {
"@babel/runtime": "^7.12.5",
"@matrix-org/analytics-events": "^0.4.0",
- "@matrix-org/matrix-wysiwyg": "^0.23.0",
+ "@matrix-org/matrix-wysiwyg": "^1.1.1",
"@matrix-org/react-sdk-module-api": "^0.0.3",
"@sentry/browser": "^7.0.0",
"@sentry/tracing": "^7.0.0",
diff --git a/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx b/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx
index 7bc4b33d41..36ca4b6a61 100644
--- a/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx
+++ b/src/components/views/rooms/wysiwyg_composer/components/FormattingButtons.tsx
@@ -88,6 +88,7 @@ interface FormattingButtonsProps {
export function FormattingButtons({ composer, actionStates }: FormattingButtonsProps): JSX.Element {
const composerContext = useComposerContext();
+ const isInList = actionStates.unorderedList === "reversed" || actionStates.orderedList === "reversed";
return (