SrSouza

    SrSouza

    2 years ago
    Hi folks, I getting a unexpected behavior using Icon, the previous vector is being kept in the screen.
    m

    molikto

    2 years ago
    Yes. I got this bug too, but forgot to file a bug report...
    maciejciemiega

    maciejciemiega

    2 years ago
    Zach Klippenstein (he/him) [MOD]

    Zach Klippenstein (he/him) [MOD]

    2 years ago
    Oh I think I hit this too, thanks for filing!
    Nader Jawad

    Nader Jawad

    2 years ago
    Thanks for filing. Yes this is a known issue. As a workaround give the different vector drawable xml assets different name properties. The current logic right now is overly aggressive about caching if we think the contents are the same.
    maciejciemiega

    maciejciemiega

    2 years ago
    Or move the
    if
    statement so the entire
    Icon
    changes, not only asset inside of it:
    if (value) Icon(vectorResource(R.drawable.ic_add)) else Icon(vectorResource(R.drawable.ic_brightness_5))