From 5ae1b1444f4927f923356709d6eadd8c8c30604b Mon Sep 17 00:00:00 2001 From: Aaron Raimist Date: Fri, 11 Jun 2021 23:24:05 -0500 Subject: [PATCH] Open local addresses section by default when there are no existing local addresses Signed-off-by: Aaron Raimist --- src/components/views/room_settings/AliasSettings.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/views/room_settings/AliasSettings.js b/src/components/views/room_settings/AliasSettings.js index 80e0099ab3..e493cba96f 100644 --- a/src/components/views/room_settings/AliasSettings.js +++ b/src/components/views/room_settings/AliasSettings.js @@ -134,6 +134,10 @@ export default class AliasSettings extends React.Component { } } this.setState({ localAliases }); + + if (localAliases.length === 0) { + this.setState({ detailsOpen: true }); + } } finally { this.setState({ localAliasesLoading: false }); } @@ -388,7 +392,7 @@ export default class AliasSettings extends React.Component { /> {_t("Local Addresses")}

{_t("Set addresses for this room so users can find this room through your homeserver (%(localDomain)s)", {localDomain})}

-
+
{ this.state.detailsOpen ? _t('Show less') : _t("Show more")} {localAliasesList}