Merge pull request #228 from plebbit/master

Development
This commit is contained in:
plebeius.eth
2023-09-09 21:26:31 +02:00
committed by GitHub
6 changed files with 20 additions and 29 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
"@capacitor/android": "3.6.0",
"@capacitor/app": "1.1.1",
"@capacitor/core": "3.6.0",
"@plebbit/plebbit-react-hooks": "https://github.com/plebbit/plebbit-react-hooks.git#55b6e1dc3f11f19fb0b71f5770909d7904cb29c0",
"@plebbit/plebbit-react-hooks": "https://github.com/plebbit/plebbit-react-hooks.git#5aef9d028f25fbe3db6fe748df0841f970e39f63",
"@testing-library/dom": "9.0.1",
"@testing-library/jest-dom": "5.14.1",
"@testing-library/react": "14.0.0",
+4 -6
View File
@@ -259,14 +259,12 @@ const All = () => {
const allParentCids = useMemo(() => {
const allRepliesCids = Object.values(flattenedRepliesByThread).flatMap(replies => replies.map(reply => reply.cid));
const allThreadCids = selectedFeed.map(thread => thread.cid);
return [...allThreadCids, ...allRepliesCids];
return new Set([...allThreadCids, ...allRepliesCids]);
}, [flattenedRepliesByThread, selectedFeed]);
const filter = useMemo(() => ({
parentCids: allParentCids
}), [allParentCids]);
const filter = useCallback((accountComment) => allParentCids.has(accountComment.parentCid), [allParentCids]);
const { accountComments } = useAccountComments({ filter });
+4 -6
View File
@@ -268,14 +268,12 @@ const Board = () => {
const allParentCids = useMemo(() => {
const allRepliesCids = Object.values(flattenedRepliesByThread).flatMap(replies => replies.map(reply => reply.cid));
const allThreadCids = selectedFeed.map(thread => thread.cid);
return [...allThreadCids, ...allRepliesCids];
return new Set([...allThreadCids, ...allRepliesCids]);
}, [flattenedRepliesByThread, selectedFeed]);
const filter = useMemo(() => ({
parentCids: allParentCids
}), [allParentCids]);
const filter = useCallback((accountComment) => allParentCids.has(accountComment.parentCid), [allParentCids]);
const { accountComments } = useAccountComments({ filter });
+4 -6
View File
@@ -260,14 +260,12 @@ const Subscriptions = () => {
const allParentCids = useMemo(() => {
const allRepliesCids = Object.values(flattenedRepliesByThread).flatMap(replies => replies.map(reply => reply.cid));
const allThreadCids = selectedFeed.map(thread => thread.cid);
return [...allThreadCids, ...allRepliesCids];
return new Set([...allThreadCids, ...allRepliesCids]);
}, [flattenedRepliesByThread, selectedFeed]);
const filter = useMemo(() => ({
parentCids: allParentCids
}), [allParentCids]);
const filter = useCallback((accountComment) => allParentCids.has(accountComment.parentCid), [allParentCids]);
const { accountComments } = useAccountComments({ filter });
+2 -5
View File
@@ -250,11 +250,8 @@ const Thread = () => {
);
const filter = useMemo(() => ({
parentCids: [
selectedThread || 'n/a', ...flattenedReplies.map(reply => reply.cid)
]
}), [flattenedReplies, selectedThread]);
const threadAndRepliesCids = useMemo(() => new Set([(selectedThread || 'n/a'), ...flattenedReplies.map(reply => reply.cid)]), [selectedThread, flattenedReplies]);
const filter = useCallback((accountComment) => threadAndRepliesCids.has(accountComment.parentCid), [threadAndRepliesCids]);
const { accountComments } = useAccountComments({filter});
+5 -5
View File
@@ -2662,9 +2662,9 @@
mkdirp "^1.0.4"
rimraf "^3.0.2"
"@plebbit/plebbit-js@https://github.com/plebbit/plebbit-js.git#d45a63f7a23e44cd940419124ccb53754db2f14b":
"@plebbit/plebbit-js@https://github.com/plebbit/plebbit-js.git#a68905109591f81c996514dd548af5cb25c4b9d2":
version "0.0.3"
resolved "https://github.com/plebbit/plebbit-js.git#d45a63f7a23e44cd940419124ccb53754db2f14b"
resolved "https://github.com/plebbit/plebbit-js.git#a68905109591f81c996514dd548af5cb25c4b9d2"
dependencies:
"@ensdomains/eth-ens-namehash" "2.0.15"
"@keyv/sqlite" "3.6.2"
@@ -2723,11 +2723,11 @@
dependencies:
debug "4.3.3"
"@plebbit/plebbit-react-hooks@https://github.com/plebbit/plebbit-react-hooks.git#55b6e1dc3f11f19fb0b71f5770909d7904cb29c0":
"@plebbit/plebbit-react-hooks@https://github.com/plebbit/plebbit-react-hooks.git#5aef9d028f25fbe3db6fe748df0841f970e39f63":
version "0.0.1"
resolved "https://github.com/plebbit/plebbit-react-hooks.git#55b6e1dc3f11f19fb0b71f5770909d7904cb29c0"
resolved "https://github.com/plebbit/plebbit-react-hooks.git#5aef9d028f25fbe3db6fe748df0841f970e39f63"
dependencies:
"@plebbit/plebbit-js" "https://github.com/plebbit/plebbit-js.git#d45a63f7a23e44cd940419124ccb53754db2f14b"
"@plebbit/plebbit-js" "https://github.com/plebbit/plebbit-js.git#a68905109591f81c996514dd548af5cb25c4b9d2"
"@plebbit/plebbit-logger" "https://github.com/plebbit/plebbit-logger.git"
assert "2.0.0"
ethers "5.6.9"