Skip to content

Commit

Permalink
fix statusbar color on mWeb iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmydel committed Feb 8, 2024
1 parent 9f2b8f8 commit 1d0e5a9
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/components/LottieAnimations/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import colors from '@styles/theme/colors';
import variables from '@styles/variables';
import type DotLottieAnimation from './types';
import type {AnimationKey} from './types';

const DotLottieAnimations: Record<string, DotLottieAnimation> = {
const DotLottieAnimations: Record<AnimationKey, DotLottieAnimation> = {
ExpensifyLounge: {
file: require('@assets/animations/ExpensifyLounge.lottie'),
w: 1920,
Expand All @@ -26,6 +28,7 @@ const DotLottieAnimations: Record<string, DotLottieAnimation> = {
file: require('@assets/animations/PreferencesDJ.lottie'),
w: 375,
h: 240,
backgroundColor: colors.blue500,
},
ReviewingBankInfo: {
file: require('@assets/animations/ReviewingBankInfo.lottie'),
Expand Down
17 changes: 17 additions & 0 deletions src/components/LottieAnimations/types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
import type {LottieViewProps} from 'lottie-react-native';
import type {ColorValue} from '@styles/utils/types';

type AnimationKey =
| 'ExpensifyLounge'
| 'FastMoney'
| 'Fireworks'
| 'Hands'
| 'PreferencesDJ'
| 'ReviewingBankInfo'
| 'WorkspacePlanet'
| 'SaveTheWorld'
| 'Safe'
| 'Magician'
| 'Update'
| 'Coin';

type DotLottieAnimation = {
file: LottieViewProps['source'];
w: number;
h: number;
backgroundColor?: ColorValue;
};

export type {AnimationKey};
export default DotLottieAnimation;
2 changes: 1 addition & 1 deletion src/components/Section/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function Section({
const StyleUtils = useStyleUtils();
const {isSmallScreenWidth} = useWindowDimensions();

const illustrationContainerStyle: StyleProp<ViewStyle> = StyleUtils.getBackgroundColorStyle(illustrationBackgroundColor ?? theme.appBG);
const illustrationContainerStyle: StyleProp<ViewStyle> = StyleUtils.getBackgroundColorStyle(illustrationBackgroundColor ?? illustration?.backgroundColor ?? theme.appBG);

return (
<>
Expand Down
2 changes: 0 additions & 2 deletions src/pages/settings/Preferences/PreferencesPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import * as User from '@userActions/User';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import SCREENS from '@src/SCREENS';

const propTypes = {
/** The chat priority mode */
Expand Down Expand Up @@ -73,7 +72,6 @@ function PreferencesPage(props) {
isCentralPane
subtitleMuted
illustration={LottieAnimations.PreferencesDJ}
illustrationBackgroundColor={theme.PAGE_THEMES[SCREENS.SETTINGS.PREFERENCES.ROOT].backgroundColor}
titleStyles={styles.accountSettingsSectionTitle}
>
<View style={[styles.flex1, styles.mt5]}>
Expand Down
2 changes: 1 addition & 1 deletion src/styles/theme/themes/dark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const darkTheme = {
statusBarStyle: CONST.STATUS_BAR_STYLE.LIGHT_CONTENT,
},
[SCREENS.SETTINGS.PREFERENCES.ROOT]: {
backgroundColor: colors.blue500,
backgroundColor: colors.productDark100,
statusBarStyle: CONST.STATUS_BAR_STYLE.LIGHT_CONTENT,
},
[SCREENS.SETTINGS.WORKSPACES]: {
Expand Down
2 changes: 1 addition & 1 deletion src/styles/theme/themes/light.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const lightTheme = {
statusBarStyle: CONST.STATUS_BAR_STYLE.LIGHT_CONTENT,
},
[SCREENS.SETTINGS.PREFERENCES.ROOT]: {
backgroundColor: colors.blue500,
backgroundColor: colors.productLight100,
statusBarStyle: CONST.STATUS_BAR_STYLE.LIGHT_CONTENT,
},
[SCREENS.SETTINGS.WORKSPACES]: {
Expand Down

0 comments on commit 1d0e5a9

Please sign in to comment.