mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
remove feed filter for edits
This commit is contained in:
@@ -332,13 +332,6 @@ const All = () => {
|
|||||||
return selectedFeed.flatMap(thread => filteredRepliesByThread[thread.cid]?.displayedReplies || []);
|
return selectedFeed.flatMap(thread => filteredRepliesByThread[thread.cid]?.displayedReplies || []);
|
||||||
}, [selectedFeed, filteredRepliesByThread]);
|
}, [selectedFeed, filteredRepliesByThread]);
|
||||||
|
|
||||||
const filteredFeed = useMemo(() => {
|
|
||||||
return selectedFeed.filter(thread => {
|
|
||||||
const editedThread = editedComments[thread.cid];
|
|
||||||
return !(editedThread && editedThread.removed);
|
|
||||||
});
|
|
||||||
}, [selectedFeed, editedComments]);
|
|
||||||
|
|
||||||
// let post.jsx access full cid of user-typed short cid
|
// let post.jsx access full cid of user-typed short cid
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const newCidTracker = {};
|
const newCidTracker = {};
|
||||||
@@ -721,10 +714,15 @@ const All = () => {
|
|||||||
{feed ? (
|
{feed ? (
|
||||||
<Virtuoso
|
<Virtuoso
|
||||||
increaseViewportBy={{bottom: 600, top: 600}}
|
increaseViewportBy={{bottom: 600, top: 600}}
|
||||||
data={filteredFeed}
|
data={selectedFeed}
|
||||||
itemContent={(index, thread) => {
|
itemContent={(index, thread) => {
|
||||||
if (editedComments[thread.cid]) {
|
if (editedComments[thread.cid]) {
|
||||||
thread = editedComments[thread.cid];
|
thread = editedComments[thread.cid];
|
||||||
|
if (thread.removed) {
|
||||||
|
thread.content = "[removed]";
|
||||||
|
thread.link = undefined;
|
||||||
|
thread.title = "[removed]";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const { displayedReplies, omittedCount } = filteredRepliesByThread[thread.cid] || {};
|
const { displayedReplies, omittedCount } = filteredRepliesByThread[thread.cid] || {};
|
||||||
const commentMediaInfo = getCommentMediaInfo(thread);
|
const commentMediaInfo = getCommentMediaInfo(thread);
|
||||||
|
|||||||
@@ -340,13 +340,6 @@ const Board = () => {
|
|||||||
return selectedFeed.flatMap(thread => filteredRepliesByThread[thread.cid]?.displayedReplies || []);
|
return selectedFeed.flatMap(thread => filteredRepliesByThread[thread.cid]?.displayedReplies || []);
|
||||||
}, [selectedFeed, filteredRepliesByThread]);
|
}, [selectedFeed, filteredRepliesByThread]);
|
||||||
|
|
||||||
const filteredFeed = useMemo(() => {
|
|
||||||
return selectedFeed.filter(thread => {
|
|
||||||
const editedThread = editedComments[thread.cid];
|
|
||||||
return !(editedThread && editedThread.removed);
|
|
||||||
});
|
|
||||||
}, [selectedFeed, editedComments]);
|
|
||||||
|
|
||||||
// let post.jsx access full cid of user-typed short cid
|
// let post.jsx access full cid of user-typed short cid
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const newCidTracker = {};
|
const newCidTracker = {};
|
||||||
@@ -1636,10 +1629,15 @@ const Board = () => {
|
|||||||
: null}
|
: null}
|
||||||
<Virtuoso
|
<Virtuoso
|
||||||
increaseViewportBy={{bottom: 600, top: 600}}
|
increaseViewportBy={{bottom: 600, top: 600}}
|
||||||
data={filteredFeed}
|
data={selectedFeed}
|
||||||
itemContent={(index, thread) => {
|
itemContent={(index, thread) => {
|
||||||
if (editedComments[thread.cid]) {
|
if (editedComments[thread.cid]) {
|
||||||
thread = editedComments[thread.cid];
|
thread = editedComments[thread.cid];
|
||||||
|
if (thread.removed) {
|
||||||
|
thread.content = "[removed]";
|
||||||
|
thread.link = undefined;
|
||||||
|
thread.title = "[removed]";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const { displayedReplies, omittedCount } = filteredRepliesByThread[thread.cid] || {};
|
const { displayedReplies, omittedCount } = filteredRepliesByThread[thread.cid] || {};
|
||||||
const commentMediaInfo = getCommentMediaInfo(thread);
|
const commentMediaInfo = getCommentMediaInfo(thread);
|
||||||
|
|||||||
@@ -333,13 +333,6 @@ const Subscriptions = () => {
|
|||||||
return selectedFeed.flatMap(thread => filteredRepliesByThread[thread.cid]?.displayedReplies || []);
|
return selectedFeed.flatMap(thread => filteredRepliesByThread[thread.cid]?.displayedReplies || []);
|
||||||
}, [selectedFeed, filteredRepliesByThread]);
|
}, [selectedFeed, filteredRepliesByThread]);
|
||||||
|
|
||||||
const filteredFeed = useMemo(() => {
|
|
||||||
return selectedFeed.filter(thread => {
|
|
||||||
const editedThread = editedComments[thread.cid];
|
|
||||||
return !(editedThread && editedThread.removed);
|
|
||||||
});
|
|
||||||
}, [selectedFeed, editedComments]);
|
|
||||||
|
|
||||||
// let post.jsx access full cid of user-typed short cid
|
// let post.jsx access full cid of user-typed short cid
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const newCidTracker = {};
|
const newCidTracker = {};
|
||||||
@@ -729,10 +722,15 @@ const Subscriptions = () => {
|
|||||||
) : (
|
) : (
|
||||||
<Virtuoso
|
<Virtuoso
|
||||||
increaseViewportBy={{bottom: 600, top: 600}}
|
increaseViewportBy={{bottom: 600, top: 600}}
|
||||||
data={filteredFeed}
|
data={selectedFeed}
|
||||||
itemContent={(index, thread) => {
|
itemContent={(index, thread) => {
|
||||||
if (editedComments[thread.cid]) {
|
if (editedComments[thread.cid]) {
|
||||||
thread = editedComments[thread.cid];
|
thread = editedComments[thread.cid];
|
||||||
|
if (thread.removed) {
|
||||||
|
thread.content = "[removed]";
|
||||||
|
thread.link = undefined;
|
||||||
|
thread.title = "[removed]";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const { displayedReplies, omittedCount } = filteredRepliesByThread[thread.cid] || {};
|
const { displayedReplies, omittedCount } = filteredRepliesByThread[thread.cid] || {};
|
||||||
const commentMediaInfo = getCommentMediaInfo(thread);
|
const commentMediaInfo = getCommentMediaInfo(thread);
|
||||||
|
|||||||
Reference in New Issue
Block a user