aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-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
2 files changed, 16 insertions, 9 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 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,