Cyril Find

    Cyril Find

    1 year ago
    Hi, How can I remember my
    LazyColumn
    scroll position aver navigating with compose navigation ? I thought hoisting a
    LazyListState
    up to my
    NavHost
    would work but it doesn’t apparently
    a

    allan.conda

    1 year ago
    should work automatically. have you updated to alpha9?
    Cyril Find

    Cyril Find

    1 year ago
    yes
    that’s what I thougt but it doesn’t, maybe I’m doing something else wrong
    I didn’t mention im also using paging 3
    m

    Mantas Varnagiris

    1 year ago
    I have the same issue. I thought it works but it doesn't. Also using paging 3
    Cyril Find

    Cyril Find

    1 year ago
    I’ve been trying stuff but nothing seems to work
    Maybe there is a bug when using both Paging 3 and NavHost with compose ? (i’ll send this message in channel in case other people missed this)
    Timo Drick

    Timo Drick

    1 year ago
    If you think it is a bug you should try to create a minimal version to show the bug. Than it is also easier to see if you did some thing wrong.
    Cyril Find

    Cyril Find

    1 year ago
    yeah I didn’t get to it yet so I was wondering if it was a know issue
    giso

    giso

    1 year ago
    I have the same issue with compose-router. I also tried remembering the
    LazyListState
    at the root composable, but whenever the
    LazyColumn
    is recomposed, the scroll state is reset. Maybe this functionality is not implemented yet?
    ak

    ak

    1 year ago
    @Cyril Find were you able to find a fix or workaround this issue? I am on Compose alpha-11 and navigation compose alpha 06 and have not been able to solve... Thanks!
    Cyril Find

    Cyril Find

    1 year ago
    no, i filed a bug but it's not fixed yet 😞
    ak

    ak

    1 year ago
    @Cyril Find this turned out to be my issue: https://issuetracker.google.com/issues/179397301 since i am not using the paging library. my list state looked like this:
    val listState = viewModel.gasStations.collectAsState(emptyList())
    removing the
    emptyList()
    like so:
    val listState = viewModel.gasStations.collectAsState()
    fixed my issue for now. Gave yours a anyways.
    Cyril Find

    Cyril Find

    1 year ago
    wow that's weird ! thanks for the feedback and the 😄