Page MenuHomePhabricator

D8058.id27371.diff
No OneTemporary

D8058.id27371.diff

diff --git a/native/community-creation/community-configuration.react.js b/native/community-creation/community-configuration.react.js
--- a/native/community-creation/community-configuration.react.js
+++ b/native/community-creation/community-configuration.react.js
@@ -94,8 +94,16 @@
dispatchActionPromise(newThreadActionTypes, newThreadResultPromise);
await newThreadResultPromise;
- navigate(CommunityCreationMembersRouteName);
- }, [callCreateNewCommunity, dispatchActionPromise, navigate]);
+ navigate<'CommunityCreationMembers'>({
+ name: CommunityCreationMembersRouteName,
+ params: { announcement: announcementSetting },
+ });
+ }, [
+ announcementSetting,
+ callCreateNewCommunity,
+ dispatchActionPromise,
+ navigate,
+ ]);
const onCheckBoxPress = React.useCallback(() => {
setErrorMessage();
diff --git a/native/community-creation/community-creation-members.react.js b/native/community-creation/community-creation-members.react.js
--- a/native/community-creation/community-creation-members.react.js
+++ b/native/community-creation/community-creation-members.react.js
@@ -19,6 +19,10 @@
import type { NavigationRoute } from '../navigation/route-names.js';
import { useSelector } from '../redux/redux-utils.js';
+export type CommunityCreationMembersScreenParams = {
+ +announcement: boolean,
+};
+
const TagInput = createTagInput<AccountUserInfo>();
const tagInputProps = {
placeholder: 'username',
@@ -32,8 +36,9 @@
+route: NavigationRoute<'CommunityCreationMembers'>,
};
-// eslint-disable-next-line no-unused-vars
function CommunityCreationMembers(props: Props): React.Node {
+ const { announcement } = props.route.params;
+
const otherUserInfos = useSelector(userInfoSelectorForPotentialMembers);
const userSearchIndex = useSelector(userSearchIndexForPotentialMembers);
@@ -56,9 +61,17 @@
selectedUserIDs,
null,
null,
- threadTypes.COMMUNITY_ROOT,
+ announcement
+ ? threadTypes.COMMUNITY_ANNOUNCEMENT_ROOT
+ : threadTypes.COMMUNITY_ROOT,
),
- [otherUserInfos, selectedUserIDs, userSearchIndex, usernameInputText],
+ [
+ announcement,
+ otherUserInfos,
+ selectedUserIDs,
+ userSearchIndex,
+ usernameInputText,
+ ],
);
const onSelectUser = React.useCallback(
diff --git a/native/navigation/route-names.js b/native/navigation/route-names.js
--- a/native/navigation/route-names.js
+++ b/native/navigation/route-names.js
@@ -31,6 +31,7 @@
import type { SubchannelListModalParams } from '../chat/subchannels-list-modal.react.js';
import type { TextMessageTooltipModalParams } from '../chat/text-message-tooltip-modal.react.js';
import type { TogglePinModalParams } from '../chat/toggle-pin-modal.react.js';
+import type { CommunityCreationMembersScreenParams } from '../community-creation/community-creation-members.react.js';
import type { ManagePublicLinkScreenParams } from '../invite-links/manage-public-link-screen.react.js';
import type { ViewInviteLinksScreenParams } from '../invite-links/view-invite-links-screen.react.js';
import type { ChatCameraModalParams } from '../media/chat-camera-modal.react.js';
@@ -220,7 +221,7 @@
export type CommunityCreationParamList = {
+CommunityConfiguration: void,
- +CommunityCreationMembers: void,
+ +CommunityCreationMembers: CommunityCreationMembersScreenParams,
};
export type ScreenParamList = {

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 2:45 AM (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2679890
Default Alt Text
D8058.id27371.diff (3 KB)

Event Timeline