Open Fs00 opened 2 years ago
Both seem rather ugly. I do not want to allow multiple instances for the home (launcher) activity, because that way navigation becomes confusing (which instance is opened when opening the launcher again?). Having notifications in a separate activity also doesn't fit the home activity navigation model at all. Unfortunately, I can't think of a good solution for that issue either. One basically would have to detach the activity stack of the old home activity (excluding home itself) into a new task, but I don't think that's possible.
As the issue title says, tapping on an OctoDroid notification opens the Notifications screen but also closes all the other open activities of the app. I find this behavior very annoying, especially when you're writing a comment or a new issue since everything you've written will be lost. The problem lies here: https://github.com/slapperwan/gh4a/blob/6e0a8ed0fa75f204c23e2175fd785f2a0291f9b7/app/src/main/java/com/gh4a/worker/NotificationHandlingService.java#L97-L99
Since the HomeActivity is always the root activity of the stack,
FLAG_ACTIVITY_CLEAR_TOP
will cause all other activities to be destroyed and removed from the back stack.I see two possible solutions here:
FLAG_ACTIVITY_MULTIPLE_TASK
instead ofFLAG_ACTIVITY_CLEAR_TOP
)