From 0d5cf54af5de84b35a10ec0b4b2e12dbe09715a0 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sat, 20 Jul 2019 00:21:00 +0800 Subject: Fixed bugs when posting without a flair specified. Minor UI tweaks. --- .../main/java/ml/docilealligator/infinityforreddit/SubmitPost.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/src/main/java') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/SubmitPost.java b/app/src/main/java/ml/docilealligator/infinityforreddit/SubmitPost.java index 3d63b97a..50a1107b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/SubmitPost.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/SubmitPost.java @@ -159,7 +159,6 @@ class SubmitPost { } else { submitPostListener.submitFailed(response.message()); } - Log.i("image", "dddd" + response.code()); } @Override @@ -199,7 +198,10 @@ class SubmitPost { params.put(RedditUtils.VIDEO_POSTER_URL_KEY, posterUrl); break; } - params.put(RedditUtils.FLAIR_TEXT_KEY, flair); + + if(flair != null) { + params.put(RedditUtils.FLAIR_TEXT_KEY, flair); + } params.put(RedditUtils.SPOILER_KEY, Boolean.toString(isSpoiler)); params.put(RedditUtils.NSFW_KEY, Boolean.toString(isNSFW)); @@ -297,7 +299,6 @@ class SubmitPost { } else { uploadImageListener.uploadFailed(response.message()); } - Log.i("image", "dddd" + response.body()); } @Override -- cgit v1.2.3