summaryrefslogtreecommitdiff
path: root/ui/app-start-intent
diff options
context:
space:
mode:
authorGitStart <1501599+gitstart@users.noreply.github.com>2023-02-12 21:05:24 +0100
committerGitHub <noreply@github.com>2023-02-12 21:05:24 +0100
commit8248bc6bb1f5f71a1e6be3101e1b2173948bf516 (patch)
treed49eb2bd98503c25a7d3dbbe68d402869df45a6d /ui/app-start-intent
parent4096aaf47ea6f0341274e82fc14c5a3960a83f5f (diff)
downloadAntennaPod-8248bc6bb1f5f71a1e6be3101e1b2173948bf516.zip
Automatically switch to different screen when hiding current one from drawer (#6254)
Diffstat (limited to 'ui/app-start-intent')
-rw-r--r--ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/MainActivityStarter.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/MainActivityStarter.java b/ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/MainActivityStarter.java
index f91bb9244..e8686f6ad 100644
--- a/ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/MainActivityStarter.java
+++ b/ui/app-start-intent/src/main/java/de/danoeh/antennapod/ui/appstartintent/MainActivityStarter.java
@@ -14,6 +14,8 @@ public class MainActivityStarter {
public static final String EXTRA_OPEN_PLAYER = "open_player";
public static final String EXTRA_FEED_ID = "fragment_feed_id";
public static final String EXTRA_ADD_TO_BACK_STACK = "add_to_back_stack";
+ public static final String EXTRA_FRAGMENT_TAG = "fragment_tag";
+ public static final String EXTRA_OPEN_DRAWER = "open_drawer";
private final Intent intent;
private final Context context;
@@ -51,4 +53,14 @@ public class MainActivityStarter {
intent.putExtra(EXTRA_ADD_TO_BACK_STACK, true);
return this;
}
+
+ public MainActivityStarter withFragmentLoaded(String fragmentName) {
+ intent.putExtra(EXTRA_FRAGMENT_TAG, fragmentName);
+ return withDrawerOpen();
+ }
+
+ private MainActivityStarter withDrawerOpen() {
+ intent.putExtra(EXTRA_OPEN_DRAWER, true);
+ return this;
+ }
}