Rename confidence sort to best (#1177)

* Rename CONFIDENCE comments sort type to BEST and remove old BEST type

The Reddit API supports only CONFIDENCE sort type for comments but displays it
as BEST.
I renamed CONFIDENCE name to Best and added a migration step for loading
correct sort type.

* Clean up sortType usages in ViewPostDetailFragment

Removed unnecessary null checks, object creations and most case conversions
This commit is contained in:
Sergei Kozelko
2022-11-03 08:58:08 +07:00
committed by GitHub
parent 78496e080f
commit 72c66e7e4e
4 changed files with 31 additions and 49 deletions

View File

@@ -27,22 +27,6 @@
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" />
<TextView
android:id="@+id/confidence_type_text_view_post_comment_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:paddingStart="32dp"
android:paddingTop="16dp"
android:paddingEnd="32dp"
android:paddingBottom="16dp"
android:text="@string/sort_confidence"
android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family" />
<TextView
android:id="@+id/top_type_text_view_post_comment_sort_type_bottom_sheet_fragment"
android:layout_width="match_parent"