diff --git a/app/src/main/java/ru/vtosters/lite/foaf/FoafBase.java b/app/src/main/java/ru/vtosters/lite/foaf/FoafBase.java index 29313253c..621b92396 100644 --- a/app/src/main/java/ru/vtosters/lite/foaf/FoafBase.java +++ b/app/src/main/java/ru/vtosters/lite/foaf/FoafBase.java @@ -4,6 +4,7 @@ import static android.widget.Toast.LENGTH_SHORT; import static android.widget.Toast.makeText; import static ru.vtosters.lite.utils.Globals.getIdentifier; import static ru.vtosters.lite.utils.Globals.getString; +import static ru.vtosters.lite.utils.Preferences.getDateFormat; import static ru.vtosters.lite.utils.Proxy.getApiCom; import static ru.vtosters.lite.utils.Proxy.proxy; @@ -39,7 +40,7 @@ public class FoafBase { if (!matcher.find()) { return 0; } - return (int) (new SimpleDateFormat("yyyy-MM-dd'T'kk:mm:ss", Locale.getDefault()).parse(matcher.group(1)).getTime() / 1000); + return (int) (new SimpleDateFormat(getDateFormat(), Locale.getDefault()).parse(matcher.group(1)).getTime() / 1000); } public static long GetLastSeenLong(int i) throws ParseException, IOException { diff --git a/app/src/main/java/ru/vtosters/lite/utils/Preferences.java b/app/src/main/java/ru/vtosters/lite/utils/Preferences.java index 16fb31579..9af96daa3 100644 --- a/app/src/main/java/ru/vtosters/lite/utils/Preferences.java +++ b/app/src/main/java/ru/vtosters/lite/utils/Preferences.java @@ -16,7 +16,7 @@ import static ru.vtosters.lite.utils.Globals.registerActivities; import static ru.vtosters.lite.utils.Newsfeed.setupFilters; import static ru.vtosters.lite.utils.OpusLoader.LoadLibrary; import static ru.vtosters.lite.utils.Proxy.setProxy; -import static ru.vtosters.lite.utils.SignatureChecker.*; +import static ru.vtosters.lite.utils.SignatureChecker.validateAppSignature; import static ru.vtosters.lite.utils.Themes.systemThemeChanger; import android.annotation.SuppressLint; @@ -409,7 +409,6 @@ public class Preferences { return hasPrometheus(getUserId()); } - public static String getLocale() { String string = getPrefsValue("lang_value"); @@ -435,6 +434,14 @@ public class Preferences { } } + public static String nullOnline() { + return getString("onlineNull"); + } + + public static boolean isOnlineNull(int status) { + return status == 0; + } + @SuppressLint("SimpleDateFormat") public static SimpleDateFormat setDateFormat() { return new SimpleDateFormat(getDateFormat()); diff --git a/smali/res/values-ru/strings.xml b/smali/res/values-ru/strings.xml index d3f8bda20..6e8e1183c 100644 --- a/smali/res/values-ru/strings.xml +++ b/smali/res/values-ru/strings.xml @@ -4482,6 +4482,7 @@ Новая версия Список изменений Ошибка загрузки файла + Онлайн скрыт diff --git a/smali/res/values/strings.xml b/smali/res/values/strings.xml index ce0412e82..dcdee8834 100644 --- a/smali/res/values/strings.xml +++ b/smali/res/values/strings.xml @@ -4616,6 +4616,8 @@ May look like a fake leaving the online" New version Changelog Download error + Online is hidden + diff --git a/smali/smali/com/vk/im/ui/formatters/OnlineFormatter.smali b/smali/smali/com/vk/im/ui/formatters/OnlineFormatter.smali index a2dfb6dd3..57ea7dc57 100644 --- a/smali/smali/com/vk/im/ui/formatters/OnlineFormatter.smali +++ b/smali/smali/com/vk/im/ui/formatters/OnlineFormatter.smali @@ -216,7 +216,9 @@ if-gtz v4, :cond_1 - const-string p1, "" + invoke-static {}, Lru/vtosters/lite/utils/Preferences;->nullOnline()Ljava/lang/String; + + move-result-object p1 goto :goto_0 diff --git a/smali/smali/com/vtosters/lite/api/execute/GetFullUserProfile.smali b/smali/smali/com/vtosters/lite/api/execute/GetFullUserProfile.smali index 3be152e34..8096abed2 100644 --- a/smali/smali/com/vtosters/lite/api/execute/GetFullUserProfile.smali +++ b/smali/smali/com/vtosters/lite/api/execute/GetFullUserProfile.smali @@ -2224,13 +2224,13 @@ const-string v3, "last_seen" .line 299 - invoke-virtual {v1, v3}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject; + invoke-virtual {v1, v3}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject; move-result-object v3 const-string v5, "time" - invoke-virtual {v3, v5}, Lorg/json/JSONObject;->getInt(Ljava/lang/String;)I + invoke-virtual {v3, v5}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I move-result v3 @@ -2239,7 +2239,7 @@ const-string v3, "last_seen" .line 300 - invoke-virtual {v1, v3}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject; + invoke-virtual {v1, v3}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject; move-result-object v3