Skip to content

Commit

Permalink
Merge pull request #5369 from Expensify/Rory-IncreaseModalTimeout
Browse files Browse the repository at this point in the history
Increase global create modal delay to 1500ms

(cherry picked from commit 112bad2)
  • Loading branch information
Jag96 authored and Jag96 committed Sep 20, 2021
1 parent e08202e commit 45a0951
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/pages/home/sidebar/SidebarScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,17 @@ class SidebarScreen extends Component {
Performance.markStart(CONST.TIMING.SIDEBAR_LOADED);
Timing.start(CONST.TIMING.SIDEBAR_LOADED, true);

if (this.props.isFirstTimeNewExpensifyUser) {
// For some reason, the menu doesn't open without the timeout
setTimeout(() => {
// NOTE: This setTimeout is required due to a bug in react-navigation where modals do not display properly in a drawerContent
// This is a short-term workaround, see this issue for updates on a long-term solution: https://github.com/Expensify/App/issues/5296
setTimeout(() => {
if (this.props.isFirstTimeNewExpensifyUser) {
this.toggleCreateMenu();

// Set the NVP back to false (this may need to be moved if this NVP is used for anything else later)
// Set the NVP back to false so we don't automatically open the menu again
// Note: this may need to be moved if this NVP is used for anything else later
NameValuePair.set(CONST.NVP.IS_FIRST_TIME_NEW_EXPENSIFY_USER, false, ONYXKEYS.NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER);
}, 200);
}
}
}, 1500);
}

/**
Expand Down

0 comments on commit 45a0951

Please sign in to comment.