-
-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link Channel to the stored contacts #2299
Link Channel to the stored contacts #2299
Conversation
Can you please add a description of the change and some screenshots or video illustrating the change? |
added a description and a demo picture |
views/Channels/Channel.tsx
Outdated
@@ -295,6 +364,17 @@ export default class ChannelView extends React.Component< | |||
</Text> | |||
</TouchableOpacity> | |||
)} | |||
<Text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the display component here but i don't think we need the label. Let's remove Matching Contact Found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
locales/en.json
Outdated
@@ -432,6 +432,7 @@ | |||
"views.Channel.Total.offline": "Total offline", | |||
"views.Channel.zeroConf": "Zero conf", | |||
"views.Channel.commitmentType": "Commitment Type", | |||
"views.Channel.matchingContactFound": "Matching Contact Found", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're no longer using this locale now
02b441f
to
6997503
Compare
Initial tests look good. We're gonna have to refactor this with the |
views/Channels/Channel.tsx
Outdated
this.loadContacts(); | ||
} | ||
|
||
loadContacts = async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase and refactor to use the newly added ContactStore
…link-channel-pubkey-to-contact
views/Channels/Channel.tsx
Outdated
componentDidMount() { | ||
const { ContactStore } = this.props; | ||
const { loadContacts } = ContactStore; | ||
loadContacts(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have to load contacts again on page load? Aren't they accessible in the store already?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeahh. you're right. lemme change that
5b7977c
to
e82d2c0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK
This PR addresses #2082
It adds functionality to link the
remotePubkey
in the Channel view to a contact from our stored contacts.It retrieves contacts from the encrypted storage, matches the
remotePubkey
with contact pubkey, and displays the contact name next to remotePubkey if a match is found.Check out the demo picture below addressing the change