Only consider is_falling_back when threads is enabled (#8083)

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Germain 2022-03-22 08:25:39 +00:00 committed by GitHub
parent 4eba451176
commit 6639b60dfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,6 +22,7 @@ import { THREAD_RELATION_TYPE } from "matrix-js-sdk/src/models/thread";
import { PERMITTED_URL_SCHEMES } from "../HtmlUtils"; import { PERMITTED_URL_SCHEMES } from "../HtmlUtils";
import { makeUserPermalink, RoomPermalinkCreator } from "./permalinks/Permalinks"; import { makeUserPermalink, RoomPermalinkCreator } from "./permalinks/Permalinks";
import { RecursivePartial } from "../@types/common"; import { RecursivePartial } from "../@types/common";
import SettingsStore from "../settings/SettingsStore";
export function getParentEventId(ev: MatrixEvent): string | undefined { export function getParentEventId(ev: MatrixEvent): string | undefined {
if (!ev || ev.isRedacted()) return; if (!ev || ev.isRedacted()) return;
@ -178,7 +179,10 @@ export function shouldDisplayReply(event: MatrixEvent): boolean {
} }
const relation = event.getRelation(); const relation = event.getRelation();
if (relation?.rel_type === THREAD_RELATION_TYPE.name && relation?.is_falling_back) { if (SettingsStore.getValue("feature_thread") &&
relation?.rel_type === THREAD_RELATION_TYPE.name &&
relation?.is_falling_back
) {
return false; return false;
} }