From a4c09f3116a3e6b94ea58b67aae56b20317c3a89 Mon Sep 17 00:00:00 2001 From: GCyganek Date: Tue, 7 Oct 2025 16:01:27 +0200 Subject: [PATCH 1/2] Make ReportParticipantRoleSelectionPage use new SelectionList --- src/pages/ReportParticipantRoleSelectionPage.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/ReportParticipantRoleSelectionPage.tsx b/src/pages/ReportParticipantRoleSelectionPage.tsx index 156b896b8baa..13a62a8c20ff 100644 --- a/src/pages/ReportParticipantRoleSelectionPage.tsx +++ b/src/pages/ReportParticipantRoleSelectionPage.tsx @@ -3,9 +3,9 @@ import {View} from 'react-native'; import type {ValueOf} from 'type-fest'; import HeaderWithBackButton from '@components/HeaderWithBackButton'; import ScreenWrapper from '@components/ScreenWrapper'; -import SelectionList from '@components/SelectionListWithSections'; -import RadioListItem from '@components/SelectionListWithSections/RadioListItem'; -import type {ListItem} from '@components/SelectionListWithSections/types'; +import SelectionList from '@components/SelectionList'; +import RadioListItem from '@components/SelectionList/ListItem/RadioListItem'; +import type {ListItem} from '@components/SelectionList/ListItem/types'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import * as Report from '@libs/actions/Report'; @@ -65,11 +65,11 @@ function ReportParticipantRoleSelectionPage({report, route}: ReportParticipantRo /> item.isSelected)?.keyForList} + initiallyFocusedItemKey={items.find((item) => item.isSelected)?.keyForList} /> From 31128b6fdd264a6a3a5734f38e0311f11237855f Mon Sep 17 00:00:00 2001 From: GCyganek Date: Wed, 8 Oct 2025 11:19:31 +0200 Subject: [PATCH 2/2] Fix lint errors --- src/pages/ReportParticipantRoleSelectionPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/ReportParticipantRoleSelectionPage.tsx b/src/pages/ReportParticipantRoleSelectionPage.tsx index 13a62a8c20ff..12c2d6a85d47 100644 --- a/src/pages/ReportParticipantRoleSelectionPage.tsx +++ b/src/pages/ReportParticipantRoleSelectionPage.tsx @@ -8,7 +8,7 @@ import RadioListItem from '@components/SelectionList/ListItem/RadioListItem'; import type {ListItem} from '@components/SelectionList/ListItem/types'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; -import * as Report from '@libs/actions/Report'; +import {updateGroupChatMemberRoles} from '@libs/actions/Report'; import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types'; import Navigation from '@navigation/Navigation'; import type {ParticipantsNavigatorParamList} from '@navigation/types'; @@ -30,7 +30,7 @@ function ReportParticipantRoleSelectionPage({report, route}: ReportParticipantRo const styles = useThemeStyles(); const accountID = Number(route?.params?.accountID) ?? -1; - const backTo = ROUTES.REPORT_PARTICIPANTS_DETAILS.getRoute(report?.reportID ?? '-1', accountID, route.params.backTo); + const backTo = ROUTES.REPORT_PARTICIPANTS_DETAILS.getRoute(report.reportID, accountID, route.params.backTo); const member = report.participants?.[accountID]; if (!member) { @@ -53,7 +53,7 @@ function ReportParticipantRoleSelectionPage({report, route}: ReportParticipantRo ]; const changeRole = ({value}: ListItemType) => { - Report.updateGroupChatMemberRoles(report.reportID, [accountID], value); + updateGroupChatMemberRoles(report.reportID, [accountID], value); Navigation.goBack(backTo); };