Fixes
Deleted unused code Fixed some settings Sorted toggles features
This commit is contained in:
@@ -18,7 +18,6 @@ public class InterfaceFragment extends MaterialPreferenceToolbarFragment{
|
||||
}
|
||||
|
||||
private void prefs(){
|
||||
findPreference("newfeed").setOnPreferenceClickListener(new restart());
|
||||
findPreference("stories").setOnPreferenceClickListener(new restart());
|
||||
findPreference("swipe").setOnPreferenceClickListener(new restart());
|
||||
findPreference("dockcounter").setOnPreferenceClickListener(new restart());
|
||||
|
||||
@@ -23,7 +23,6 @@ public class MessagesFragment extends MaterialPreferenceToolbarFragment{
|
||||
private void prefs(){
|
||||
findPreference("vkme").setOnPreferenceClickListener(new MessagesFragment.restart());
|
||||
findPreference("vkme_notifs").setOnPreferenceClickListener(new MessagesFragment.restart());
|
||||
findPreference("roundedmsgs").setOnPreferenceClickListener(new MessagesFragment.restart());
|
||||
findPreference("systememoji").setOnPreferenceClickListener(new MessagesFragment.restart());
|
||||
}
|
||||
|
||||
|
||||
@@ -38,8 +38,6 @@ public class ThemesFragment extends MaterialPreferenceToolbarFragment{
|
||||
|
||||
private void prefs(){
|
||||
findPreference("iconvk").setOnPreferenceChangeListener(new a());
|
||||
findPreference("darktheme").setOnPreferenceClickListener(new restart());
|
||||
findPreference("lighttheme").setOnPreferenceClickListener(new restart());
|
||||
findPreference("navbar").setOnPreferenceClickListener(new restart());
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import static ru.vtosters.lite.utils.About.getBuildNumber;
|
||||
import static ru.vtosters.lite.utils.About.getCommitLink;
|
||||
import static ru.vtosters.lite.utils.CacheUtils.humanReadableByteCountBin;
|
||||
import static ru.vtosters.lite.utils.Globals.edit;
|
||||
import static ru.vtosters.lite.utils.Globals.getAvatarDrawable;
|
||||
import static ru.vtosters.lite.utils.Globals.getDrawableFromUrl;
|
||||
import static ru.vtosters.lite.utils.Globals.getIdentifier;
|
||||
import static ru.vtosters.lite.utils.Globals.getPrefsValue;
|
||||
import static ru.vtosters.lite.utils.Globals.getUserPhoto;
|
||||
@@ -68,7 +68,6 @@ import ru.vtosters.lite.utils.SSFS;
|
||||
import ru.vtosters.lite.utils.VKUIwrapper;
|
||||
|
||||
public class VTSettings extends MaterialPreferenceToolbarFragment{
|
||||
|
||||
public static String getValAsString(String stringid, Boolean value){
|
||||
if(disableSettingsSumms()) return "";
|
||||
|
||||
@@ -124,7 +123,7 @@ public class VTSettings extends MaterialPreferenceToolbarFragment{
|
||||
int vtosterXml = getIdentifier("empty", "xml");
|
||||
this.addPreferencesFromResource(vtosterXml);
|
||||
|
||||
PreferencesUtil.addPreferenceDrawable(this, "", "Аккаунты", getUsername() + (hasVerification() ? Globals.getString("thanksfordonate") : Globals.getString("getdonate")), getAvatarDrawable(getUserPhoto()), preference -> {
|
||||
PreferencesUtil.addPreferenceDrawable(this, "", "Аккаунты", getUsername() + (hasVerification() ? Globals.getString("thanksfordonate") : Globals.getString("getdonate")), getDrawableFromUrl(getUserPhoto(), "ic_user_circle_outline_28"), preference -> {
|
||||
AuthBridge.logout();
|
||||
restartApplication();
|
||||
return false;
|
||||
|
||||
@@ -3,7 +3,6 @@ package ru.vtosters.lite.ui.fragments.dockbar;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Preferences.milkshake;
|
||||
import static ru.vtosters.lite.utils.Preferences.newfeed;
|
||||
import static ru.vtosters.lite.utils.Preferences.useNewSettings;
|
||||
import static ru.vtosters.lite.utils.Preferences.vkme;
|
||||
import static ru.vtosters.lite.utils.Preferences.vkme_notifs;
|
||||
@@ -91,7 +90,7 @@ public class DockBarManager{
|
||||
return;
|
||||
}
|
||||
|
||||
mSelectedTabs.add(new DockBarTab("tab_news", !milkshake() ? R.drawable.ic_newsfeed_28 : R.drawable.ic_menu_newsfeed_outline_28, R.string.newsfeed, R.id.tab_news, newfeed() ? HomeFragment.class : NewsfeedFragment.class));
|
||||
mSelectedTabs.add(new DockBarTab("tab_news", !milkshake() ? R.drawable.ic_newsfeed_28 : R.drawable.ic_menu_newsfeed_outline_28, R.string.newsfeed, R.id.tab_news, milkshake() ? HomeFragment.class : NewsfeedFragment.class));
|
||||
mSelectedTabs.add(new DockBarTab("tab_discover", !milkshake() ? R.drawable.ic_menu_search_28 : R.drawable.ic_menu_search_outline_28, R.string.search, R.id.tab_discover, DiscoverFragment.class));
|
||||
mSelectedTabs.add(new DockBarTab("tab_messages", !milkshake() ? R.drawable.ic_message_24 : R.drawable.ic_message_outline_24, R.string.messages, R.id.tab_messages, DialogsFragment.class));
|
||||
mSelectedTabs.add(new DockBarTab("tab_feedback", !milkshake() ? R.drawable.ic_notification_24 : R.drawable.ic_menu_notification_outline_28, R.string.feedback, R.id.tab_feedback, NotificationsContainerFragment.class));
|
||||
@@ -127,7 +126,7 @@ public class DockBarManager{
|
||||
item.getInt("id"),
|
||||
Class.forName(item.getString("fragmentClass"))
|
||||
);
|
||||
if(newfeed()){
|
||||
if(milkshake()){
|
||||
if(tab.fragmentClass == NewsfeedFragment.class){
|
||||
tab.fragmentClass = HomeFragment.class;
|
||||
} else if(tab.fragmentClass == DiscoverFragment.class){
|
||||
@@ -153,7 +152,7 @@ public class DockBarManager{
|
||||
item.getInt("id"),
|
||||
Class.forName(item.getString("fragmentClass"))
|
||||
);
|
||||
if(newfeed()){
|
||||
if(milkshake()){
|
||||
if(tab.fragmentClass == NewsfeedFragment.class){
|
||||
tab.fragmentClass = HomeFragment.class;
|
||||
} else if(tab.fragmentClass == DiscoverFragment.class){
|
||||
|
||||
@@ -5,13 +5,13 @@ import android.util.Base64;
|
||||
/*
|
||||
*Extension of Base64 class for decoding/encoding with flag NO_PADDING
|
||||
*/
|
||||
public class Base64Utils {
|
||||
public class Base64Utils{
|
||||
|
||||
public static String decode(String base) {
|
||||
public static String decode(String base){
|
||||
return new String(Base64.decode(base, Base64.NO_PADDING));
|
||||
}
|
||||
|
||||
public static String encode(String base) {
|
||||
public static String encode(String base){
|
||||
return Base64.encodeToString(base.getBytes(), Base64.NO_PADDING);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,19 +8,16 @@ import android.annotation.SuppressLint;
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import com.vk.im.engine.ImEnvironment;
|
||||
import com.vk.im.engine.events.OnMsgUpdateEvent;
|
||||
import com.vk.im.engine.internal.longpoll.tasks.MsgDeleteLpTask;
|
||||
import com.vk.im.engine.internal.storage.StorageEnvironment;
|
||||
import com.vk.im.engine.internal.storage.StorageManager;
|
||||
import com.vk.im.engine.models.messages.Msg;
|
||||
import com.vk.im.engine.models.messages.MsgFromUser;
|
||||
import com.vk.im.engine.models.messages.NestedMsg;
|
||||
import com.vk.libsqliteext.CustomSqliteExtensionsKt;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -28,62 +25,62 @@ import io.requery.android.database.sqlite.SQLiteDatabase;
|
||||
import io.requery.android.database.sqlite.SQLiteOpenHelper;
|
||||
import ru.vtosters.lite.encryption.EncryptProvider;
|
||||
|
||||
public class DeletedMessagesHandler {
|
||||
public class DeletedMessagesHandler{
|
||||
private static List<Integer> sDeletedMessagesList = new ArrayList<>();
|
||||
|
||||
private static SQLiteDatabase sVKSQLiteDatabase;
|
||||
private static int sBodyIndex = -1;
|
||||
private static DeletedMessagesDBHelper sVTDatabase;
|
||||
|
||||
public static void reloadMessagesList() {
|
||||
if (sVTDatabase == null) {
|
||||
public static void reloadMessagesList(){
|
||||
if(sVTDatabase == null){
|
||||
sVTDatabase = new DeletedMessagesDBHelper();
|
||||
}
|
||||
sDeletedMessagesList = new ArrayList<>(sVTDatabase.loadAllMessages());
|
||||
}
|
||||
|
||||
public static void grabVKDatabase(StorageEnvironment storageEnvironment) {
|
||||
public static void grabVKDatabase(StorageEnvironment storageEnvironment){
|
||||
sVKSQLiteDatabase = storageEnvironment.a();
|
||||
}
|
||||
|
||||
public static boolean hook() {
|
||||
public static boolean hook(){
|
||||
return getBoolValue("undeletemsg", true);
|
||||
}
|
||||
|
||||
public static void setBodyDBParser(Msg msg) {
|
||||
if (!(msg instanceof MsgFromUser)) return;
|
||||
public static void setBodyDBParser(Msg msg){
|
||||
if(!(msg instanceof MsgFromUser)) return;
|
||||
|
||||
for (Integer integer : sDeletedMessagesList) {
|
||||
for(Integer integer : sDeletedMessagesList) {
|
||||
MsgFromUser msgFromUser = (MsgFromUser) msg;
|
||||
checkForNestedMsg(msgFromUser.w0());
|
||||
if (integer == msg.C1()) {
|
||||
if(integer == msg.C1()){
|
||||
editTextOfMsg((MsgFromUser) msg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkForNestedMsg(List<NestedMsg> nestedMsgs) {
|
||||
for (NestedMsg nestedMsg : nestedMsgs) {
|
||||
if (!nestedMsg.w0().isEmpty()) checkForNestedMsg(nestedMsg.w0());
|
||||
private static void checkForNestedMsg(List<NestedMsg> nestedMsgs){
|
||||
for(NestedMsg nestedMsg : nestedMsgs) {
|
||||
if(!nestedMsg.w0().isEmpty()) checkForNestedMsg(nestedMsg.w0());
|
||||
|
||||
nestedMsg.d(EncryptProvider.decryptMessage(nestedMsg.f(), nestedMsg.getFrom().getId()));
|
||||
}
|
||||
}
|
||||
|
||||
private static void editTextOfMsg(MsgFromUser msgFromUser) {
|
||||
if (!msgFromUser.f().startsWith(getPrefixUndelete())) {
|
||||
private static void editTextOfMsg(MsgFromUser msgFromUser){
|
||||
if(!msgFromUser.f().startsWith(getPrefixUndelete())){
|
||||
msgFromUser.d(getPrefixUndelete() + EncryptProvider.decryptMessage(msgFromUser));
|
||||
}
|
||||
}
|
||||
|
||||
private static String getPrefixUndelete() {
|
||||
private static String getPrefixUndelete(){
|
||||
return getPrefsValue("undeletemsg_prefix_value") + " ";
|
||||
}
|
||||
|
||||
public static void updateDialog(MsgDeleteLpTask msgDeleteLpTask) throws NoSuchFieldException, IllegalAccessException {
|
||||
Cursor c = getMessageFromDatabaseById((int )ReflectionUtils.getObjectField(msgDeleteLpTask.getClass(), "d", msgDeleteLpTask));
|
||||
if (c == null) return;
|
||||
public static void updateDialog(MsgDeleteLpTask msgDeleteLpTask) throws NoSuchFieldException, IllegalAccessException{
|
||||
Cursor c = getMessageFromDatabaseById(ReflectionUtils.getObjectField(msgDeleteLpTask.getClass(), "d", msgDeleteLpTask));
|
||||
if(c == null) return;
|
||||
|
||||
@SuppressLint("Range")
|
||||
int localId = c.getInt(c.getColumnIndex("local_id"));
|
||||
@@ -94,17 +91,17 @@ public class DeletedMessagesHandler {
|
||||
imEnvironment.a(str, new OnMsgUpdateEvent(str, cint, localId));
|
||||
}
|
||||
|
||||
public static void hookDeletedMessageId(MsgDeleteLpTask msgDeleteLpTask) throws NoSuchFieldException, IllegalAccessException {
|
||||
if (!hook()) return;
|
||||
public static void hookDeletedMessageId(MsgDeleteLpTask msgDeleteLpTask) throws NoSuchFieldException, IllegalAccessException{
|
||||
if(!hook()) return;
|
||||
|
||||
var field = msgDeleteLpTask.getClass().getDeclaredField("c");
|
||||
field.setAccessible(true);
|
||||
var messageId = (int) field.get(msgDeleteLpTask);
|
||||
|
||||
Cursor c = getMessageFromDatabaseById(messageId);
|
||||
if (c == null) return;
|
||||
if (sBodyIndex == -1) sBodyIndex = c.getColumnIndex("body");
|
||||
if (TextUtils.isEmpty(c.getString(sBodyIndex))) {
|
||||
if(c == null) return;
|
||||
if(sBodyIndex == -1) sBodyIndex = c.getColumnIndex("body");
|
||||
if(TextUtils.isEmpty(c.getString(sBodyIndex))){
|
||||
deleteMessageFromDB(messageId);
|
||||
return;
|
||||
}
|
||||
@@ -113,33 +110,33 @@ public class DeletedMessagesHandler {
|
||||
sVTDatabase.saveDeletedMessage(messageId);
|
||||
}
|
||||
|
||||
public static Cursor getMessageFromDatabaseById(int messageId) {
|
||||
public static Cursor getMessageFromDatabaseById(int messageId){
|
||||
String query = "SELECT * FROM messages WHERE vk_id = " + messageId;
|
||||
Cursor c = CustomSqliteExtensionsKt.a(sVKSQLiteDatabase, query);
|
||||
if (!c.moveToFirst()) return null;
|
||||
if(!c.moveToFirst()) return null;
|
||||
return c;
|
||||
}
|
||||
|
||||
public static void deleteMessageFromDB(int messageId) {
|
||||
public static void deleteMessageFromDB(int messageId){
|
||||
sVKSQLiteDatabase.execSQL("DELETE FROM messages WHERE vk_id = " + messageId);
|
||||
}
|
||||
|
||||
public static class DeletedMessagesDBHelper extends SQLiteOpenHelper {
|
||||
public DeletedMessagesDBHelper() {
|
||||
public static class DeletedMessagesDBHelper extends SQLiteOpenHelper{
|
||||
public DeletedMessagesDBHelper(){
|
||||
super(getContext(), "deleted_msgs", null, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(SQLiteDatabase db) {
|
||||
public void onCreate(SQLiteDatabase db){
|
||||
db.execSQL("create table deleted_msgs (id integer primary key, msgId integer)");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
||||
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion){
|
||||
|
||||
}
|
||||
|
||||
public void saveDeletedMessage(int msgId) {
|
||||
public void saveDeletedMessage(int msgId){
|
||||
SQLiteDatabase sqLiteDatabase = getWritableDatabase();
|
||||
|
||||
ContentValues contentValues = new ContentValues();
|
||||
@@ -149,16 +146,16 @@ public class DeletedMessagesHandler {
|
||||
sqLiteDatabase.close();
|
||||
}
|
||||
|
||||
public List<Integer> loadAllMessages() {
|
||||
public List<Integer> loadAllMessages(){
|
||||
List<Integer> msgIdsList = new ArrayList<>();
|
||||
|
||||
Cursor cursor = getReadableDatabase().query("deleted_msgs", null, null, null, null, null, null);
|
||||
if (cursor.moveToFirst()) {
|
||||
if(cursor.moveToFirst()){
|
||||
int msgIdIndex = cursor.getColumnIndex("msgId");
|
||||
|
||||
do {
|
||||
msgIdsList.add(cursor.getInt(msgIdIndex));
|
||||
} while (cursor.moveToNext());
|
||||
} while(cursor.moveToNext());
|
||||
cursor.close();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ package ru.vtosters.lite.utils;
|
||||
|
||||
import static androidx.core.content.ContextCompat.getDrawable;
|
||||
import static ru.vtosters.lite.utils.CacheUtils.getInstance;
|
||||
import static ru.vtosters.lite.utils.LocaleUtils.getLocale;
|
||||
import static ru.vtosters.lite.utils.Preferences.checkupdates;
|
||||
import static ru.vtosters.lite.utils.Preferences.getLocale;
|
||||
import static ru.vtosters.lite.utils.Preferences.preferences;
|
||||
import static ru.vtosters.lite.utils.ServerDialog.sendRequest;
|
||||
import static ru.vtosters.lite.utils.Themes.isDarkTheme;
|
||||
@@ -88,11 +88,11 @@ public class Globals{
|
||||
// VKIDProtection.alert(activity);
|
||||
}
|
||||
|
||||
public static byte[] readFileFully(File file) throws IOException {
|
||||
public static byte[] readFileFully(File file) throws IOException{
|
||||
return readFully(new FileInputStream(file));
|
||||
}
|
||||
|
||||
public static byte[] readFully(InputStream is) throws IOException {
|
||||
public static byte[] readFully(InputStream is) throws IOException{
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
|
||||
byte[] buffer = new byte[BUFFER_SIZE];
|
||||
@@ -103,11 +103,11 @@ public class Globals{
|
||||
return bos.toByteArray();
|
||||
}
|
||||
|
||||
public static void writeToFile(File file, String content) throws IOException {
|
||||
public static void writeToFile(File file, String content) throws IOException{
|
||||
writeToFile(file, content.getBytes());
|
||||
}
|
||||
|
||||
public static void writeToFile(File file, byte[] content) throws IOException {
|
||||
public static void writeToFile(File file, byte[] content) throws IOException{
|
||||
FileOutputStream fos = new FileOutputStream(file);
|
||||
fos.write(content);
|
||||
}
|
||||
@@ -171,7 +171,7 @@ public class Globals{
|
||||
return extendedUserProfile.a;
|
||||
}
|
||||
|
||||
public static Drawable getDrawableFromUrl(String url){
|
||||
public static Drawable getDrawableFromUrl(String url, String nopic){
|
||||
try {
|
||||
URL aryURI = new URL(url);
|
||||
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
|
||||
@@ -183,24 +183,7 @@ public class Globals{
|
||||
|
||||
return new BitmapDrawable(getResources(), bmp);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static Drawable getAvatarDrawable(String url){
|
||||
try {
|
||||
URL aryURI = new URL(url);
|
||||
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
|
||||
StrictMode.setThreadPolicy(policy);
|
||||
|
||||
URLConnection conn = aryURI.openConnection();
|
||||
InputStream is = conn.getInputStream();
|
||||
Bitmap bmp = BitmapFactory.decodeStream(is);
|
||||
|
||||
return new BitmapDrawable(getResources(), Bitmap.createScaledBitmap(getBitmapClippedCircle(bmp), convertDpToPixel(256), convertDpToPixel(256), true));
|
||||
} catch (Exception e) {
|
||||
return getDrawable(getContext(), getIdentifier("ic_user_circle_outline_28", "drawable"));
|
||||
return getDrawable(getContext(), getIdentifier(nopic, "drawable"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.f0x1d.VTVerifications.isPrometheus;
|
||||
import static ru.vtosters.lite.f0x1d.VTVerifications.isDeveloper;
|
||||
import static ru.vtosters.lite.f0x1d.VTVerifications.isPrometheus;
|
||||
import static ru.vtosters.lite.f0x1d.VTVerifications.isVerified;
|
||||
import static ru.vtosters.lite.utils.Preferences.getBoolValue;
|
||||
import static ru.vtosters.lite.utils.Preferences.hasVerification;
|
||||
import static ru.vtosters.lite.utils.Preferences.preferences;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
@@ -69,8 +68,8 @@ public class JsonInjectors{
|
||||
public static JSONObject superapp(JSONObject orig) throws JSONException{
|
||||
var Items = orig.optJSONArray("items");
|
||||
|
||||
if(Items != null) {
|
||||
for(int i = 0; i < Items.length(); i++){
|
||||
if(Items != null){
|
||||
for(int i = 0; i < Items.length(); i++) {
|
||||
var items = Items.optJSONObject(i);
|
||||
var type = items.optString("type");
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
import static ru.vtosters.lite.utils.Globals.getIdentifier;
|
||||
import static ru.vtosters.lite.utils.Globals.getPrefsValue;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Globals.getStringDate;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
public class LocaleUtils{
|
||||
public static String getLocale(){
|
||||
String string = getPrefsValue("lang_value");
|
||||
|
||||
if(string.equals("system")){
|
||||
return Locale.getDefault().getLanguage();
|
||||
}
|
||||
|
||||
return string.isEmpty() ? Locale.getDefault().getLanguage() : string;
|
||||
}
|
||||
|
||||
public static boolean fulltime(){
|
||||
return getPrefsValue("dateformat").equals("noyear") || getPrefsValue("dateformat").equals("full") || getPrefsValue("dateformat").equals("noseconds");
|
||||
}
|
||||
|
||||
public static String getDateFormat(){
|
||||
switch(getPrefsValue("dateformat")) {
|
||||
case "noyear":
|
||||
return getString("fulltime2");
|
||||
case "full":
|
||||
return getString("fulltime");
|
||||
default:
|
||||
return getString("fulltime3");
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
public static SimpleDateFormat setDateFormat(){
|
||||
return new SimpleDateFormat(getDateFormat());
|
||||
}
|
||||
|
||||
public static String getFormattedDate(boolean isFemale, long time){
|
||||
SimpleDateFormat date = new SimpleDateFormat(getDateFormat(), Locale.getDefault());
|
||||
|
||||
if(!fulltime()) return null;
|
||||
|
||||
try {
|
||||
return getStringDate(isFemale ? getIdentifier("last_seen_profile_f", "string") : getIdentifier("last_seen_profile_m", "string"), date.format(new Date(time)));
|
||||
} catch (Throwable th) {
|
||||
th.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import static ru.vtosters.lite.utils.Preferences.copyright_post;
|
||||
import static ru.vtosters.lite.utils.Preferences.dev;
|
||||
import static ru.vtosters.lite.utils.Preferences.friendsrecomm;
|
||||
import static ru.vtosters.lite.utils.Preferences.getBoolValue;
|
||||
import static ru.vtosters.lite.utils.Preferences.newfeed;
|
||||
import static ru.vtosters.lite.utils.Preferences.milkshake;
|
||||
import static ru.vtosters.lite.utils.Preferences.postsrecomm;
|
||||
import static ru.vtosters.lite.utils.Preferences.useNewSettings;
|
||||
import static ru.vtosters.lite.utils.Preferences.vkme;
|
||||
@@ -117,7 +117,7 @@ public class Newsfeed{
|
||||
if(isGroupAds(obj)) return false;
|
||||
|
||||
return !injectFiltersReposts(obj);
|
||||
}
|
||||
} // inject our filters to newsfeed, getpost and discover
|
||||
|
||||
public static boolean injectFiltersReposts(JSONObject obj){
|
||||
if(obj.optJSONArray("copy_history") == null) return false;
|
||||
@@ -135,11 +135,9 @@ public class Newsfeed{
|
||||
}
|
||||
|
||||
return isBadNew(Array);
|
||||
}
|
||||
} // get repost information and inject our text filters
|
||||
|
||||
private static boolean checkCopyright(JSONObject json) throws JSONException{
|
||||
var linkfilter = getPrefsValue("linkfilter");
|
||||
|
||||
if(json.opt("copyright") != null){
|
||||
var copyright = json.getJSONObject("copyright");
|
||||
var copyrightlink = copyright.getString("link");
|
||||
@@ -149,9 +147,7 @@ public class Newsfeed{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return copyright_post();
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -250,7 +246,7 @@ public class Newsfeed{
|
||||
}
|
||||
switch(getPrefsValue("start_values")) {
|
||||
case "newsfeed":
|
||||
return newfeed() ? HomeFragment.class : NewsfeedFragment.class;
|
||||
return milkshake() ? HomeFragment.class : NewsfeedFragment.class;
|
||||
case "messenger":
|
||||
return DialogsFragment.class;
|
||||
case "groups":
|
||||
|
||||
@@ -2,9 +2,9 @@ package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
|
||||
public class OnlineFormatter {
|
||||
public class OnlineFormatter{
|
||||
public static String getAppName(int appid){ // thanks to egormetlitsky (vk mp3 mod) for helping with online ids
|
||||
switch (appid) {
|
||||
switch(appid) {
|
||||
case 2274003:
|
||||
return "Android";
|
||||
case 6328039:
|
||||
@@ -86,7 +86,7 @@ public class OnlineFormatter {
|
||||
public static String getOnline(int appid){
|
||||
var appname = getAppName(appid);
|
||||
|
||||
if (appname == null) return null;
|
||||
if(appname == null) return null;
|
||||
|
||||
return getString("custom_online") + " " + appname;
|
||||
}
|
||||
|
||||
@@ -7,10 +7,7 @@ import static ru.vtosters.lite.utils.CacheUtils.getInstance;
|
||||
import static ru.vtosters.lite.utils.Globals.edit;
|
||||
import static ru.vtosters.lite.utils.Globals.fixGapps;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getIdentifier;
|
||||
import static ru.vtosters.lite.utils.Globals.getPrefsValue;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Globals.getStringDate;
|
||||
import static ru.vtosters.lite.utils.Globals.getUserId;
|
||||
import static ru.vtosters.lite.utils.Globals.registerActivities;
|
||||
import static ru.vtosters.lite.utils.Newsfeed.setupFilters;
|
||||
@@ -20,7 +17,6 @@ import static ru.vtosters.lite.utils.SignatureChecker.validateAppSignature;
|
||||
import static ru.vtosters.lite.utils.Themes.isDarkTheme;
|
||||
import static ru.vtosters.lite.utils.Themes.systemThemeChanger;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
@@ -32,9 +28,6 @@ import com.vtosters.lite.data.Users;
|
||||
import com.vtosters.lite.fragments.SettingsListFragment;
|
||||
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import ru.vtosters.lite.ui.fragments.VTSettings;
|
||||
|
||||
@@ -163,10 +156,6 @@ public class Preferences{
|
||||
return getBoolValue("VKUI_INJ", true);
|
||||
}
|
||||
|
||||
public static boolean benchmark(){
|
||||
return getBoolValue("benchmark", false);
|
||||
}
|
||||
|
||||
public static boolean calls(){
|
||||
return getBoolValue("calls", false);
|
||||
}
|
||||
@@ -175,10 +164,6 @@ public class Preferences{
|
||||
return getBoolValue("convUsersOnline", false);
|
||||
}
|
||||
|
||||
public static boolean darkmode(){
|
||||
return getBoolValue("darkmode", true);
|
||||
}
|
||||
|
||||
public static boolean dev(){
|
||||
return getBoolValue("dev", false);
|
||||
}
|
||||
@@ -195,10 +180,6 @@ public class Preferences{
|
||||
return getBoolValue("dns", false);
|
||||
}
|
||||
|
||||
public static boolean libverify(){
|
||||
return getBoolValue("libverify", false);
|
||||
}
|
||||
|
||||
public static boolean dnt(){
|
||||
return getBoolValue("dnt", true);
|
||||
}
|
||||
@@ -251,10 +232,6 @@ public class Preferences{
|
||||
return getBoolValue("iconvk", false);
|
||||
}
|
||||
|
||||
public static boolean iconvkru(){
|
||||
return getBoolValue("iconvkru", false);
|
||||
}
|
||||
|
||||
public static boolean isMusicRestricted(){
|
||||
return getBoolValue("isMusicRestricted", false);
|
||||
}
|
||||
@@ -263,10 +240,6 @@ public class Preferences{
|
||||
return getBoolValue("navbar", true);
|
||||
}
|
||||
|
||||
public static boolean newfeed(){
|
||||
return getBoolValue("newfeed", true);
|
||||
}
|
||||
|
||||
public static boolean offline(){
|
||||
return getBoolValue("offline", false);
|
||||
}
|
||||
@@ -279,10 +252,6 @@ public class Preferences{
|
||||
return getBoolValue("postsrecomm", false);
|
||||
}
|
||||
|
||||
public static String readstatus(){
|
||||
return dnr() ? "messages.markAsRead" : "null";
|
||||
}
|
||||
|
||||
public static boolean refsfilter(){
|
||||
return getBoolValue("refsfilter", false);
|
||||
}
|
||||
@@ -340,10 +309,6 @@ public class Preferences{
|
||||
return getBoolValue("color_grishka", true);
|
||||
}
|
||||
|
||||
public static boolean vkme_msg(){
|
||||
return getBoolValue("vkme_msg", false);
|
||||
}
|
||||
|
||||
public static boolean vkme_notifs(){
|
||||
return getBoolValue("vkme_notifs", false);
|
||||
}
|
||||
@@ -373,31 +338,6 @@ public class Preferences{
|
||||
return isPrometheus(getUserId());
|
||||
}
|
||||
|
||||
public static String getLocale(){
|
||||
String string = getPrefsValue("lang_value");
|
||||
|
||||
if(string.equals("system")){
|
||||
return Locale.getDefault().getLanguage();
|
||||
}
|
||||
|
||||
return string.isEmpty() ? Locale.getDefault().getLanguage() : string;
|
||||
}
|
||||
|
||||
public static boolean fulltime(){
|
||||
return getPrefsValue("dateformat").equals("noyear") || getPrefsValue("dateformat").equals("full") || getPrefsValue("dateformat").equals("noseconds");
|
||||
}
|
||||
|
||||
public static String getDateFormat(){
|
||||
switch(getPrefsValue("dateformat")) {
|
||||
case "noyear":
|
||||
return getString("fulltime2");
|
||||
case "full":
|
||||
return getString("fulltime");
|
||||
default:
|
||||
return getString("fulltime3");
|
||||
}
|
||||
}
|
||||
|
||||
public static long getSizeForDelete(){
|
||||
switch(getPrefsValue("clearcache")) {
|
||||
case "100mb":
|
||||
@@ -420,22 +360,4 @@ public class Preferences{
|
||||
if(!getBoolValue("compressPhotos", true)) return 100;
|
||||
return origquality;
|
||||
}
|
||||
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
public static SimpleDateFormat setDateFormat(){
|
||||
return new SimpleDateFormat(getDateFormat());
|
||||
}
|
||||
|
||||
public static String getFormattedDate(boolean isFemale, long time){
|
||||
SimpleDateFormat date = new SimpleDateFormat(getDateFormat(), Locale.getDefault());
|
||||
|
||||
if(!fulltime()) return null;
|
||||
|
||||
try {
|
||||
return getStringDate(isFemale ? getIdentifier("last_seen_profile_f", "string") : getIdentifier("last_seen_profile_m", "string"), date.format(new Date(time)));
|
||||
} catch (Throwable th) {
|
||||
th.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import static ru.vtosters.lite.utils.About.getBuildNumber;
|
||||
import static ru.vtosters.lite.utils.Globals.getPrefsValue;
|
||||
import static ru.vtosters.lite.utils.Globals.getUserSecret;
|
||||
import static ru.vtosters.lite.utils.Globals.getUserToken;
|
||||
import static ru.vtosters.lite.utils.LocaleUtils.getLocale;
|
||||
import static ru.vtosters.lite.utils.Preferences.dev;
|
||||
import static ru.vtosters.lite.utils.Preferences.getLocale;
|
||||
import static ru.vtosters.lite.utils.Preferences.vksans;
|
||||
import static ru.vtosters.lite.utils.Proxy.proxy;
|
||||
import static ru.vtosters.lite.utils.Themes.isDarkTheme;
|
||||
|
||||
@@ -23,6 +23,8 @@ import okhttp3.Response;
|
||||
|
||||
public class ServerDialog{
|
||||
private static final OkHttpClient client = new OkHttpClient();
|
||||
public static Boolean showAlert;
|
||||
public static Activity activity;
|
||||
private static String title;
|
||||
private static String message;
|
||||
private static String positiveButton;
|
||||
@@ -32,10 +34,6 @@ public class ServerDialog{
|
||||
private static Boolean cancelable;
|
||||
private static Boolean isNotForVerified;
|
||||
|
||||
public static Boolean showAlert;
|
||||
|
||||
public static Activity activity;
|
||||
|
||||
public static void sendRequest(){
|
||||
if(getBoolValue("dialogrecomm", false)) return;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
public class SettBackup{
|
||||
|
||||
private static SharedPreferences getPrefs() {
|
||||
private static SharedPreferences getPrefs(){
|
||||
return getContext().getSharedPreferences("com.vtosters.lite_preferences", Context.MODE_PRIVATE);
|
||||
}
|
||||
|
||||
@@ -33,14 +33,14 @@ public class SettBackup{
|
||||
file.delete();
|
||||
}
|
||||
|
||||
public static void backupSettings() {
|
||||
public static void backupSettings(){
|
||||
// SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault());
|
||||
var dir = new File(getExternalStoragePublicDirectory(DIRECTORY_DOWNLOADS), "/VTLBackups/");
|
||||
var file = new File(dir,
|
||||
"Backup_"
|
||||
// + dateFormat.format(new Date())
|
||||
+ "test"
|
||||
+ ".xml");
|
||||
+ "test"
|
||||
+ ".xml");
|
||||
try {
|
||||
file.delete();
|
||||
FileWriter out = new FileWriter(file);
|
||||
@@ -53,79 +53,79 @@ public class SettBackup{
|
||||
}
|
||||
}
|
||||
|
||||
public static String getPrefContent() throws IOException {
|
||||
public static String getPrefContent() throws IOException{
|
||||
File prefsDir = new File(getContext().getFilesDir().getParentFile(), "shared_prefs");
|
||||
if (!prefsDir.exists())
|
||||
if(!prefsDir.exists())
|
||||
return null;
|
||||
File pref = new File(prefsDir, "com.vtosters.lite_preferences.xml");
|
||||
return new String(readFileFully(pref));
|
||||
}
|
||||
|
||||
public static void restoreBackup() throws IOException {
|
||||
public static void restoreBackup() throws IOException{
|
||||
SharedPreferences.Editor editor = getPrefs().edit();
|
||||
File dir = new File(getExternalStoragePublicDirectory(DIRECTORY_DOWNLOADS + "/VTLBackups/").getPath());
|
||||
File pref = new File(dir, "Backup_test.xml");
|
||||
Scanner scanner = new Scanner(new String(readFileFully(pref)));
|
||||
while (scanner.hasNextLine()) {
|
||||
while(scanner.hasNextLine()) {
|
||||
String line = scanner.nextLine().trim();
|
||||
if (line.contains("<?xml") || line.contains("<map>") || line.contains("</map>"))
|
||||
if(line.contains("<?xml") || line.contains("<map>") || line.contains("</map>"))
|
||||
continue;
|
||||
if (line.startsWith("<set")) {
|
||||
if(line.startsWith("<set")){
|
||||
Pattern pattern = Pattern.compile("<set.+name=\"(.+)\">");
|
||||
Matcher matcher = pattern.matcher(line);
|
||||
if (!matcher.find()) continue;
|
||||
if(!matcher.find()) continue;
|
||||
String name = matcher.group(1);
|
||||
Set<String> set = new HashSet<>();
|
||||
String _line;
|
||||
while (!(_line = scanner.nextLine().trim()).equals("</set>")) {
|
||||
while(!(_line = scanner.nextLine().trim()).equals("</set>")) {
|
||||
set.add(_line.substring(_line.indexOf(">") + 1, _line.lastIndexOf("<")));
|
||||
}
|
||||
editor.putStringSet(name, set)
|
||||
.commit();
|
||||
if (!Preferences.dev()) continue;
|
||||
Log.d("Prefs", "Append " + name + " : " + set.toString());
|
||||
} else if (line.startsWith("<")){
|
||||
if(!Preferences.dev()) continue;
|
||||
Log.d("Prefs", "Append " + name + " : " + set);
|
||||
} else if(line.startsWith("<")){
|
||||
Pattern pattern = Pattern.compile("^<(.+) name=\"(.+)\">(.+)</.+>$");
|
||||
Matcher matcher = pattern.matcher(line);
|
||||
String type = "", name = "", value = "";
|
||||
if (!matcher.find()) {
|
||||
if(!matcher.find()){
|
||||
pattern = Pattern.compile("^<(.+) name=\"(.+?)\" value=\"(.+?)\" />$");
|
||||
matcher = pattern.matcher(line);
|
||||
if (!matcher.find()) continue;
|
||||
if(!matcher.find()) continue;
|
||||
}
|
||||
type = matcher.group(1);
|
||||
name = matcher.group(2);
|
||||
value = matcher.group(3);
|
||||
if (type.equals("string"))
|
||||
if(type.equals("string"))
|
||||
editor.putString(
|
||||
name,
|
||||
value
|
||||
).commit();
|
||||
else if (type.equals("boolean"))
|
||||
else if(type.equals("boolean"))
|
||||
editor.putBoolean(
|
||||
name,
|
||||
Boolean.parseBoolean(value)
|
||||
).commit();
|
||||
else if (type.equals("float"))
|
||||
else if(type.equals("float"))
|
||||
editor.putFloat(
|
||||
name,
|
||||
Float.parseFloat(value)
|
||||
).commit();
|
||||
else if (type.equals("int"))
|
||||
else if(type.equals("int"))
|
||||
editor.putInt(
|
||||
name,
|
||||
Integer.parseInt(value)
|
||||
).commit();
|
||||
else if (type.equals("long"))
|
||||
else if(type.equals("long"))
|
||||
editor.putLong(
|
||||
name,
|
||||
Long.parseLong(value)
|
||||
).commit();
|
||||
if (!Preferences.dev()) continue;
|
||||
if(!Preferences.dev()) continue;
|
||||
Log.d("Prefs", "Append " + name + " : " + value);
|
||||
}
|
||||
}
|
||||
if (!Preferences.dev()) return;
|
||||
if(!Preferences.dev()) return;
|
||||
File prefsDir = new File(getContext().getFilesDir().getParentFile(), "shared_prefs");
|
||||
File file = new File(prefsDir, "com.vtosters.lite_preferences.xml");
|
||||
Log.d("TAG", new String(readFileFully(file)));
|
||||
|
||||
@@ -118,6 +118,7 @@ public class Toggles{
|
||||
case FEATURE_WISHLIST_MY_PROFILE:
|
||||
case FEATURE_MILKSHAKE_FORCE_DISABLED:
|
||||
case FEATURE_MILKSHAKE_ACTIVATION_DISABLED:
|
||||
case EXPERIMENT_NEWS_DISABLE_CACHE:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
@@ -143,6 +144,8 @@ public class Toggles{
|
||||
return postsredesign();
|
||||
case FEATURE_IMAGE_QUALITY_UPGRADE:
|
||||
return getBoolValue("compressPhotos", true);
|
||||
case FEATURE_MUSIC_STOP_PLAYER_ON_TASK_REMOVAL:
|
||||
return getBoolValue("musictask", false);
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#This file is automatically generated by Crashlytics to uniquely
|
||||
#identify individual builds of your Android application.
|
||||
#
|
||||
#Do NOT modify, delete, or commit to source control!
|
||||
#
|
||||
#Fri Mar 20 23:54:55 MSK 2020
|
||||
version_name=5.56.1
|
||||
package_name=com.vkontakte.android
|
||||
build_id=11b1e7dc-3974-4ec4-8d5f-da161bcbc268
|
||||
version_code=4838
|
||||
app_name=VK
|
||||
@@ -26,11 +26,6 @@
|
||||
android:defaultValue="false"
|
||||
android:key="vksans"
|
||||
android:title="@string/debug_experimental_vk_sans_font" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="libverify"
|
||||
android:summary="@string/debug_experimental_libverify_summary"
|
||||
android:title="@string/debug_experimental_libverify" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="opusmodule"
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory android:title="@string/interfacenewsfeed">
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="newfeed"
|
||||
android:summary="@string/altnewsfeedsum"
|
||||
android:title="@string/altnewsfeed" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="stories"
|
||||
@@ -16,24 +11,6 @@
|
||||
android:key="swipe"
|
||||
android:title="@string/interfacenewsfeedswipe" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="Toggles test">
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="milkshake"
|
||||
android:title="milkshake" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="superapp"
|
||||
android:title="superapp" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="musicnewcatalog"
|
||||
android:title="musicnewcatalog" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="postsredesign"
|
||||
android:title="postsredesign" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/interfaceglobal">
|
||||
<com.vtosters.lite.ui.SummaryListPreference
|
||||
android:defaultValue="newsfeed"
|
||||
@@ -80,6 +57,11 @@
|
||||
android:title="@string/interfacevideorec" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/vtlother">
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="superapp"
|
||||
android:summary="Новый вид меню как в новых версиях ВКонтакте"
|
||||
android:title="Супераппы" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="showmenu"
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
android:key="voice"
|
||||
android:summary="@string/vtlvoicesummary"
|
||||
android:title="@string/vtlvoice" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="roundedmsgs"
|
||||
android:title="@string/roundedmsgs" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/sett_media">
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
|
||||
@@ -17,4 +17,14 @@
|
||||
android:key="libvkx_integration"
|
||||
android:title="@string/vkx_integration" />
|
||||
</PreferenceCategory>
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="musictask"
|
||||
android:summary="Останаливать музыку после остановки процесса приложения"
|
||||
android:title="Остановка музыки" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="musicnewcatalog"
|
||||
android:summary="Новый каталог музыкального раздела с динамическим контентом. Возможны пропажи некоторорых существующих разделов тк каталоги ещё не доработаны"
|
||||
android:title="Новый раздел музыки (beta)" />
|
||||
</PreferenceScreen>
|
||||
@@ -44,6 +44,12 @@
|
||||
android:key="restoreprefs"
|
||||
android:title="Restore prefs" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="Toggles test">
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="postsredesign"
|
||||
android:title="postsredesign" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/vtverify">
|
||||
<Preference
|
||||
android:enabled="false"
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceCategory android:title="@string/vtlthemes">
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="milkshake"
|
||||
android:summary="Глобальный редизайн ВКонтакте"
|
||||
android:title="milkshake" />
|
||||
<Preference
|
||||
android:enabled="false"
|
||||
android:summary="@string/appearance_theme_info_summary"
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
.method private final a(ZJ)Ljava/lang/String;
|
||||
.locals 2
|
||||
|
||||
invoke-static {p1, p2, p3}, Lru/vtosters/lite/utils/Preferences;->getFormattedDate(ZJ)Ljava/lang/String;
|
||||
invoke-static {p1, p2, p3}, Lru/vtosters/lite/utils/LocaleUtils;->getFormattedDate(ZJ)Ljava/lang/String;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@
|
||||
|
||||
invoke-direct {p1, v0}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->setDateFormat()Ljava/text/SimpleDateFormat;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/LocaleUtils;->setDateFormat()Ljava/text/SimpleDateFormat;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
|
||||
@@ -3016,7 +3016,7 @@
|
||||
|
||||
new-instance v0, Ljava/text/SimpleDateFormat;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->getDateFormat()Ljava/lang/String;
|
||||
invoke-static {}, Lru/vtosters/lite/utils/LocaleUtils;->getDateFormat()Ljava/lang/String;
|
||||
|
||||
move-result-object v3
|
||||
|
||||
@@ -3032,7 +3032,7 @@
|
||||
.param p0, "s" # I
|
||||
|
||||
.line 17
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->fulltime()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/LocaleUtils;->fulltime()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user