Page MenuHomePhabricator

D6610.diff
No OneTemporary

D6610.diff

diff --git a/web/modals/history/history-entry.react.js b/web/modals/history/history-entry.react.js
--- a/web/modals/history/history-entry.react.js
+++ b/web/modals/history/history-entry.react.js
@@ -19,13 +19,14 @@
type CalendarQuery,
} from 'lib/types/entry-types';
import type { LoadingStatus } from 'lib/types/loading-types';
-import type { ThreadInfo } from 'lib/types/thread-types';
+import type { ResolvedThreadInfo } from 'lib/types/thread-types';
import type { UserInfo } from 'lib/types/user-types';
import {
type DispatchActionPromise,
useDispatchActionPromise,
useServerCall,
} from 'lib/utils/action-utils';
+import { useResolvedThreadInfo } from 'lib/utils/entity-helpers';
import LoadingIndicator from '../../loading-indicator.react';
import { useSelector } from '../../redux/redux-utils';
@@ -39,7 +40,7 @@
};
type Props = {
...BaseProps,
- +threadInfo: ThreadInfo,
+ +threadInfo: ResolvedThreadInfo,
+loggedIn: boolean,
+restoreLoadingStatus: LoadingStatus,
+calendarQuery: () => CalendarQuery,
@@ -149,9 +150,10 @@
function ConnectedHistoryEntry(props) {
const entryID = props.entryInfo.id;
invariant(entryID, 'entryInfo.id (serverID) should be set');
- const threadInfo = useSelector(
+ const unresolvedThreadInfo = useSelector(
state => threadInfoSelector(state)[props.entryInfo.threadID],
);
+ const threadInfo = useResolvedThreadInfo(unresolvedThreadInfo);
const loggedIn = useSelector(
state =>
!!(state.currentUserInfo && !state.currentUserInfo.anonymous && true),

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 10:03 PM (12 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2683506
Default Alt Text
D6610.diff (1 KB)

Event Timeline