aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/AndroidManifest.xml11
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java7
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/utils/EditProfileUtils.java18
-rw-r--r--app/src/main/res/menu/view_subreddit_detail_activity.xml8
-rw-r--r--app/src/main/res/values/strings.xml1
5 files changed, 29 insertions, 16 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 14b7f150..1a7707e6 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -34,6 +34,11 @@
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:replace="android:label">
+ <activity android:name=".activities.EditProfileActivity"
+ android:label="@string/edit_profile_activity_label"
+ android:parentActivityName=".activities.MainActivity"
+ android:theme="@style/AppTheme.Slidable"
+ android:windowSoftInputMode="adjustPan" />
<activity
android:name=".activities.WikiActivity"
android:label="@string/wiki_activity_label"
@@ -393,12 +398,6 @@
android:parentActivityName=".activities.MainActivity"
android:theme="@style/AppTheme.SlidableWithTranslucentWindow" />
- <activity android:name=".activities.EditProfileActivity"
- android:label="@string/edit_profile_activity_label"
- android:parentActivityName=".activities.MainActivity"
- android:theme="@style/AppTheme.Slidable"
- android:windowSoftInputMode="adjustPan" />
-
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="ml.docilealligator.infinityforreddit.provider"
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 dcca88b5..b81c06fe 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java
@@ -1145,12 +1145,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/java/ml/docilealligator/infinityforreddit/utils/EditProfileUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/EditProfileUtils.java
index 5293bc71..f66fe648 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/EditProfileUtils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/EditProfileUtils.java
@@ -1,28 +1,30 @@
package ml.docilealligator.infinityforreddit.utils;
import android.graphics.Bitmap;
+
import androidx.annotation.NonNull;
+
import com.google.gson.Gson;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.ByteArrayOutputStream;
+import java.util.HashMap;
+import java.util.Map;
+
import ml.docilealligator.infinityforreddit.apis.RedditAPI;
import ml.docilealligator.infinityforreddit.subreddit.SubredditSettingData;
import okhttp3.MediaType;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
-import org.json.JSONException;
-import org.json.JSONObject;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
-import java.io.ByteArrayOutputStream;
-import java.util.HashMap;
-import java.util.Map;
-
public final class EditProfileUtils {
-
-
public static void updateProfile(Retrofit oauthRetrofit,
String accessToken,
String accountName,
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" />
<item
- android:id="@+id/action_go_to_wiki_activity"
+ android:id="@+id/action_go_to_wiki_view_subreddit_detail_activity"
android:orderInCategory="9"
android:title="@string/action_go_to_wiki"
app:showAsAction="never" />
+
+ <item
+ android:id="@+id/action_contact_mods_view_subreddit_detail_activity"
+ android:orderInCategory="10"
+ android:title="@string/action_contact_mods"
+ app:showAsAction="never" />
</menu>
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 @@
<string name="action_share_post_link">Share Post Link</string>
<string name="action_go_to_wiki">Go to Wiki</string>
<string name="action_playback_speed">Playback Speed</string>
+ <string name="action_contact_mods">Contact Mods</string>
<string name="parse_json_response_error">Error occurred when parsing the JSON response</string>
<string name="retrieve_token_error">Error Retrieving the token</string>