mirror of https://github.com/vector-im/riot-web
Removed showSendButton setting
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>pull/21833/head
parent
35c0cb99d0
commit
ba2c68819f
|
@ -279,7 +279,6 @@ export default class MessageComposer extends React.Component {
|
||||||
tombstone: this._getRoomTombstone(),
|
tombstone: this._getRoomTombstone(),
|
||||||
canSendMessages: this.props.room.maySendMessage(),
|
canSendMessages: this.props.room.maySendMessage(),
|
||||||
showCallButtons: SettingsStore.getValue("showCallButtonsInComposer"),
|
showCallButtons: SettingsStore.getValue("showCallButtonsInComposer"),
|
||||||
showSendButton: SettingsStore.getValue("MessageComposerInput.showSendButton"),
|
|
||||||
hasConference: WidgetStore.instance.doesRoomHaveConference(this.props.room),
|
hasConference: WidgetStore.instance.doesRoomHaveConference(this.props.room),
|
||||||
joinedConference: WidgetStore.instance.isJoinedToConferenceIn(this.props.room),
|
joinedConference: WidgetStore.instance.isJoinedToConferenceIn(this.props.room),
|
||||||
isComposerEmpty: true,
|
isComposerEmpty: true,
|
||||||
|
@ -298,12 +297,6 @@ export default class MessageComposer extends React.Component {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
onShowSendButtonChanged = () => {
|
|
||||||
this.setState({
|
|
||||||
showSendButton: SettingsStore.getValue("MessageComposerInput.showSendButton"),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
_onWidgetUpdate = () => {
|
_onWidgetUpdate = () => {
|
||||||
this.setState({hasConference: WidgetStore.instance.doesRoomHaveConference(this.props.room)});
|
this.setState({hasConference: WidgetStore.instance.doesRoomHaveConference(this.props.room)});
|
||||||
};
|
};
|
||||||
|
@ -316,8 +309,6 @@ export default class MessageComposer extends React.Component {
|
||||||
this.dispatcherRef = dis.register(this.onAction);
|
this.dispatcherRef = dis.register(this.onAction);
|
||||||
MatrixClientPeg.get().on("RoomState.events", this._onRoomStateEvents);
|
MatrixClientPeg.get().on("RoomState.events", this._onRoomStateEvents);
|
||||||
this._waitForOwnMember();
|
this._waitForOwnMember();
|
||||||
this.showSendButtonRef = SettingsStore.watchSetting(
|
|
||||||
"MessageComposerInput.showSendButton", null, this.onShowSendButtonChanged);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_waitForOwnMember() {
|
_waitForOwnMember() {
|
||||||
|
@ -343,7 +334,6 @@ export default class MessageComposer extends React.Component {
|
||||||
WidgetStore.instance.removeListener(UPDATE_EVENT, this._onWidgetUpdate);
|
WidgetStore.instance.removeListener(UPDATE_EVENT, this._onWidgetUpdate);
|
||||||
ActiveWidgetStore.removeListener('update', this._onActiveWidgetUpdate);
|
ActiveWidgetStore.removeListener('update', this._onActiveWidgetUpdate);
|
||||||
dis.unregister(this.dispatcherRef);
|
dis.unregister(this.dispatcherRef);
|
||||||
SettingsStore.unwatchSetting(this.showSendButtonRef);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_onRoomStateEvents(ev, state) {
|
_onRoomStateEvents(ev, state) {
|
||||||
|
|
|
@ -34,7 +34,6 @@ export default class PreferencesUserSettingsTab extends React.Component {
|
||||||
'MessageComposerInput.suggestEmoji',
|
'MessageComposerInput.suggestEmoji',
|
||||||
'sendTypingNotifications',
|
'sendTypingNotifications',
|
||||||
'MessageComposerInput.ctrlEnterToSend',
|
'MessageComposerInput.ctrlEnterToSend',
|
||||||
`MessageComposerInput.showSendButton`,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
static TIMELINE_SETTINGS = [
|
static TIMELINE_SETTINGS = [
|
||||||
|
|
|
@ -336,11 +336,6 @@ export const SETTINGS: {[setting: string]: ISetting} = {
|
||||||
displayName: isMac ? _td("Use Command + Enter to send a message") : _td("Use Ctrl + Enter to send a message"),
|
displayName: isMac ? _td("Use Command + Enter to send a message") : _td("Use Ctrl + Enter to send a message"),
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
"MessageComposerInput.showSendButton": {
|
|
||||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
||||||
displayName: _td("Show send message button"),
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
"MessageComposerInput.autoReplaceEmoji": {
|
"MessageComposerInput.autoReplaceEmoji": {
|
||||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||||
displayName: _td('Automatically replace plain text Emoji'),
|
displayName: _td('Automatically replace plain text Emoji'),
|
||||||
|
|
Loading…
Reference in New Issue