MCPcopy Create free account
hub / github.com/CommE2E/comm / assertAllThreadInfosAreLegacy

Function assertAllThreadInfosAreLegacy

lib/shared/thread-utils.js:1751–1763  ·  view source on GitHub ↗
(rawThreadInfos: MixedRawThreadInfos)

Source from the content-addressed store, hash-verified

1749}
1750
1751function assertAllThreadInfosAreLegacy(rawThreadInfos: MixedRawThreadInfos): {
1752 [id: string]: LegacyRawThreadInfo,
1753} {
1754 return Object.fromEntries(
1755 Object.entries(rawThreadInfos).map(([id, rawThreadInfo]) => {
1756 invariant(
1757 !rawThreadInfo.minimallyEncoded,
1758 `rawThreadInfos shouldn't be minimallyEncoded`,
1759 );
1760 return [id, rawThreadInfo];
1761 }),
1762 );
1763}
1764
1765function useOnScreenEntryEditableThreadInfos(): $ReadOnlyArray<ThreadInfo> {
1766 const visibleThreadInfos = useSelector(onScreenThreadInfos);

Callers 2

persist.jsFile · 0.90

Calls 1

entriesMethod · 0.65

Tested by

no test coverage detected