[Release] Switch threads on for everyone (#9890)
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
This commit is contained in:
parent
f38b5f62e5
commit
f4ad9b29ac
25 changed files with 38 additions and 38 deletions
|
@ -287,7 +287,7 @@ export default class MessagePanel extends React.Component<IProps, IState> {
|
|||
// and we check this in a hot code path. This is also cached in our
|
||||
// RoomContext, however we still need a fallback for roomless MessagePanels.
|
||||
this._showHiddenEvents = SettingsStore.getValue("showHiddenEventsInTimeline");
|
||||
this.threadsEnabled = SettingsStore.getValue("feature_threadstable");
|
||||
this.threadsEnabled = SettingsStore.getValue("feature_threadenabled");
|
||||
|
||||
this.showTypingNotificationsWatcherRef = SettingsStore.watchSetting(
|
||||
"showTypingNotifications",
|
||||
|
|
|
@ -100,7 +100,7 @@ export const RoomSearchView = forwardRef<ScrollPanel, Props>(
|
|||
return b.length - a.length;
|
||||
});
|
||||
|
||||
if (SettingsStore.getValue("feature_threadstable")) {
|
||||
if (SettingsStore.getValue("feature_threadenabled")) {
|
||||
// Process all thread roots returned in this batch of search results
|
||||
// XXX: This won't work for results coming from Seshat which won't include the bundled relationship
|
||||
for (const result of results.results) {
|
||||
|
|
|
@ -1182,7 +1182,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
|||
CHAT_EFFECTS.forEach((effect) => {
|
||||
if (containsEmoji(ev.getContent(), effect.emojis) || ev.getContent().msgtype === effect.msgType) {
|
||||
// For initial threads launch, chat effects are disabled see #19731
|
||||
if (!SettingsStore.getValue("feature_threadstable") || !ev.isRelation(THREAD_RELATION_TYPE.name)) {
|
||||
if (!SettingsStore.getValue("feature_threadenabled") || !ev.isRelation(THREAD_RELATION_TYPE.name)) {
|
||||
dis.dispatch({ action: `effects.${effect.command}` });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -249,7 +249,7 @@ const ThreadPanel: React.FC<IProps> = ({ roomId, onClose, permalinkCreator }) =>
|
|||
const openFeedback = shouldShowFeedback()
|
||||
? () => {
|
||||
Modal.createDialog(BetaFeedbackDialog, {
|
||||
featureId: "feature_threadstable",
|
||||
featureId: "feature_threadenabled",
|
||||
});
|
||||
}
|
||||
: null;
|
||||
|
|
|
@ -1688,7 +1688,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
|
|||
is very tied to the main room timeline, we are forcing the timeline to
|
||||
send read receipts for threaded events */
|
||||
const isThreadTimeline = this.context.timelineRenderingType === TimelineRenderingType.Thread;
|
||||
if (SettingsStore.getValue("feature_threadstable") && isThreadTimeline) {
|
||||
if (SettingsStore.getValue("feature_threadenabled") && isThreadTimeline) {
|
||||
return 0;
|
||||
}
|
||||
const index = this.state.events.findIndex((ev) => ev.getId() === evId);
|
||||
|
|
|
@ -71,7 +71,7 @@ const ReplyInThreadButton = ({ mxEvent, closeMenu }: IReplyInThreadButton) => {
|
|||
if (Boolean(relationType) && relationType !== RelationType.Thread) return null;
|
||||
|
||||
const onClick = (): void => {
|
||||
if (!SettingsStore.getValue("feature_threadstable")) {
|
||||
if (!SettingsStore.getValue("feature_threadenabled")) {
|
||||
dis.dispatch({
|
||||
action: Action.ViewUserSettings,
|
||||
initialTabId: UserTab.Labs,
|
||||
|
@ -640,7 +640,7 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
|
|||
rightClick &&
|
||||
contentActionable &&
|
||||
canSendMessages &&
|
||||
SettingsStore.getValue("feature_threadstable") &&
|
||||
SettingsStore.getValue("feature_threadenabled") &&
|
||||
Thread.hasServerSideSupport &&
|
||||
timelineRenderingType !== TimelineRenderingType.Thread
|
||||
) {
|
||||
|
|
|
@ -204,7 +204,7 @@ const ReplyInThreadButton = ({ mxEvent }: IReplyInThreadButton) => {
|
|||
|
||||
const relationType = mxEvent?.getRelation()?.rel_type;
|
||||
const hasARelation = !!relationType && relationType !== RelationType.Thread;
|
||||
const threadsEnabled = SettingsStore.getValue("feature_threadstable");
|
||||
const threadsEnabled = SettingsStore.getValue("feature_threadenabled");
|
||||
|
||||
if (!threadsEnabled && !Thread.hasServerSideSupport) {
|
||||
// hide the prompt if the user would only have degraded mode
|
||||
|
@ -216,7 +216,7 @@ const ReplyInThreadButton = ({ mxEvent }: IReplyInThreadButton) => {
|
|||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
if (!SettingsStore.getValue("feature_threadstable")) {
|
||||
if (!SettingsStore.getValue("feature_threadenabled")) {
|
||||
dis.dispatch({
|
||||
action: Action.ViewUserSettings,
|
||||
initialTabId: UserTab.Labs,
|
||||
|
@ -252,7 +252,7 @@ const ReplyInThreadButton = ({ mxEvent }: IReplyInThreadButton) => {
|
|||
</div>
|
||||
{!hasARelation && (
|
||||
<div className="mx_Tooltip_sub">
|
||||
{SettingsStore.getValue("feature_threadstable")
|
||||
{SettingsStore.getValue("feature_threadenabled")
|
||||
? _t("Beta feature")
|
||||
: _t("Beta feature. Click to learn more.")}
|
||||
</div>
|
||||
|
@ -548,7 +548,7 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
|
|||
);
|
||||
}
|
||||
} else if (
|
||||
SettingsStore.getValue("feature_threadstable") &&
|
||||
SettingsStore.getValue("feature_threadenabled") &&
|
||||
// Show thread icon even for deleted messages, but only within main timeline
|
||||
this.context.timelineRenderingType === TimelineRenderingType.Room &&
|
||||
this.props.mxEvent.getThread()
|
||||
|
|
|
@ -324,7 +324,7 @@ export default class RoomHeaderButtons extends HeaderButtons<IProps> {
|
|||
);
|
||||
rightPanelPhaseButtons.set(
|
||||
RightPanelPhases.ThreadPanel,
|
||||
SettingsStore.getValue("feature_threadstable") ? (
|
||||
SettingsStore.getValue("feature_threadenabled") ? (
|
||||
<HeaderButton
|
||||
key={RightPanelPhases.ThreadPanel}
|
||||
name="threadsButton"
|
||||
|
|
|
@ -387,7 +387,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
|
|||
}
|
||||
}
|
||||
|
||||
if (SettingsStore.getValue("feature_threadstable")) {
|
||||
if (SettingsStore.getValue("feature_threadenabled")) {
|
||||
this.props.mxEvent.on(ThreadEvent.Update, this.updateThread);
|
||||
|
||||
if (this.thread && !this.supportsThreadNotifications) {
|
||||
|
@ -470,7 +470,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
|
|||
if (this.props.showReactions) {
|
||||
this.props.mxEvent.removeListener(MatrixEventEvent.RelationsCreated, this.onReactionsCreated);
|
||||
}
|
||||
if (SettingsStore.getValue("feature_threadstable")) {
|
||||
if (SettingsStore.getValue("feature_threadenabled")) {
|
||||
this.props.mxEvent.off(ThreadEvent.Update, this.updateThread);
|
||||
}
|
||||
this.threadState?.off(NotificationStateEvents.Update, this.onThreadStateUpdate);
|
||||
|
@ -501,7 +501,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>
|
|||
};
|
||||
|
||||
private get thread(): Thread | null {
|
||||
if (!SettingsStore.getValue("feature_threadstable")) {
|
||||
if (!SettingsStore.getValue("feature_threadenabled")) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ export default class SearchResultTile extends React.Component<IProps> {
|
|||
const layout = SettingsStore.getValue("layout");
|
||||
const isTwelveHour = SettingsStore.getValue("showTwelveHourTimestamps");
|
||||
const alwaysShowTimestamps = SettingsStore.getValue("alwaysShowTimestamps");
|
||||
const threadsEnabled = SettingsStore.getValue("feature_threadstable");
|
||||
const threadsEnabled = SettingsStore.getValue("feature_threadenabled");
|
||||
|
||||
for (let j = 0; j < timeline.length; j++) {
|
||||
const mxEv = timeline[j];
|
||||
|
|
|
@ -436,7 +436,7 @@ export class SendMessageComposer extends React.Component<ISendMessageComposerPro
|
|||
// For initial threads launch, chat effects are disabled
|
||||
// see #19731
|
||||
const isNotThread = this.props.relation?.rel_type !== THREAD_RELATION_TYPE.name;
|
||||
if (!SettingsStore.getValue("feature_threadstable") || isNotThread) {
|
||||
if (!SettingsStore.getValue("feature_threadenabled") || isNotThread) {
|
||||
dis.dispatch({ action: `effects.${effect.command}` });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ export async function sendMessage(
|
|||
// For initial threads launch, chat effects are disabled
|
||||
// see #19731
|
||||
const isNotThread = relation?.rel_type !== THREAD_RELATION_TYPE.name;
|
||||
if (!SettingsStore.getValue("feature_threadstable") || isNotThread) {
|
||||
if (!SettingsStore.getValue("feature_threadenabled") || isNotThread) {
|
||||
dis.dispatch({ action: `effects.${effect.command}` });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue