Refactoring
This commit is contained in:
@@ -6,6 +6,7 @@ import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getPrefsValue;
|
||||
import static ru.vtosters.lite.utils.Preferences.BooleanFalse;
|
||||
import static ru.vtosters.lite.utils.Preferences.BooleanTrue;
|
||||
import static ru.vtosters.lite.utils.Preferences.CommentsSort;
|
||||
import static ru.vtosters.lite.utils.Preferences.adsgroup;
|
||||
import static ru.vtosters.lite.utils.Preferences.adsstories;
|
||||
import static ru.vtosters.lite.utils.Preferences.authorsrecomm;
|
||||
@@ -172,14 +173,7 @@ public class Newsfeed {
|
||||
}
|
||||
|
||||
public static String getCommentsSort(String def) {
|
||||
switch (getPrefsValue("commentssort")) {
|
||||
case "new":
|
||||
return "desc";
|
||||
case "old":
|
||||
return "asc";
|
||||
default:
|
||||
return def;
|
||||
}
|
||||
return CommentsSort() ? "desc" : "asc";
|
||||
}
|
||||
|
||||
public static long getUpdateNewsfeed(boolean refresh_timeout) {
|
||||
|
||||
@@ -170,7 +170,7 @@ public class Preferences {
|
||||
return BooleanTrue("feedcache");
|
||||
}
|
||||
|
||||
public static boolean getCommentsSort() {
|
||||
public static boolean CommentsSort() {
|
||||
return BooleanFalse("commentssorting");
|
||||
}
|
||||
|
||||
|
||||
@@ -138,6 +138,10 @@
|
||||
|
||||
.line 64
|
||||
:goto_1
|
||||
invoke-static {p2}, Lru/vtosters/lite/utils/Newsfeed;->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