Remove duplicate documentation

It was getting annoying to update 2 files for the same thing.
This commit is contained in:
infinite-persistence 2022-04-28 14:10:35 +08:00 committed by Thomas Zarebczan
parent 794050c827
commit d9b1cf6d54
2 changed files with 14 additions and 13 deletions

View file

@ -42,7 +42,7 @@ declare type PerChannelSettings = {
// todo: relate individual comments to their commentId // todo: relate individual comments to their commentId
declare type CommentsState = { declare type CommentsState = {
commentsByUri: { [string]: string }, commentsByUri: { [string]: string }, // URI -> claimId (TODO: remove)
superChatsByUri: { [string]: { totalAmount: number, comments: Array<Comment> } }, superChatsByUri: { [string]: { totalAmount: number, comments: Array<Comment> } },
byId: { [string]: Array<string> }, // ClaimID -> list of fetched comment IDs. byId: { [string]: Array<string> }, // ClaimID -> list of fetched comment IDs.
totalCommentsById: {}, // ClaimId -> ultimate total (including replies) in commentron. totalCommentsById: {}, // ClaimId -> ultimate total (including replies) in commentron.
@ -51,7 +51,7 @@ declare type CommentsState = {
topLevelCommentsById: { [string]: Array<string> }, // ClaimID -> list of fetched top level comments. topLevelCommentsById: { [string]: Array<string> }, // ClaimID -> list of fetched top level comments.
topLevelTotalPagesById: { [string]: number }, // ClaimID -> total number of top-level pages in commentron. Based on COMMENT_PAGE_SIZE_TOP_LEVEL. topLevelTotalPagesById: { [string]: number }, // ClaimID -> total number of top-level pages in commentron. Based on COMMENT_PAGE_SIZE_TOP_LEVEL.
topLevelTotalCommentsById: { [string]: number }, // ClaimID -> total top level comments in commentron. topLevelTotalCommentsById: { [string]: number }, // ClaimID -> total top level comments in commentron.
commentById: { [string]: Comment }, commentById: { [string]: Comment }, // commentId -> Comment
linkedCommentAncestors: { [string]: Array<string> }, // {"linkedCommentId": ["parentId", "grandParentId", ...]} linkedCommentAncestors: { [string]: Array<string> }, // {"linkedCommentId": ["parentId", "grandParentId", ...]}
pinnedCommentsById: {}, // ClaimId -> array of pinned comment IDs pinnedCommentsById: {}, // ClaimId -> array of pinned comment IDs
isLoading: boolean, isLoading: boolean,

View file

@ -4,22 +4,23 @@ import { handleActions } from 'util/redux-utils';
import { BLOCK_LEVEL } from 'constants/comment'; import { BLOCK_LEVEL } from 'constants/comment';
import { isURIEqual } from 'util/lbryURI'; import { isURIEqual } from 'util/lbryURI';
// See 'CommentsState' for documentation.
const defaultState: CommentsState = { const defaultState: CommentsState = {
commentById: {}, // commentId -> Comment commentById: {},
byId: {}, // ClaimID -> list of fetched comment IDs. byId: {},
totalCommentsById: {}, // ClaimId -> ultimate total (including replies) in commentron. totalCommentsById: {},
repliesByParentId: {}, // ParentCommentID -> list of fetched replies. repliesByParentId: {},
repliesTotalPagesByParentId: {}, // ParentCommentID -> total number of reply pages for a parentId in commentron. repliesTotalPagesByParentId: {},
topLevelCommentsById: {}, // ClaimID -> list of fetched top level comments. topLevelCommentsById: {},
topLevelTotalPagesById: {}, // ClaimID -> total number of top-level pages in commentron. Based on COMMENT_PAGE_SIZE_TOP_LEVEL. topLevelTotalPagesById: {},
topLevelTotalCommentsById: {}, // ClaimID -> total top level comments in commentron. topLevelTotalCommentsById: {},
// TODO: // TODO:
// Remove commentsByUri // Remove commentsByUri
// It is not needed and doesn't provide anything but confusion // It is not needed and doesn't provide anything but confusion
commentsByUri: {}, // URI -> claimId commentsByUri: {}, // URI -> claimId
linkedCommentAncestors: {}, // {"linkedCommentId": ["parentId", "grandParentId", ...]} linkedCommentAncestors: {},
superChatsByUri: {}, superChatsByUri: {},
pinnedCommentsById: {}, // ClaimId -> array of pinned comment IDs pinnedCommentsById: {},
isLoading: false, isLoading: false,
isLoadingById: false, isLoadingById: false,
isLoadingByParentId: {}, isLoadingByParentId: {},
@ -45,7 +46,7 @@ const defaultState: CommentsState = {
adminTimeoutMap: {}, adminTimeoutMap: {},
moderatorTimeoutMap: {}, moderatorTimeoutMap: {},
togglingForDelegatorMap: {}, togglingForDelegatorMap: {},
settingsByChannelId: {}, // ChannelId -> PerChannelSettings settingsByChannelId: {},
fetchingSettings: false, fetchingSettings: false,
fetchingBlockedWords: false, fetchingBlockedWords: false,
}; };