mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Allow saving room topic or name only
This changes the room profile settings to support saving _only_ the room topic or name in case you have limited access to set one but not the other. Fixes https://github.com/vector-im/element-web/issues/16375
This commit is contained in:
parent
15a4032be0
commit
bffce8689a
@ -81,7 +81,11 @@ export default class RoomProfileSettings extends React.Component {
|
||||
|
||||
if (!this.state.enableProfileSave) return;
|
||||
this._removeAvatar();
|
||||
this.setState({enableProfileSave: false, displayName: this.state.originalDisplayName});
|
||||
this.setState({
|
||||
enableProfileSave: false,
|
||||
displayName: this.state.originalDisplayName,
|
||||
topic: this.state.originalTopic,
|
||||
});
|
||||
};
|
||||
|
||||
_saveProfile = async (e) => {
|
||||
@ -164,7 +168,7 @@ export default class RoomProfileSettings extends React.Component {
|
||||
const AvatarSetting = sdk.getComponent('settings.AvatarSetting');
|
||||
|
||||
let profileSettingsButtons;
|
||||
if (this.state.canSetTopic && this.state.canSetName) {
|
||||
if (this.state.canSetTopic || this.state.canSetName) {
|
||||
profileSettingsButtons = (
|
||||
<div className="mx_ProfileSettings_buttons">
|
||||
<AccessibleButton
|
||||
|
Loading…
Reference in New Issue
Block a user