fix: favorites click opens isolated single-post view

When `linkToResource` is set, PopularRankRow now navigates to /resource/<id>?single=1 and PostRedirect propagates the `single=1` flag to the /browse?post=... target. MessageStream already supports singlePostMode (no filter bar, no sentinel, only the target post in the list), so favorites cards open the post in isolation instead of dropping the user into the surrounding stream.
This commit is contained in:
TerryM
2026-06-06 00:23:46 +08:00
parent 37e6e4901f
commit fd1a3f4b3e
2 changed files with 17 additions and 8 deletions

View File

@@ -150,7 +150,7 @@ export function PopularRankRow({
type="button"
onClick={() => {
if (linkToResource) {
navigate(lp(`/resource/${encodeURIComponent(post.id)}`));
navigate(lp(`/resource/${encodeURIComponent(post.id)}?single=1`));
return;
}
const params = new URLSearchParams();