diff options
3 files changed, 13 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java index 4096a96b..11d19e16 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java @@ -1180,6 +1180,12 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp Toast.makeText(this, R.string.no_app, Toast.LENGTH_SHORT).show(); } return true; + } else if (itemId == R.id.action_go_to_wiki_activity ) { + Intent wikiIntent = new Intent(this, WikiActivity.class); + wikiIntent.putExtra(WikiActivity.EXTRA_SUBREDDIT_NAME, subredditName); + wikiIntent.putExtra(WikiActivity.EXTRA_WIKI_PATH, "index"); + startActivity(wikiIntent); + return true; } return false; } diff --git a/app/src/main/res/menu/view_subreddit_detail_activity.xml b/app/src/main/res/menu/view_subreddit_detail_activity.xml index c1631814..cb92de44 100644 --- a/app/src/main/res/menu/view_subreddit_detail_activity.xml +++ b/app/src/main/res/menu/view_subreddit_detail_activity.xml @@ -58,4 +58,10 @@ android:orderInCategory="9" android:title="@string/action_share" app:showAsAction="never" /> + + <item + android:id="@+id/action_go_to_wiki_activity" + android:orderInCategory="10" + android:title="@string/action_go_to_wiki" + app:showAsAction="never" /> </menu> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 68ab820b..08ce7077 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1190,5 +1190,6 @@ <string name="app_lock_timeout_6_hours">6 hours</string> <string name="app_lock_timeout_12_hours">12 hours</string> <string name="app_lock_timeout_24_hours">24 hours</string> + <string name="action_go_to_wiki">Go to Wiki</string> </resources> |