Only consider is_falling_back when threads is enabled (#8083)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
4eba451176
commit
6639b60dfd
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue