Be Careful! This Navigation Logic Causes an Unexpected Behavior in your App!⚠️

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ก.พ. 2025

ความคิดเห็น • 34

  • @DaumasDev
    @DaumasDev ปีที่แล้ว +7

    This should be included natively in the next version of Compose navigation 😅😅

  • @jaelsonwagner
    @jaelsonwagner 10 หลายเดือนก่อน +1

    Great tip, my friend. Thanks for sharing.

  • @jackeblan
    @jackeblan ปีที่แล้ว

    Thanks. I also experienced this before. Good point

  • @ALEXPERTOS.
    @ALEXPERTOS. ปีที่แล้ว +2

    What a coincidence! My app was doing the exact same thing and I didn't know why, thanks

    • @Alchemist10241
      @Alchemist10241 ปีที่แล้ว

      me too, I couldn't find the reason so I marked it as bug and postponed it, I can't believe the solution is this simple. thanks Steve

  • @mikelantzelo
    @mikelantzelo ปีที่แล้ว

    Facing this problem could not find a solution!!! Thank you!!!

  • @samuelwakoli
    @samuelwakoli ปีที่แล้ว

    I have really learnt from this. I had this issue on a slow device. Thank you for sharing

  • @alskaa1
    @alskaa1 ปีที่แล้ว +1

    I have the same issue with multiple navigate() and I solved it by check current route != next destination. But I don't know how to do it with popBackStack(). Thank you. Very useful.

  • @bhaskarkaura4507
    @bhaskarkaura4507 ปีที่แล้ว

    Simple and clear, Thanks!!

  • @MrMorffey
    @MrMorffey ปีที่แล้ว

    Wow, thx. I had that bug too. But i fixed it with delay and button property enabled

  • @ubersticks
    @ubersticks ปีที่แล้ว

    My first response was "no way, that can't be correct" -- but it sure seems you are right! I am surprised at this find and your fix seems solid (especially liking the extension function). I wonder if this debouncing need is mainly on the emulator since it is so much slower than real HW....

    • @StevdzaSan
      @StevdzaSan  ปีที่แล้ว

      Probably there's a higher chance on emulator, but still it can happen on a real device as well.

  • @sooshil
    @sooshil ปีที่แล้ว

    Awesome.
    Already faced an issue with it. Thanks.

  • @szpitor
    @szpitor ปีที่แล้ว

    I have something similar I have screen 1 where I can input text and show that on screen . My screen 2 has check boxes both of them has been stored in viewmodel using uiState no livedata or room ... So very weird behaviour. I can input text in screen 1 navigate to screen 2 . Screen 2 has 2 options to go back to screen 1 with TopBar arrow using navigate to screen 1 and the back button on the phone. When I use the TopBar arrow the text disappears from screen one but the back button using popBackstack hold the text on screen1...

  • @swiszcz93
    @swiszcz93 ปีที่แล้ว

    awesome, thanks for the tip!

  • @abdulhafeezandroiddeveloper
    @abdulhafeezandroiddeveloper 9 หลายเดือนก่อน

    yes i also facing this issue

  • @conceptcoder
    @conceptcoder ปีที่แล้ว +1

    So jetpack compose isn't stable yet?

    • @DaumasDev
      @DaumasDev ปีที่แล้ว +1

      Anything in this world isn't stable. The nature of the things is the caos 🤣🤣

  • @unknownBoy85lover
    @unknownBoy85lover ปีที่แล้ว

    Thank you sir ❤

  • @lechixy
    @lechixy ปีที่แล้ว

    thank you so much dude

  • @arozendojr
    @arozendojr ปีที่แล้ว

    How to show WebView in compose multi platform app for android & iOS

  • @koweratus
    @koweratus ปีที่แล้ว

    This can happen with anything thats clickable, so the better solution imo is to add multiple click handler thay way user cant press more than once.

  • @marscbunny9282
    @marscbunny9282 ปีที่แล้ว

    Open cv with android Jetpack compose and kotlin is it possible?

  • @KingFuYouTube
    @KingFuYouTube ปีที่แล้ว

    great tip!