Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3519642
D9025.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D9025.id.diff
View Options
diff --git a/keyserver/src/fetchers/thread-fetchers.js b/keyserver/src/fetchers/thread-fetchers.js
--- a/keyserver/src/fetchers/thread-fetchers.js
+++ b/keyserver/src/fetchers/thread-fetchers.js
@@ -13,7 +13,7 @@
import type { RawMessageInfo, MessageInfo } from 'lib/types/message-types.js';
import { threadTypes, type ThreadType } from 'lib/types/thread-types-enum.js';
import {
- type RawThreadInfo,
+ type RawThreadInfos,
type ServerThreadInfo,
} from 'lib/types/thread-types.js';
import { ServerError } from 'lib/utils/errors.js';
@@ -223,9 +223,6 @@
return { threadInfos };
}
-export type RawThreadInfos = {
- +[id: string]: RawThreadInfo,
-};
export type FetchThreadInfosResult = {
+threadInfos: RawThreadInfos,
};
diff --git a/keyserver/src/shared/state-sync/threads-state-sync-spec.js b/keyserver/src/shared/state-sync/threads-state-sync-spec.js
--- a/keyserver/src/shared/state-sync/threads-state-sync-spec.js
+++ b/keyserver/src/shared/state-sync/threads-state-sync-spec.js
@@ -2,12 +2,10 @@
import { threadsStateSyncSpec as libSpec } from 'lib/shared/state-sync/threads-state-sync-spec.js';
import type { CalendarQuery } from 'lib/types/entry-types.js';
+import type { RawThreadInfos } from 'lib/types/thread-types.js';
import type { ServerStateSyncSpec } from './state-sync-spec.js';
-import {
- fetchThreadInfos,
- type RawThreadInfos,
-} from '../../fetchers/thread-fetchers.js';
+import { fetchThreadInfos } from '../../fetchers/thread-fetchers.js';
import type { Viewer } from '../../session/viewer.js';
export const threadsStateSyncSpec: ServerStateSyncSpec<RawThreadInfos> =
diff --git a/lib/selectors/socket-selectors.js b/lib/selectors/socket-selectors.js
--- a/lib/selectors/socket-selectors.js
+++ b/lib/selectors/socket-selectors.js
@@ -16,7 +16,7 @@
import threadWatcher from '../shared/thread-watcher.js';
import type { SignedIdentityKeysBlob } from '../types/crypto-types.js';
import {
- type RawEntryInfo,
+ type RawEntryInfos,
rawEntryInfoValidator,
type CalendarQuery,
} from '../types/entry-types.js';
@@ -30,7 +30,7 @@
import type { SessionState } from '../types/session-types.js';
import type { OneTimeKeyGenerator } from '../types/socket-types.js';
import {
- type RawThreadInfo,
+ type RawThreadInfos,
rawThreadInfoValidator,
} from '../types/thread-types.js';
import {
@@ -69,8 +69,8 @@
(state: AppState) => state.currentUserInfo,
currentCalendarQuery,
(
- threadInfos: { +[id: string]: RawThreadInfo },
- entryInfos: { +[id: string]: RawEntryInfo },
+ threadInfos: RawThreadInfos,
+ entryInfos: RawEntryInfos,
userInfos: UserInfos,
currentUserInfo: ?CurrentUserInfo,
calendarQuery: (calendarActive: boolean) => CalendarQuery,
diff --git a/lib/types/thread-types.js b/lib/types/thread-types.js
--- a/lib/types/thread-types.js
+++ b/lib/types/thread-types.js
@@ -103,6 +103,9 @@
+repliesCount: number,
+pinnedCount?: number,
};
+export type RawThreadInfos = {
+ +[id: string]: RawThreadInfo,
+};
export const rawThreadInfoValidator: TInterface<RawThreadInfo> =
tShape<RawThreadInfo>({
id: tID,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Dec 23, 10:44 PM (18 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2696962
Default Alt Text
D9025.id.diff (3 KB)
Attached To
Mode
D9025: [lib] Make selector types more consistent
Attached
Detach File
Event Timeline
Log In to Comment