Back button in widget
Please use GitHub reactions 👍 to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!
Describe the bug When a card is opened from the widget, the application does not have a backstack. This results in the application beeing closed instead of the appropriate screen to be opened.
Steps to reproduce the behavior: 0. Create List-Widget (It probably applies to the other widgets aswell)
- Force Close Application and Clear it's Backstack
- Click on any List-Item, to open the Card-Editor
- Click the 'Close' button in the Card-Editor
- See that the application exits to the home-screen
Another side-effect of this is that the close button does not actually clean the backstack. This causes issues when the user opens the 'last used application' from the launcher. Since the Edit-Activity IS the last Activity, it will open the editor again. This is probably not the correct behavior if the user closed the EditActivity beforehand.
Expected behavior The expected behaviour would be that the 'Close'-Button opens the app in the appropriate context. In this case, it should open the Deck and List that corresponds to the selected Card.
Versions
- Nextcloud: 24
- Nextcloud Deck: 1.6.1
- Nextcloud Android:
- Nextcloud Android Deck: 1.20.1
This is very likely the same bug as https://github.com/stefan-niedermann/nextcloud-notes/issues/1412, and it should be fixed similarly.
This https://github.com/stefan-niedermann/nextcloud-deck/blob/8053a89526b2653f176300260d2c6910e9e36461/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/EditActivity.java#L176 and https://github.com/stefan-niedermann/nextcloud-deck/blob/8053a89526b2653f176300260d2c6910e9e36461/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/EditActivity.java#L202 should probably check for the existing stack, similarly to https://github.com/stefan-niedermann/nextcloud-notes/pull/1536