Merge branch 'fix/noteWithFiles' into 'develop'
fix: "Show posts with this file" page shows nothing Co-authored-by: Lhcfl <Lhcfl@outlook.com> See merge request firefish/firefish!10731
This commit is contained in:
commit
6dcf8c65b4
1 changed files with 20 additions and 13 deletions
|
@ -174,6 +174,25 @@ if (props.src === "antenna") {
|
||||||
const stream = useStream();
|
const stream = useStream();
|
||||||
|
|
||||||
function connectChannel() {
|
function connectChannel() {
|
||||||
|
if (props.src === "mentions") {
|
||||||
|
connection = stream.useChannel("main");
|
||||||
|
connection.on("mention", prepend);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (props.src === "directs") {
|
||||||
|
const onNote = (note) => {
|
||||||
|
if (note.visibility === "specified") {
|
||||||
|
prepend(note);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
connection = stream.useChannel("main");
|
||||||
|
connection.on("mention", onNote);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (props.src === "file") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (props.src === "antenna") {
|
if (props.src === "antenna") {
|
||||||
connection = stream.useChannel("antenna", {
|
connection = stream.useChannel("antenna", {
|
||||||
antennaId: props.antenna!,
|
antennaId: props.antenna!,
|
||||||
|
@ -199,17 +218,6 @@ function connectChannel() {
|
||||||
connection = stream.useChannel("globalTimeline", {
|
connection = stream.useChannel("globalTimeline", {
|
||||||
withReplies: defaultStore.state.showTimelineReplies,
|
withReplies: defaultStore.state.showTimelineReplies,
|
||||||
});
|
});
|
||||||
} else if (props.src === "mentions") {
|
|
||||||
connection = stream.useChannel("main");
|
|
||||||
connection.on("mention", prepend);
|
|
||||||
} else if (props.src === "directs") {
|
|
||||||
const onNote = (note) => {
|
|
||||||
if (note.visibility === "specified") {
|
|
||||||
prepend(note);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
connection = stream.useChannel("main");
|
|
||||||
connection.on("mention", onNote);
|
|
||||||
} else if (props.src === "list") {
|
} else if (props.src === "list") {
|
||||||
connection = stream.useChannel("userList", {
|
connection = stream.useChannel("userList", {
|
||||||
listId: props.list,
|
listId: props.list,
|
||||||
|
@ -219,7 +227,6 @@ function connectChannel() {
|
||||||
channelId: props.channel,
|
channelId: props.channel,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (props.src !== "directs" && props.src !== "mentions")
|
|
||||||
connection.on("note", prepend);
|
connection.on("note", prepend);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue