diff --git a/src/message/messageActionSheet.js b/src/message/messageActionSheet.js index 3d571248faf..7fd9f8ff679 100644 --- a/src/message/messageActionSheet.js +++ b/src/message/messageActionSheet.js @@ -52,12 +52,6 @@ const reply = ({ message, dispatch, ownEmail }) => { reply.title = 'Reply'; reply.errorMessage = 'Failed to reply'; -const narrowToTopic = ({ message, dispatch, ownEmail }) => { - dispatch(doNarrow(getNarrowFromMessage(message, ownEmail), message.id)); -}; -narrowToTopic.title = 'Narrow to topic'; -narrowToTopic.errorMessage = 'Failed to narrow to topic'; - const copyToClipboard = async ({ _, auth, message }) => { const rawMessage = isAnOutboxMessage(message) /* $FlowFixMe: then really type Outbox */ ? message.markdownContent @@ -154,7 +148,6 @@ const allButtonsRaw = { // For messages addReaction, reply, - narrowToTopic, copyToClipboard, shareMessage, editMessage, @@ -185,7 +178,6 @@ type ConstructSheetParams = {| backgroundData: BackgroundData, message: Message | Outbox, narrow: Narrow, - isAnnouncementOnly: boolean, |}; export const constructHeaderActionButtons = ({ @@ -214,10 +206,9 @@ const messageNotDeleted = (message: Message | Outbox): boolean => message.content !== '
(deleted)
'; export const constructMessageActionButtons = ({ - backgroundData: { ownEmail, flags, isAdmin }, + backgroundData: { ownEmail, flags }, message, narrow, - isAnnouncementOnly, }: ConstructSheetParams): ButtonCode[] => { const buttons = []; if (message.reactions.length > 0) { @@ -227,11 +218,7 @@ export const constructMessageActionButtons = ({ buttons.push('addReaction'); } if (!isAnOutboxMessage(message) && !isTopicNarrow(narrow) && !isPrivateOrGroupNarrow(narrow)) { - if (isAnnouncementOnly && !isAdmin) { - buttons.push('narrowToTopic'); - } else { - buttons.push('reply'); - } + buttons.push('reply'); } if (messageNotDeleted(message)) { buttons.push('copyToClipboard'); diff --git a/src/webview/MessageList.js b/src/webview/MessageList.js index 0b9e8088769..4852ad306ca 100644 --- a/src/webview/MessageList.js +++ b/src/webview/MessageList.js @@ -54,7 +54,6 @@ import { getUpdateEvents } from './webViewHandleUpdates'; import { handleMessageListEvent } from './webViewEventHandlers'; import { base64Utf8Encode } from '../utils/encoding'; import * as logging from '../utils/logging'; -import { getIsActiveStreamAnnouncementOnly } from '../subscriptions/subscriptionSelectors'; // ESLint doesn't notice how `this.props` escapes, and complains about some // props not being used here. @@ -74,7 +73,6 @@ export type BackgroundData = $ReadOnly<{ mute: MuteState, ownEmail: string, ownUserId: number, - isAdmin: boolean, allImageEmojiById: $ReadOnly<{ [id: string]: ImageEmojiType }>, twentyFourHourTime: boolean, subscriptions: Subscription[], @@ -89,7 +87,6 @@ type SelectorProps = {| showMessagePlaceholders: boolean, theme: ThemeName, typingUsers: $ReadOnlyArray