From f8c15e03af5a28251ee1abc88b1be1b1bbf8ad82 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Fri, 12 Nov 2021 09:10:21 +0800 Subject: Contact mods. --- .../infinityforreddit/activities/ViewSubredditDetailActivity.java | 7 ++++++- app/src/main/res/menu/view_subreddit_detail_activity.xml | 8 +++++++- app/src/main/res/values/strings.xml | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'app/src/main') 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 2f534fb0..8cf3dfc6 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java @@ -1137,12 +1137,17 @@ 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 ) { + } else if (itemId == R.id.action_go_to_wiki_view_subreddit_detail_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; + } else if (itemId == R.id.action_contact_mods_view_subreddit_detail_activity) { + Intent intent = new Intent(this, SendPrivateMessageActivity.class); + intent.putExtra(SendPrivateMessageActivity.EXTRA_RECIPIENT_USERNAME, "r/" + subredditName); + startActivity(intent); + 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 b72aa93f..e23d5191 100644 --- a/app/src/main/res/menu/view_subreddit_detail_activity.xml +++ b/app/src/main/res/menu/view_subreddit_detail_activity.xml @@ -54,8 +54,14 @@ app:showAsAction="never" /> + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 48554a2c..7c5c5180 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -92,6 +92,7 @@ Share Post Link Go to Wiki Playback Speed + Contact Mods Error occurred when parsing the JSON response Error Retrieving the token -- cgit v1.2.3