https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

Suresh Maidaragi

03/05/2024, 8:36 AM
Hi @Tlaster is there way around in precompose to know how many composable already in backstack as like we do have ArrayDeque in android compose attached screen shot for 1. Android compose Arraydeque 2. About how we used this for our usecase
t

Tlaster

03/05/2024, 9:39 AM
Personally, I don't recommend this approach since in Jetpack Navigation,
backQueue
is limited to library group, which indicate you'd better not to use this property.
s

Suresh Maidaragi

03/05/2024, 10:53 AM
Got it @Tlaster is it possible to know at least stackManager size? as like we have
canGoBack
which says there is no items in the stack. new thing which I wanted to have is, how many items are there in stack..
If you wish I can make changes and raise an MR for your library...
t

Tlaster

03/05/2024, 11:03 AM
Just wondering: why would you need something like that, since it's not even possible with jetpack navigation (unless you're using
backQueue
, which you shouldn't)?
s

Suresh Maidaragi

03/05/2024, 11:09 AM
Actually we have use case when backQueue size is = 3 we wanted the close the screen.. To achieve this we wanted to know the backQueue size. It possible in case of Jetpack Navigation as it made backQueue as an
ArrayDeque
from which I can check size
t

Tlaster

03/05/2024, 11:11 AM
As I said before, you should not use
backQueue
since it's limit to library group
s

Suresh Maidaragi

03/05/2024, 11:18 AM
so how can I know the size of
backStacks
from
StackManager
of Precompose?
t

Tlaster

03/05/2024, 11:23 AM
Well currently there's no such an API, the same as the jetpack navigation.
s

Suresh Maidaragi

03/05/2024, 11:28 AM
can I make this changes on your library and raise an MR?
t

Tlaster

03/05/2024, 11:46 AM
Is the only thing you need is back stack count? in that case I can add this.
❤️ 1
🙏 1
🚀 1
s

Suresh Maidaragi

03/05/2024, 11:46 AM
Yes please
Just back stack count I need
Let me know the version when you make that I'll use it🙌
@Tlaster 1.6.0-rc01 release doesn't contains changes expected can you please add
t

Tlaster

03/08/2024, 6:46 AM
rc01 just rebase and update the dependency version, nothing changes yet.
s

Suresh Maidaragi

03/08/2024, 7:03 AM
In coming version can we expect above discussed changes?
t

Tlaster

03/08/2024, 7:03 AM
Yes, will be in rc02
s

Suresh Maidaragi

03/08/2024, 2:30 PM
Thank you..
6 Views