Skip to content

Commit

Permalink
fix: Force white for icon animation to password view
Browse files Browse the repository at this point in the history
Password view is not compatible with dark mode but it was
using for the icon animation a color which is since recent commits
responsive to dark mode.

So here we force the icon animation color to white to stay consistent
and one day we may convert totally the password view to dark mode.
  • Loading branch information
zatteo committed Jul 10, 2024
1 parent bf66f95 commit 72ea75d
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { getErrorMessage } from '/libs/functions/getErrorMessage'
import { isLightBackground } from '/screens/login/components/functions/clouderyBackgroundFetcher'
import { getColors } from '/ui/colors'
import { CozyIcon } from '/screens/login/components/transitions/transitions-icons/CozyIcon'
import { palette } from '/ui/palette'

const log = Minilog('TransitionToPasswordView')

Expand Down Expand Up @@ -48,9 +49,7 @@ export const TransitionToPasswordView = ({
const animatedScale = useRef(new Animated.Value(1)).current
const animatedOpacity = useRef(new Animated.Value(1)).current

const [foregroundColor, setForegroundColor] = useState(
colors.paperBackgroundColor
)
const [foregroundColor, setForegroundColor] = useState(palette.Common.white)

useEffect(() => {
if (requestTransitionStart) {
Expand All @@ -71,7 +70,7 @@ export const TransitionToPasswordView = ({

const color = shouldUsePrimaryColor
? colors.primaryColor
: colors.paperBackgroundColor
: palette.Common.white

setForegroundColor(color)
} catch (error) {
Expand Down

0 comments on commit 72ea75d

Please sign in to comment.