-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41898 from callstack-internal/hur/fix-memory-cons…
…umption-on-web-and-desktop perf: fix significant memory consumption on web and desktop
- Loading branch information
Showing
4 changed files
with
39 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/libs/Navigation/shouldSetScreenBlurred/index.native.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* @param navigationIndex | ||
* | ||
* Decides whether to set screen to blurred state. | ||
* | ||
* If the screen is more than 1 screen away from the current screen, freeze it, | ||
* we don't want to freeze the screen if it's the previous screen because the freeze placeholder | ||
* would be visible at the beginning of the back animation then | ||
*/ | ||
const shouldSetScreenBlurred = (navigationIndex: number) => navigationIndex > 1; | ||
|
||
export default shouldSetScreenBlurred; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* @param navigationIndex | ||
* | ||
* Decides whether to set screen to blurred state. | ||
* | ||
* Allow freezing the first screen and more in the stack only on | ||
* web and desktop platforms. The reason is that in the case of | ||
* LHN, we have FlashList rendering in the back while we are on | ||
* Settings screen. | ||
*/ | ||
const shouldSetScreenBlurred = (navigationIndex: number) => navigationIndex >= 1; | ||
|
||
export default shouldSetScreenBlurred; |