Changeset View
Changeset View
Standalone View
Standalone View
lib/selectors/thread-selectors.js
Show All 33 Lines | import { | ||||
roleIsAdminRole, | roleIsAdminRole, | ||||
threadIsPending, | threadIsPending, | ||||
getPendingThreadID, | getPendingThreadID, | ||||
} from '../shared/thread-utils.js'; | } from '../shared/thread-utils.js'; | ||||
import type { ClientEmojiAvatar } from '../types/avatar-types'; | import type { ClientEmojiAvatar } from '../types/avatar-types'; | ||||
import type { EntryInfo } from '../types/entry-types.js'; | import type { EntryInfo } from '../types/entry-types.js'; | ||||
import type { MessageStore, RawMessageInfo } from '../types/message-types.js'; | import type { MessageStore, RawMessageInfo } from '../types/message-types.js'; | ||||
import type { BaseAppState } from '../types/redux-types.js'; | import type { BaseAppState } from '../types/redux-types.js'; | ||||
import { threadPermissions } from '../types/thread-permission-types.js'; | |||||
import { | |||||
threadTypes, | |||||
threadTypeIsCommunityRoot, | |||||
} from '../types/thread-types-enum.js'; | |||||
import { | import { | ||||
type ThreadInfo, | type ThreadInfo, | ||||
type RawThreadInfo, | type RawThreadInfo, | ||||
type RelativeMemberInfo, | type RelativeMemberInfo, | ||||
threadPermissions, | |||||
threadTypes, | |||||
type SidebarInfo, | type SidebarInfo, | ||||
threadTypeIsCommunityRoot, | |||||
} from '../types/thread-types.js'; | } from '../types/thread-types.js'; | ||||
import { dateString, dateFromString } from '../utils/date-utils.js'; | import { dateString, dateFromString } from '../utils/date-utils.js'; | ||||
import { values } from '../utils/objects.js'; | import { values } from '../utils/objects.js'; | ||||
const _mapValuesWithKeys = _mapValues.convert({ cap: false }); | const _mapValuesWithKeys = _mapValues.convert({ cap: false }); | ||||
type ThreadInfoSelectorType = (state: BaseAppState<*>) => { | type ThreadInfoSelectorType = (state: BaseAppState<*>) => { | ||||
+[id: string]: ThreadInfo, | +[id: string]: ThreadInfo, | ||||
▲ Show 20 Lines • Show All 406 Lines • Show Last 20 Lines |