summaryrefslogtreecommitdiff
path: root/ui/app-start-intent
diff options
context:
space:
mode:
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;
+ }
}