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/status bar color on mweb #34409

Merged
merged 31 commits into from
Feb 26, 2024
Merged
Changes from 4 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c144200
fixes the issue
ishpaul777 Jan 11, 2024
d7ad870
fixed blinking of the status bar
ishpaul777 Jan 11, 2024
52d3128
fixes the issue
ishpaul777 Jan 12, 2024
9d4e5b0
prettier diffs
ishpaul777 Jan 12, 2024
731f70d
Merge branch 'Expensify:main' into fix/status-bar-color-on-mweb
ishpaul777 Jan 12, 2024
97755dd
fixes the issue v2
ishpaul777 Jan 14, 2024
073a480
fixes android dark mode issue
ishpaul777 Jan 18, 2024
5f11157
prettier fix
ishpaul777 Jan 18, 2024
d19a95d
fix prettier diffs
ishpaul777 Jan 18, 2024
d9d6cc8
clean up
ishpaul777 Jan 18, 2024
0d15185
fixes color naming
ishpaul777 Jan 23, 2024
80deeaf
Merge branch 'Expensify:main' into fix/status-bar-color-on-mweb
ishpaul777 Jan 23, 2024
2f9f73b
added comments for the changes
ishpaul777 Jan 23, 2024
76ce335
added comment for when status bar context is required
ishpaul777 Jan 23, 2024
87d6656
Merge branch 'Expensify:main' into fix/status-bar-color-on-mweb
ishpaul777 Jan 25, 2024
233fba9
added requested changes
ishpaul777 Jan 25, 2024
0e790b8
fixed statusbar content style
ishpaul777 Jan 25, 2024
cdf6eb9
prettier diffs
ishpaul777 Jan 25, 2024
ea47400
Merge branch 'Expensify:main' into fix/status-bar-color-on-mweb
ishpaul777 Jan 29, 2024
fd7aca0
listen to theme changes
ishpaul777 Jan 29, 2024
cde910b
include comment for useeffect
ishpaul777 Jan 29, 2024
8ca38d0
Update src/components/CustomStatusBarAndBackground/index.tsx
ishpaul777 Jan 29, 2024
321b278
remove urelated changes
ishpaul777 Jan 29, 2024
4508091
rectify comment
ishpaul777 Jan 29, 2024
91ad613
remove unnecessary useEffect dependency
ishpaul777 Jan 29, 2024
cb3eb19
Merge branch 'Expensify:main' into fix/status-bar-color-on-mweb
ishpaul777 Feb 11, 2024
d041b91
Merge branch 'Expensify:main' into fix/status-bar-color-on-mweb
ishpaul777 Feb 17, 2024
0432658
refactor after merge
ishpaul777 Feb 17, 2024
3ea154d
prettier
ishpaul777 Feb 17, 2024
49f5ddd
Merge branch 'Expensify:main' into fix/status-bar-color-on-mweb
ishpaul777 Feb 26, 2024
b669f7b
used platform files for platform specfic code
ishpaul777 Feb 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/components/CustomStatusBarAndBackground/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function CustomStatusBarAndBackground({isNested = false}: CustomStatusBarAndBack

const prevStatusBarBackgroundColor = useRef(theme.appBG);
const statusBarBackgroundColor = useRef(theme.appBG);
const isFirstRender = useRef(true);
const statusBarAnimation = useSharedValue(0);

useAnimatedReaction(
Expand Down Expand Up @@ -88,6 +89,12 @@ function CustomStatusBarAndBackground({isNested = false}: CustomStatusBarAndBack
prevStatusBarBackgroundColor.current = statusBarBackgroundColor.current;
statusBarBackgroundColor.current = currentScreenBackgroundColor;

if (isFirstRender.current) {
isFirstRender.current = false;
updateStatusBarAppearance({backgroundColor: currentScreenBackgroundColor, statusBarStyle: newStatusBarStyle});
return;
}

if (currentScreenBackgroundColor !== theme.appBG || prevStatusBarBackgroundColor.current !== theme.appBG) {
statusBarAnimation.value = 0;
statusBarAnimation.value = withDelay(300, withTiming(1));
Expand Down
Loading