Skip to content
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

Fix whats new modal #1983

Merged
merged 4 commits into from
Nov 11, 2020
Merged

Fix whats new modal #1983

merged 4 commits into from
Nov 11, 2020

Conversation

andrepimenta
Copy link
Member

Description

This PR fixes whats new modal
Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

Issue

Resolves #???

@andrepimenta andrepimenta requested a review from a team as a code owner November 11, 2020 17:03
@@ -407,7 +408,7 @@ class DrawerView extends PureComponent {
componentDidUpdate() {
const route = this.findRouteNameFromNavigatorState(this.props.navigation.state);
if (!this.props.passwordSet || !this.props.seedphraseBackedUp) {
if (['SetPasswordFlow', 'Webview'].includes(route)) {
if (['SetPasswordFlow', 'Webview', 'ChoosePassword'].includes(route)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you move away from ChoosePassword view, isn't the modal appearing again?

@@ -1045,6 +1055,11 @@ class DrawerView extends PureComponent {
showReceiveModal={this.showReceiveModal}
/>
</Modal>
<WhatsNewModal
navigation={this.props.navigation}
enabled={this.state.showProtectWalletModal === false}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this on purpose? enabled if false
also why not !this.state.showProtectWalletModal?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was more or less a little hack that I had to do in order for the modals not to overlap one another, for some reason it was happening, I think it's because the native side was being faster then the render I am not sure.

So for this to work this.state.showProtectWalletModal starts with undefined. Then we update it either to true or false. Only when it's false it shows the whats new modal.

@estebanmino estebanmino merged commit 2b92d59 into develop Nov 11, 2020
@estebanmino estebanmino deleted the fix/whats-new-modal-update branch November 11, 2020 23:03
Copy link
Contributor

@ibrahimtaveras00 ibrahimtaveras00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA Passed 👍

rickycodes pushed a commit that referenced this pull request Jan 31, 2022
* Working

* update tests

* Fix show whats new modal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants