diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-02-20 05:23:08 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-02-20 05:23:08 +0000 |
commit | 533b45c01ac903845bb6c3c9fa22a6e36dcb85e4 (patch) | |
tree | 573f25824464be41842ab2c657c56481522599c7 /app/src/main/java/ml | |
parent | e88c2e957bd5ba6cd703e05d5aa86c19ef049039 (diff) | |
download | infinity-for-reddit-533b45c01ac903845bb6c3c9fa22a6e36dcb85e4.tar infinity-for-reddit-533b45c01ac903845bb6c3c9fa22a6e36dcb85e4.tar.gz infinity-for-reddit-533b45c01ac903845bb6c3c9fa22a6e36dcb85e4.tar.bz2 infinity-for-reddit-533b45c01ac903845bb6c3c9fa22a6e36dcb85e4.tar.lz infinity-for-reddit-533b45c01ac903845bb6c3c9fa22a6e36dcb85e4.tar.xz infinity-for-reddit-533b45c01ac903845bb6c3c9fa22a6e36dcb85e4.tar.zst infinity-for-reddit-533b45c01ac903845bb6c3c9fa22a6e36dcb85e4.zip |
Fix suggested sort enum parsing error.
Diffstat (limited to '')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java | 7 |
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; |