Skip to content

Commit

Permalink
Live Update Deny
Browse files Browse the repository at this point in the history
Added request after denying the conversation to set state on the conversation item
Made wallet string selectable for easier developing
Fixed Android Button styling on home screen
  • Loading branch information
Alex Risch authored and Alex Risch committed Dec 6, 2023
1 parent 5ea4174 commit 15e2792
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions example/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NavigationContainer } from '@react-navigation/native'
import React from 'react'
import { Button } from 'react-native'
import { Button, Platform } from 'react-native'
import { QueryClient, QueryClientProvider } from 'react-query'

import ConversationCreateScreen from './src/ConversationCreateScreen'
Expand Down Expand Up @@ -53,7 +53,7 @@ export default function App() {
<Button
onPress={() => navigation.navigate('conversationCreate')}
title="New"
color="#fff"
color={Platform.OS === 'ios' ? '#fff' : 'rgb(49 0 110)'}
/>
),
})}
Expand Down
7 changes: 5 additions & 2 deletions example/src/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function HomeScreen() {
}}
>
<Text style={{ fontSize: 14 }}>Connected as</Text>
<Text style={{ fontSize: 14, fontWeight: 'bold' }}>
<Text selectable style={{ fontSize: 14, fontWeight: 'bold' }}>
{client?.address}
</Text>
</View>
Expand All @@ -70,7 +70,10 @@ function ConversationItem({
conversation.consentState().then((result) => {
setConsentState(result)
})
const denyContact = () => client?.contacts.deny([conversation.peerAddress])
const denyContact = () => {
client?.contacts.deny([conversation.peerAddress])
conversation.consentState().then(setConsentState)
}

return (
<Pressable
Expand Down

0 comments on commit 15e2792

Please sign in to comment.