1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-17 17:42:41 +03:00

Merge pull request #3519 from matrix-org/travis/enable-cider

Enable CIDER composer by default
This commit is contained in:
Michael Telatynski
2019-10-04 10:50:28 +01:00
committed by GitHub
4 changed files with 20 additions and 9 deletions

View File

@@ -166,6 +166,8 @@ module.exports = createReactClass({
canReact: false,
canReply: false,
useCider: false,
};
},
@@ -201,6 +203,14 @@ module.exports = createReactClass({
this._onRoomViewStoreUpdate(true);
WidgetEchoStore.on('update', this._onWidgetEchoStoreUpdate);
this._onCiderUpdated();
this._ciderWatcherRef = SettingsStore.watchSetting(
"useCiderComposer", null, this._onCiderUpdated);
},
_onCiderUpdated: function() {
this.setState({useCider: SettingsStore.getValue("useCiderComposer")});
},
_onRoomViewStoreUpdate: function(initial) {
@@ -479,6 +489,8 @@ module.exports = createReactClass({
// (We could use isMounted, but facebook have deprecated that.)
this.unmounted = true;
SettingsStore.unwatchSetting(this._ciderWatcherRef);
// update the scroll map before we get unmounted
if (this.state.roomId) {
RoomScrollStateStore.setScrollState(this.state.roomId, this._getScrollState());
@@ -1793,7 +1805,7 @@ module.exports = createReactClass({
myMembership === 'join' && !this.state.searchResults
);
if (canSpeak) {
if (SettingsStore.isFeatureEnabled("feature_cider_composer")) {
if (this.state.useCider) {
const MessageComposer = sdk.getComponent('rooms.MessageComposer');
messageComposer =
<MessageComposer

View File

@@ -26,6 +26,7 @@ import PlatformPeg from "../../../../../PlatformPeg";
export default class PreferencesUserSettingsTab extends React.Component {
static COMPOSER_SETTINGS = [
'useCiderComposer',
'MessageComposerInput.autoReplaceEmoji',
'MessageComposerInput.suggestEmoji',
'sendTypingNotifications',