mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(quotes): scope post-number lookup by subplebbit, OP quote always navigates to thread
- numberToCid scoped by subplebbit address to fix wrong preview in /all/ - OP quote click navigates to thread page instead of highlighting card
This commit is contained in:
@@ -131,8 +131,12 @@ const DesktopQuotePreview = ({ backlinkReply, quotelinkReply, isBacklinkReply, i
|
||||
if (cid && subplebbitAddress) {
|
||||
const boardPath = getBoardPath(subplebbitAddress, directories);
|
||||
const threadRoute = `/${boardPath}/thread/${cid}`;
|
||||
if (isOpQuote && location.pathname === threadRoute) {
|
||||
scrollToThreadCardTop(cid);
|
||||
if (isOpQuote) {
|
||||
if (location.pathname === threadRoute) {
|
||||
scrollToThreadCardTop(cid);
|
||||
} else {
|
||||
navigate(threadRoute);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (scrollToReplyOnPage(cid)) return;
|
||||
@@ -248,8 +252,12 @@ const MobileQuotePreview = ({ backlinkReply, quotelinkReply, isBacklinkReply, is
|
||||
if (cid && subplebbitAddress) {
|
||||
const boardPath = getBoardPath(subplebbitAddress, directories);
|
||||
const threadRoute = `/${boardPath}/thread/${cid}`;
|
||||
if (isOpQuote && location.pathname === threadRoute) {
|
||||
scrollToThreadCardTop(cid);
|
||||
if (isOpQuote) {
|
||||
if (location.pathname === threadRoute) {
|
||||
scrollToThreadCardTop(cid);
|
||||
} else {
|
||||
navigate(threadRoute);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (scrollToReplyOnPage(cid)) return;
|
||||
|
||||
Reference in New Issue
Block a user