Changeset View
Changeset View
Standalone View
Standalone View
lib/shared/reaction-utils.js
// @flow | // @flow | ||||
import _sortBy from 'lodash/fp/sortBy.js'; | import _sortBy from 'lodash/fp/sortBy.js'; | ||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import { relationshipBlockedInEitherDirection } from './relationship-utils.js'; | import { relationshipBlockedInEitherDirection } from './relationship-utils.js'; | ||||
import { threadHasPermission } from './thread-utils.js'; | import { threadHasPermission } from './thread-utils.js'; | ||||
import { stringForUserExplicit } from './user-utils.js'; | import { stringForUserExplicit } from './user-utils.js'; | ||||
import { useENSNames } from '../hooks/ens-cache.js'; | import { useENSNames } from '../hooks/ens-cache.js'; | ||||
import type { ReactionInfo } from '../selectors/chat-selectors.js'; | import type { ReactionInfo } from '../selectors/chat-selectors.js'; | ||||
import type { | import type { | ||||
RobotextMessageInfo, | RobotextMessageInfo, | ||||
ComposableMessageInfo, | ComposableMessageInfo, | ||||
} from '../types/message-types.js'; | } from '../types/message-types.js'; | ||||
import { threadPermissions, type ThreadInfo } from '../types/thread-types.js'; | import { threadPermissions } from '../types/thread-permission-types.js'; | ||||
import { type ThreadInfo } from '../types/thread-types.js'; | |||||
import { useSelector } from '../utils/redux-utils.js'; | import { useSelector } from '../utils/redux-utils.js'; | ||||
function stringForReactionList(reactions: ReactionInfo): string { | function stringForReactionList(reactions: ReactionInfo): string { | ||||
const reactionText = []; | const reactionText = []; | ||||
for (const reaction in reactions) { | for (const reaction in reactions) { | ||||
const reactionInfo = reactions[reaction]; | const reactionInfo = reactions[reaction]; | ||||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |