[Release] Fixes around threads beta in degraded mode (#8319)

* Fix soft crash around the thread panel in degraded mode

* Better specify fallback key

* Hide MAB Threads prompt if user would have degraded mode

* Confirm user wants to enable Threads beta if in degraded mode

* Fix copy
This commit is contained in:
Michael Telatynski 2022-04-14 12:07:43 +01:00 committed by GitHub
parent 5f356093fd
commit 1c1d5ea5a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 82 additions and 8 deletions

View file

@ -286,7 +286,7 @@ const ThreadPanel: React.FC<IProps> = ({
/>
{ timelineSet && (
<TimelinePanel
key={timelineSet.getFilter().filterId}
key={timelineSet.getFilter()?.filterId ?? (roomId + ":" + filterOption)}
ref={timelinePanel}
showReadReceipts={false} // No RR support in thread's MVP
manageReadReceipts={false} // No RR support in thread's MVP

View file

@ -20,6 +20,7 @@ import React, { ReactElement, useEffect } from 'react';
import { EventStatus, MatrixEvent, MatrixEventEvent } from 'matrix-js-sdk/src/models/event';
import classNames from 'classnames';
import { MsgType, RelationType } from 'matrix-js-sdk/src/@types/event';
import { Thread } from 'matrix-js-sdk/src/models/thread';
import type { Relations } from 'matrix-js-sdk/src/models/relations';
import { _t } from '../../../languageHandler';
@ -248,6 +249,11 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
];
private get showReplyInThreadAction(): boolean {
if (!SettingsStore.getValue("feature_thread") && !Thread.hasServerSideSupport) {
// hide the prompt if the user would only have degraded mode
return null;
}
const inNotThreadTimeline = this.context.timelineRenderingType !== TimelineRenderingType.Thread;
const isAllowedMessageType = !this.forbiddenThreadHeadMsgType.includes(