Fixes + Added comments sorting
This commit is contained in:
@@ -277,6 +277,20 @@ public class Prefs {
|
||||
return string.equals("amoled") ? "1" : "0";
|
||||
}
|
||||
|
||||
public static String getCommentsSort(String def) {
|
||||
String string = Helper.GetPreferences().getString("commentssort", "");
|
||||
if (string.isEmpty()) {
|
||||
return def;
|
||||
}
|
||||
if (string.equals("new")) {
|
||||
return "desc";
|
||||
}
|
||||
if (string.equals("old")) {
|
||||
return "asc";
|
||||
}
|
||||
return def;
|
||||
}
|
||||
|
||||
public static String getMeToken() {
|
||||
return Helper.GetPreferences().getString("me_token", "");
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
<TextView
|
||||
android:textSize="17.0dip"
|
||||
android:textColor="@color/main_text"
|
||||
android:textColor="?text_primary"
|
||||
android:duplicateParentState="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
<TextView
|
||||
android:textSize="17.0dip"
|
||||
android:textColor="@color/main_text"
|
||||
android:textColor="?text_primary"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:duplicateParentState="true"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
<TextView
|
||||
android:textSize="18.0dip"
|
||||
android:textColor="@color/main_text"
|
||||
android:textColor="?text_primary"
|
||||
android:id="@id/flist_item_text"
|
||||
android:duplicateParentState="false"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
<TextView
|
||||
android:textSize="17.0dip"
|
||||
android:textColor="@color/main_text"
|
||||
android:textColor="?text_primary"
|
||||
android:duplicateParentState="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
<TextView
|
||||
android:textSize="17.0dip"
|
||||
android:textColor="@color/main_text"
|
||||
android:textColor="?text_primary"
|
||||
android:duplicateParentState="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
<TextView
|
||||
android:textSize="17.0dip"
|
||||
android:textColor="@color/main_text"
|
||||
android:textColor="?text_primary"
|
||||
android:duplicateParentState="true"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -483,4 +483,16 @@
|
||||
<item>150 сообщений</item>
|
||||
<item>200 сообщений</item>
|
||||
</string-array>
|
||||
<string-array name="darktheme_value">
|
||||
<item>По умолчанию</item>
|
||||
<item>Полностью чёрная</item>
|
||||
</string-array>
|
||||
<string-array name="lighttheme_value">
|
||||
<item>По умолчанию</item>
|
||||
</string-array>
|
||||
<string-array name="commentssort_value">
|
||||
<item>По умолчанию</item>
|
||||
<item>От Новых к Старым</item>
|
||||
<item>От Старых к Новым</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
@@ -676,4 +676,14 @@
|
||||
<item>default</item>
|
||||
<item>amoled</item>
|
||||
</string-array>
|
||||
<string-array name="commentssort_value">
|
||||
<item>Default</item>
|
||||
<item>New to Old</item>
|
||||
<item>Old to New</item>
|
||||
</string-array>
|
||||
<string-array name="commentssort">
|
||||
<item>default</item>
|
||||
<item>new</item>
|
||||
<item>old</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
||||
@@ -72,6 +72,13 @@
|
||||
<com.vtosters.lite.ui.MaterialSectionDividerPreference />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/vtlfeedwork">
|
||||
<com.vtosters.lite.ui.SummaryListPreference
|
||||
android:entries="@array/commentssort_value"
|
||||
android:title="Сортировка комментариев"
|
||||
android:key="commentssort"
|
||||
android:defaultValue="default"
|
||||
android:dialogTitle="Выберите значение"
|
||||
android:entryValues="@array/commentssort" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:title="@string/vtlfeedreload"
|
||||
android:key="feedautoupdate"
|
||||
|
||||
@@ -138,6 +138,10 @@
|
||||
|
||||
.line 64
|
||||
:goto_1
|
||||
invoke-static {p2}, Lru/vtosters/lite/utils/Prefs;->getCommentsSort(Ljava/lang/String;)Ljava/lang/String;
|
||||
|
||||
move-result-object p2
|
||||
|
||||
invoke-virtual {p0, p1, p2}, Lcom/vk/api/wall/WallGetComments;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/vk/api/base/ApiRequest;
|
||||
|
||||
.line 66
|
||||
|
||||
Reference in New Issue
Block a user