android / nowinandroid

A fully functional Android app built entirely with Kotlin and Jetpack Compose
Apache License 2.0
15.92k stars 2.81k forks source link

[Bug]: Deeplink navigation duplicate MainActivity and mess up back navigation #1509

Open ar2code opened 2 weeks ago

ar2code commented 2 weeks ago

Is there an existing issue for this?

Is there a StackOverflow question about this issue?

What happened?

How to reproduce the bug:

  1. Clear Now In Android app from launched list (means no activity exists).
  2. Get any notification from SystemTrayNotifier
  3. Navigate to app from notification
  4. Go back until you close the app
  5. Open app again
  6. Try to go back again - you will see main screen twice before going to home screen

Thank you!

Relevant logcat output

No response

Code of Conduct

anhtuannd commented 1 week ago

I was unable to reproduce this bug. Do you have video for it?

ar2code commented 1 week ago

Sure, thanks!

now_in_android_bug

ar2code commented 1 week ago

For debugging I just edited NiaApplication onCreate method with:

val notifier = SystemTrayNotifier(this) notifier.postNewsNotifications( listOf( NewsResource( id = "test", title = "test", url = "test", content = "test", headerImageUrl = null, publishDate = Clock.System.now(), type = "test", topics = emptyList(), ), ), )