diff options
author | Felix NĂ¼sse <felix.nuesse@t-online.de> | 2022-08-12 09:56:36 +0300 |
---|---|---|
committer | Niedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com> | 2022-08-16 09:57:47 +0300 |
commit | a67a5b23a3ae0ae78cab7f986d6e8d1f3220417b (patch) | |
tree | 8cf29a7c3ed1b17d0cc6c2316056dd242e7ba479 /app/src/main/java/it/niedermann/nextcloud/deck/ui | |
parent | fb85600f63e227d3d65c984a6296f9c987dda938 (diff) |
allow EditActivity to always return to main screen
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/card/EditActivity.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/EditActivity.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/EditActivity.java index 292c6466d..9a0427dbb 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/EditActivity.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/EditActivity.java @@ -30,6 +30,7 @@ import it.niedermann.nextcloud.deck.databinding.ActivityEditBinding; import it.niedermann.nextcloud.deck.model.Account; import it.niedermann.nextcloud.deck.model.full.FullCard; import it.niedermann.nextcloud.deck.model.ocs.Version; +import it.niedermann.nextcloud.deck.ui.MainActivity; import it.niedermann.nextcloud.deck.ui.exception.ExceptionHandler; import it.niedermann.nextcloud.deck.util.CardUtil; @@ -174,7 +175,13 @@ public class EditActivity extends AppCompatActivity { @Override public boolean onSupportNavigateUp() { - finish(); // close this activity as oppose to navigating up + if(isTaskRoot()) { + Intent intent = new Intent(EditActivity.this, MainActivity.class); + intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + startActivity(intent); + } else { + finish(); + } return true; } |