Skip to content

Commit 51c2a67

Browse files
authored
fix: add inject headerRight into Screen Contacts (#1459)
Signed-off-by: ClaudeArs <[email protected]>
1 parent a56c6f6 commit 51c2a67

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Diff for: packages/legacy/core/App/screens/ListContacts.tsx

+8-4
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@ const ListContacts: React.FC<ListContactsProps> = ({ navigation }) => {
2626
const { t } = useTranslation()
2727
const { agent } = useAgent()
2828
const [connections, setConnections] = useState<ConnectionRecord[]>([])
29-
const {records: connectionRecords} = useConnections()
29+
const { records: connectionRecords } = useConnections()
3030
const [store] = useStore()
31-
const [{ contactHideList }, ContactListItem] = useServices([TOKENS.CONFIG, TOKENS.COMPONENT_CONTACT_LIST_ITEM])
31+
const [{ contactHideList }, ContactListItem, defaultScreenOptionsDict] = useServices([
32+
TOKENS.CONFIG,
33+
TOKENS.COMPONENT_CONTACT_LIST_ITEM,
34+
TOKENS.OBJECT_SCREEN_CONFIG,
35+
])
3236
const style = StyleSheet.create({
3337
list: {
3438
backgroundColor: ColorPallet.brand.secondaryBackground,
@@ -85,10 +89,10 @@ const ListContacts: React.FC<ListContactsProps> = ({ navigation }) => {
8589
})
8690
} else {
8791
navigation.setOptions({
88-
headerRight: () => false,
92+
headerRight: defaultScreenOptionsDict[Screens.Contacts]?.headerRight,
8993
})
9094
}
91-
}, [store.preferences.useConnectionInviterCapability, navigation, t, onPressAddContact])
95+
}, [store.preferences.useConnectionInviterCapability, navigation, t, onPressAddContact, defaultScreenOptionsDict])
9296

9397
return (
9498
<View>

0 commit comments

Comments
 (0)