aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java
index 8ca0d0ea..56e9af8e 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java
@@ -1437,7 +1437,12 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic
mRespectSubredditRecommendedSortType = false;
sortTypeType = loadSortType();
} else {
- sortTypeType = SortType.Type.valueOf(suggestedCommentSort.toUpperCase(Locale.US));
+ try {
+ sortTypeType = SortType.Type.valueOf(suggestedCommentSort.toUpperCase(Locale.US));
+ } catch (IllegalArgumentException e) {
+ e.printStackTrace();
+ sortTypeType = loadSortType();
+ }
}
activity.setTitle(sortTypeType.fullName);
ViewPostDetailFragment.this.sortType = sortTypeType;