From ac0412d238cd297b9200ff51c2ef75812f60780a Mon Sep 17 00:00:00 2001 From: Germain Souquet Date: Thu, 19 Aug 2021 12:25:29 +0100 Subject: [PATCH] rename feature flag for Threads --- src/MatrixClientPeg.ts | 1 + src/components/structures/MessagePanel.tsx | 2 +- src/settings/Settings.tsx | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/MatrixClientPeg.ts b/src/MatrixClientPeg.ts index f43351aab2..d3382a2b5e 100644 --- a/src/MatrixClientPeg.ts +++ b/src/MatrixClientPeg.ts @@ -213,6 +213,7 @@ class MatrixClientPegClass implements IMatrixClientPeg { opts.pendingEventOrdering = PendingEventOrdering.Detached; opts.lazyLoadMembers = true; opts.clientWellKnownPollPeriod = 2 * 60 * 60; // 2 hours + opts.experimentalThreadSupport = SettingsStore.getValue("experimentalThreadSupport"); // Connect the matrix client to the dispatcher and setting handlers MatrixActionCreators.start(this.matrixClient); diff --git a/src/components/structures/MessagePanel.tsx b/src/components/structures/MessagePanel.tsx index fd716041c2..f7d6ceaa5f 100644 --- a/src/components/structures/MessagePanel.tsx +++ b/src/components/structures/MessagePanel.tsx @@ -446,7 +446,7 @@ export default class MessagePanel extends React.Component { // Always show highlighted event if (this.props.highlightedEventId === mxEv.getId()) return true; - const threadingEnabled = SettingsStore.getValue("feature_threading"); + const threadingEnabled = SettingsStore.getValue("experimentalThreadSupport"); if (threadingEnabled && mxEv.replyEventId && this.props.hideThreadedMessages === true) { return false; } diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx index 0a869c147c..6496231679 100644 --- a/src/settings/Settings.tsx +++ b/src/settings/Settings.tsx @@ -211,8 +211,11 @@ export const SETTINGS: {[setting: string]: ISetting} = { supportedLevels: LEVELS_FEATURE, default: false, }, - "feature_threading": { + "experimentalThreadSupport": { isFeature: true, + // Requires a reload as we change an option flag on the `js-sdk` + // And the entire sync history needs to be parsed again + controller: new ReloadOnChangeController(), displayName: _td("Threaded messaging"), supportedLevels: LEVELS_FEATURE, default: false,