Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5c80b230a | ||
|
|
87ee01bac9 | ||
|
|
126ad044f2 | ||
|
|
b636648457 | ||
|
|
bf3672a8c4 | ||
|
|
e6478d5161 | ||
|
|
ddea78aa4b | ||
|
|
b872fb17b8 | ||
|
|
4ec2c17df1 | ||
|
|
38a51f48d0 | ||
|
|
838897611c | ||
|
|
f42150063c | ||
|
|
d164d1219d | ||
|
|
fb71b4d781 | ||
|
|
f338738c1e | ||
|
|
fb704c7388 | ||
|
|
c99bca4200 | ||
|
|
92f43acb80 | ||
|
|
a7c85a24f2 | ||
|
|
fe5616b3f7 | ||
|
|
5c882c5ce2 | ||
|
|
61a4ed43b9 | ||
|
|
b242ad7ae4 | ||
|
|
1b02e806f8 | ||
|
|
eaf23a24ba | ||
|
|
ce64296c01 | ||
|
|
6e3716fe01 | ||
|
|
dcdd83243b | ||
|
|
986ec2987c | ||
|
|
c98609db5d | ||
|
|
0b4e3c6303 | ||
|
|
bc3e5a706d | ||
|
|
0b56d9dd23 | ||
|
|
62ccdf8eba | ||
|
|
72f4226419 | ||
|
|
f6a45beac5 | ||
|
|
a657ddef58 | ||
|
|
726e38ff2e | ||
|
|
191d3f760e | ||
|
|
2cd3b0f39c | ||
|
|
abd990eef7 | ||
|
|
cd875af7d7 | ||
|
|
b1e8f93371 | ||
|
|
64afd0222b | ||
|
|
32369f1f38 | ||
|
|
f00be506cc | ||
|
|
248fd1ce9c | ||
|
|
3e2d4bb665 | ||
|
|
92689941ca | ||
|
|
c46110cfea | ||
|
|
b5250e0b8d | ||
|
|
0e81397305 | ||
|
|
95d306eaed | ||
|
|
339a4fe01f | ||
|
|
48cdbc7681 | ||
|
|
5e85ba10f4 | ||
|
|
ea7dd7aba5 |
@@ -15007,7 +15007,7 @@ public final class R {
|
||||
public static final int dockbar_save = 0x7f11123b;
|
||||
public static final int dockbar_selected_items = 0x7f11123c;
|
||||
public static final int dockbar_unselected_items = 0x7f11123d;
|
||||
public static final int download_latest_vtl = 0x7f11123e;
|
||||
public static final int checkforupdates = 0x7f11123e;
|
||||
public static final int other_fix_dynamic_colors = 0x7f11123f;
|
||||
public static final int other_reset_settings = 0x7f111240;
|
||||
public static final int other_reset_settings_summary = 0x7f111241;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package ru.vtosters.lite.audio.gcm;
|
||||
|
||||
import static ru.vtosters.lite.audio.gcm.NewGcmFix.FixToken;
|
||||
import static ru.vtosters.lite.audio.gcm.NewGcmFix.FixToken2;
|
||||
import static ru.vtosters.lite.utils.Preferences.VKVersion;
|
||||
import static ru.vtosters.lite.utils.Preferences.VKVersionBuild;
|
||||
import static ru.vtosters.lite.utils.Preferences.musicFixNew;
|
||||
|
||||
import android.os.Build;
|
||||
import android.util.Base64;
|
||||
@@ -38,7 +41,14 @@ public class GCMFix {
|
||||
genNewKey();
|
||||
}
|
||||
|
||||
public static String requestTokenV2(){
|
||||
return FixToken2();
|
||||
}
|
||||
|
||||
public static String requestToken() {
|
||||
if(musicFixNew()){
|
||||
return FixToken();
|
||||
}
|
||||
String xappide;
|
||||
try {
|
||||
String[] aidarr = {"3974055026275073921", "4418584909973341826", "4585634953328772978"};
|
||||
@@ -71,7 +81,7 @@ public class GCMFix {
|
||||
Thread.sleep(100);
|
||||
}
|
||||
String token = sb.toString();
|
||||
if (token.equals("EGISTRATION_ERROR")) {
|
||||
if (token.equals("REGISTRATION_ERROR")) {
|
||||
return requestToken();
|
||||
}
|
||||
rid = 0;
|
||||
@@ -79,12 +89,7 @@ public class GCMFix {
|
||||
String sig2 = getSig(pub22);
|
||||
params.clear();
|
||||
fillParams(params, sig2, pub22, xappide, Long.parseLong(aid.split(" ")[1].split(":")[0]), true);
|
||||
doRequest("https://android.clients.google.com/c2dm/register3", "POST", params, aid, new Callback() {
|
||||
@Override
|
||||
public void doCallback(String str) {
|
||||
GCMFix.lambda$requestToken$1(str);
|
||||
}
|
||||
});
|
||||
doRequest("https://android.clients.google.com/c2dm/register3", "POST", params, aid, GCMFix::lambda$requestToken$1);
|
||||
return token;
|
||||
} catch (FileNotFoundException e2) {
|
||||
return requestToken();
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package ru.vtosters.lite.audio.gcm;
|
||||
|
||||
public class NewGcmFix { // @Leyzymoy is not gay, thank you my friend, sir...
|
||||
private static final short[] DATA = {835, 841, 841, 842, 771, 853, 771, 842, 771, 842, 859, 855, 832, 783, 846, 791, 852, 844, 855, 843, 770, 841, 842, 861, 845, 846, 851, 852, 777, 863, 778, 775, 775, 939, 951, 900, 934, 940, 905, 941, 935, 897, 935, 911, 935, 940, 931, 1015, 955, 916, 925, 900, 1015, 992, 939, 951, 900, 955, 940, 1020, 1019, 932, 916, 925, 903, 1016, 903, 909, 900, 1022, 916, 918, 896, 1022, 926, 922, 1022, 935, 936, 927, 992};
|
||||
|
||||
public static String FixToken() {
|
||||
short[] sArr = DATA;
|
||||
int hashCode = "۠ۡۦ".hashCode();
|
||||
int hashCode2 = "ۤۢۨ".hashCode();
|
||||
int hashCode3 = "ۦ۠ۤ".hashCode();
|
||||
return convert(sArr, ((hashCode2 ^ (-1)) & 1751594) | ((-1751595) & hashCode2), ((hashCode3 ^ (-1)) & 1753419) | ((-1753420) & hashCode3), ((hashCode ^ (-1)) & 1747007) | ((-1747008) & hashCode));
|
||||
}
|
||||
|
||||
public static String FixToken2() {
|
||||
short[] sArr = DATA;
|
||||
int hashCode = "ۦۧۢ".hashCode();
|
||||
int hashCode2 = "ۥ۟ۡ".hashCode();
|
||||
int hashCode3 = "ۣۤ۟".hashCode();
|
||||
return convert(sArr, ((hashCode2 ^ (-1)) & 1752486) | ((-1752487) & hashCode2), ((hashCode3 ^ (-1)) & 1751664) | ((-1751665) & hashCode3), ((hashCode ^ (-1)) & 1753487) | ((-1753488) & hashCode));
|
||||
}
|
||||
|
||||
private static String convert(short[] sArr, int i, int i2, int i3) {
|
||||
char[] cArr = new char[i2];
|
||||
for (int i4 = 0; i4 < i2; i4 = 1 - (0 - i4)) {
|
||||
short s = sArr[0 - ((0 - i) - i4)];
|
||||
cArr[i4] = (char) (((s ^ (-1)) & i3) | ((i3 ^ (-1)) & s));
|
||||
}
|
||||
return new String(cArr);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package ru.vtosters.lite.downloaders;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
|
||||
import android.app.DownloadManager;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.net.Uri;
|
||||
import android.os.Environment;
|
||||
|
||||
import com.vk.core.f.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import ru.vtosters.lite.ui.activities.APKInstallActivity;
|
||||
import ru.vtosters.lite.utils.Globals;
|
||||
|
||||
public class OTADownloader {
|
||||
|
||||
private static final BroadcastReceiver callback = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
var extras = intent.getExtras();
|
||||
if (extras == null
|
||||
|| !intent.getAction().equals(DownloadManager.ACTION_DOWNLOAD_COMPLETE)) return;
|
||||
|
||||
var query = new DownloadManager.Query();
|
||||
var id = extras.getLong(DownloadManager.EXTRA_DOWNLOAD_ID);
|
||||
query.setFilterById(id);
|
||||
var manager = (DownloadManager) Globals.getContext().getSystemService(Context.DOWNLOAD_SERVICE);
|
||||
var cursor = manager.query(query);
|
||||
if (cursor.moveToFirst()) {
|
||||
var status = cursor.getInt(cursor.getColumnIndex(DownloadManager.COLUMN_STATUS));
|
||||
if (status == DownloadManager.STATUS_SUCCESSFUL) {
|
||||
var downloadDir = new File(Environment.getExternalStorageDirectory(), "Download");
|
||||
if (!downloadDir.exists()) return;
|
||||
var list = downloadDir.listFiles();
|
||||
if (list == null || list.length == 0) return;
|
||||
var maxIndex = -1;
|
||||
for (File file : list) {
|
||||
var name = file.getAbsolutePath().substring(file.getAbsolutePath().lastIndexOf("/") + 1);
|
||||
if (file.isFile()
|
||||
&& name.matches("VTLite-\\d+\\.apk"))
|
||||
maxIndex = Math.max(maxIndex, Integer.parseInt(name.replaceFirst(".+-(\\d+).+", "$1")));
|
||||
}
|
||||
File apk = maxIndex == -1 ? new File(downloadDir, "VTLite.apk") : new File(downloadDir, "VTLite-" + maxIndex + ".apk");
|
||||
APKInstallActivity.installOta(context, FileUtils.h(apk));
|
||||
} else if (status == DownloadManager.STATUS_FAILED) {
|
||||
Globals.sendToast(getString("downloaderr"));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public static void downloadBuild(String url) {
|
||||
var context = Globals.getContext();
|
||||
var uri = Uri.parse(url);
|
||||
|
||||
context.registerReceiver(callback, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
|
||||
|
||||
var request = new DownloadManager.Request(uri);
|
||||
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
|
||||
request.setTitle("VTLite.apk");
|
||||
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, "VTLite.apk");
|
||||
|
||||
var manager = (DownloadManager) Globals.getContext().getSystemService(Context.DOWNLOAD_SERVICE);
|
||||
manager.enqueue(request);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -118,6 +118,19 @@ public class PreferencesUtil {
|
||||
fragment.ay().d(preference); // fragment.getPreferenceScreen().addPreference(preference)
|
||||
}
|
||||
|
||||
public static void addPreferenceDrawable(MaterialPreferenceToolbarFragment fragment, String key, CharSequence title, CharSequence summary, @Nullable Drawable icon, Preference.c listener) {
|
||||
Preference preference = new Preference(getContext());
|
||||
preference.b(summary); // setSummary
|
||||
preference.c(title); // setTitle
|
||||
preference.d(key); // setKey
|
||||
|
||||
if (icon != null)
|
||||
preference.a(icon); // preference.setIcon
|
||||
preference.a(listener); // preference.setOnPreferenceClickListener(listener)
|
||||
|
||||
fragment.ay().d(preference); // fragment.getPreferenceScreen().addPreference(preference)
|
||||
}
|
||||
|
||||
public static void addPreferenceCategory(MaterialPreferenceToolbarFragment fragment, CharSequence title) {
|
||||
PreferenceCategory preference = new PreferenceCategory(getContext(), null);
|
||||
preference.c(title); // setTitle
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
package ru.vtosters.lite.ui.activities;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.Settings;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.widget.Toast;
|
||||
|
||||
public class APKInstallActivity extends AppCompatActivity {
|
||||
public static final int REQUEST_INSTALL_PERMISSION = 1;
|
||||
|
||||
public static final String EXTRA_APK_URI = "apk_uri";
|
||||
|
||||
private Uri mApkUri;
|
||||
|
||||
public static void installOta(Context context, Uri apkUri) {
|
||||
Intent intent = new Intent(context, APKInstallActivity.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
intent.putExtra(EXTRA_APK_URI, apkUri);
|
||||
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
Intent intent = getIntent();
|
||||
if (intent == null) {
|
||||
Toast.makeText(this, "No intent", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
mApkUri = intent.getParcelableExtra(EXTRA_APK_URI);
|
||||
if (mApkUri == null) {
|
||||
Toast.makeText(this, "No apk uri", Toast.LENGTH_SHORT).show();
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
installApk();
|
||||
}
|
||||
|
||||
private void installApk() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
if (!getPackageManager().canRequestPackageInstalls()) {
|
||||
Intent permIntent = new Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES, Uri.parse("package:" + getPackageName()));
|
||||
startActivityForResult(permIntent, REQUEST_INSTALL_PERMISSION);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setDataAndType(mApkUri, "application/vnd.android.package-archive");
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
startActivity(intent);
|
||||
} catch (Exception e) {
|
||||
Toast.makeText(this, "Ошибка установки обновления " + e.getLocalizedMessage(), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
finish();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
||||
if (requestCode == REQUEST_INSTALL_PERMISSION)
|
||||
installApk();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package ru.vtosters.lite.ui.dialogs;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
|
||||
import android.app.Activity;
|
||||
|
||||
import ru.vtosters.lite.downloaders.OTADownloader;
|
||||
import ru.vtosters.lite.ui.vkui.ModalBottomSheetWrapper;
|
||||
import ru.vtosters.lite.utils.OTAHelper;
|
||||
|
||||
public class OTADialog implements OTAHelper.OTAListener {
|
||||
|
||||
private Activity mActivity;
|
||||
|
||||
private OTAHelper mHelper;
|
||||
|
||||
public static OTADialog checkUpdates(Activity activity) {
|
||||
return new OTADialog(activity);
|
||||
}
|
||||
|
||||
public OTADialog(Activity activity) {
|
||||
mActivity = activity;
|
||||
|
||||
mHelper = new OTAHelper(this);
|
||||
mHelper.loadData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateApplied() {
|
||||
mActivity.runOnUiThread(() -> {
|
||||
// Toast.makeText(mActivity, "Обновления найдены", Toast.LENGTH_SHORT).show();
|
||||
new ModalBottomSheetWrapper(mActivity)
|
||||
.setUpdateInfoView(mHelper.getNewVersionName(), mHelper.getUpdateDescription())
|
||||
.setPositiveButton(getString("updateanddownload"), () -> {
|
||||
OTADownloader.downloadBuild(mHelper.getDownloadUrl());
|
||||
})
|
||||
.show();
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateCanceled() {
|
||||
mActivity.runOnUiThread(() -> {
|
||||
// Toast.makeText(mActivity, "Обновлений не найдено", Toast.LENGTH_SHORT).show();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package ru.vtosters.lite.ui.dialogs;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.edit;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Preferences.getBoolValue;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.vk.navigation.Navigator;
|
||||
import com.vk.webapp.VKConnect;
|
||||
|
||||
public class VKIDProtection {
|
||||
public static void alert(final Activity activity) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
|
||||
builder.setTitle(getString("debug_warning"));
|
||||
builder.setMessage(getString("vkidsumm"));
|
||||
builder.setCancelable(false);
|
||||
// android.content.DialogInterface.OnClickListener
|
||||
builder.setPositiveButton(getString("startbtn2"), (dialogInterface, i) -> edit().putBoolean("showAlertVkId", false).apply());
|
||||
// android.content.DialogInterface.OnClickListener
|
||||
builder.setNeutralButton(getString("vkiddisable"), (dialogInterface, i) -> {
|
||||
edit().putBoolean("showAlertVkId", false).apply();
|
||||
Intent a2 = new Navigator(VKConnect.class).a(activity);
|
||||
activity.startActivity(a2);
|
||||
});
|
||||
if (getBoolValue("showAlertVkId", true)) {
|
||||
builder.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,10 +21,10 @@ public class FeedFragment extends MaterialPreferenceToolbarFragment {
|
||||
}
|
||||
|
||||
private void prefs() {
|
||||
a("officialnewssett").a(new FeedFragment.openofficialsett());
|
||||
a("officialnewssett").a(new openofficialsett());
|
||||
}
|
||||
|
||||
public class openofficialsett implements Preference.c {
|
||||
public static class openofficialsett implements Preference.c {
|
||||
openofficialsett() {
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
package ru.vtosters.lite.ui.fragments;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Globals.restartApplicationWithTimer;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.preference.Preference;
|
||||
|
||||
import com.vk.core.util.ToastUtils;
|
||||
import com.vtosters.lite.R;
|
||||
import com.vtosters.lite.fragments.MaterialPreferenceToolbarFragment;
|
||||
|
||||
@@ -18,16 +17,20 @@ public class InterfaceFragment extends MaterialPreferenceToolbarFragment {
|
||||
}
|
||||
|
||||
private void prefs() {
|
||||
a("newfeed").a(new a());
|
||||
a("newfeed").a(new restart());
|
||||
a("dateformat").a(new restart());
|
||||
a("stories").a(new restart());
|
||||
a("swipe").a(new restart());
|
||||
a("dockcounter").a(new restart());
|
||||
}
|
||||
|
||||
public boolean restart(Preference preference, Object obj) {
|
||||
ToastUtils.a(getString("restartapp"));
|
||||
restartApplicationWithTimer();
|
||||
return true;
|
||||
}
|
||||
|
||||
public class a implements Preference.b {
|
||||
a() {
|
||||
public class restart implements Preference.b {
|
||||
restart() {
|
||||
}
|
||||
|
||||
@Override // android.support.v7.preference.Preference.b
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
package ru.vtosters.lite.ui.fragments;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.deleteCache;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.restartApplicationWithTimer;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.preference.Preference;
|
||||
|
||||
import com.vtosters.lite.R;
|
||||
import com.vtosters.lite.fragments.MaterialPreferenceToolbarFragment;
|
||||
@@ -10,5 +17,49 @@ public class MessagesFragment extends MaterialPreferenceToolbarFragment {
|
||||
public void b(Bundle bundle) {
|
||||
super.b(bundle);
|
||||
a(R.xml.preferences_messages);
|
||||
prefs();
|
||||
}
|
||||
|
||||
private void prefs() {
|
||||
a("vkme").a(new MessagesFragment.restart());
|
||||
a("vkme_notifs").a(new MessagesFragment.restart());
|
||||
a("isBGStickersEnabled").a(new MessagesFragment.clearCache());
|
||||
a("roundedmsgs").a(new MessagesFragment.restart());
|
||||
a("systememoji").a(new MessagesFragment.restart());
|
||||
}
|
||||
|
||||
public boolean restart(Preference preference, Object obj) {
|
||||
restartApplicationWithTimer();
|
||||
return true;
|
||||
}
|
||||
|
||||
public class restart implements Preference.b {
|
||||
restart() {
|
||||
}
|
||||
|
||||
@Override // android.support.v7.preference.Preference.b
|
||||
public boolean a(Preference preference, Object obj) {
|
||||
return MessagesFragment.this.restart(preference, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean clearCache(Preference preference, Object obj) {
|
||||
SharedPreferences prefs = getContext().getSharedPreferences("stickers", Context.MODE_PRIVATE);
|
||||
SharedPreferences prefs2 = getContext().getSharedPreferences("stickers_storage", Context.MODE_PRIVATE);
|
||||
prefs.edit().clear().commit();
|
||||
prefs2.edit().clear().commit();
|
||||
deleteCache();
|
||||
restartApplicationWithTimer();
|
||||
return true;
|
||||
}
|
||||
|
||||
public class clearCache implements Preference.b {
|
||||
clearCache() {
|
||||
}
|
||||
|
||||
@Override // android.support.v7.preference.Preference.b
|
||||
public boolean a(Preference preference, Object obj) {
|
||||
return MessagesFragment.this.restart(preference, obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
package ru.vtosters.lite.ui.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.preference.Preference;
|
||||
|
||||
import com.vk.navigation.Navigator;
|
||||
import com.vk.webapp.VKConnect;
|
||||
import com.vtosters.lite.R;
|
||||
import com.vtosters.lite.fragments.MaterialPreferenceToolbarFragment;
|
||||
|
||||
@@ -10,5 +17,23 @@ public class MusicFragment extends MaterialPreferenceToolbarFragment {
|
||||
public void b(Bundle bundle) {
|
||||
super.b(bundle);
|
||||
a(R.xml.preferences_music);
|
||||
prefs();
|
||||
}
|
||||
|
||||
private void prefs() {
|
||||
a("vkid_warn").a(new MusicFragment.openvkid());
|
||||
}
|
||||
|
||||
public static class openvkid implements Preference.c {
|
||||
openvkid() {
|
||||
}
|
||||
|
||||
@Override // android.support.v7.preference.Preference.c
|
||||
public boolean a(Preference preference) {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(VKConnect.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package ru.vtosters.lite.ui.fragments;
|
||||
|
||||
import static android.widget.Toast.LENGTH_SHORT;
|
||||
import static android.widget.Toast.makeText;
|
||||
import static ru.vtosters.lite.utils.Globals.deleteCache;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Globals.getUserToken;
|
||||
@@ -68,24 +69,27 @@ public class OtherFragment extends MaterialPreferenceToolbarFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public class e implements Preference.c {
|
||||
public static class e implements Preference.c {
|
||||
e() {
|
||||
}
|
||||
|
||||
@Override // android.support.v7.preference.Preference.c
|
||||
public boolean a(Preference preference) {
|
||||
SharedPreferences prefs = getContext().getSharedPreferences("stickers", Context.MODE_PRIVATE);
|
||||
SharedPreferences prefs2 = getContext().getSharedPreferences("stickers_storage", Context.MODE_PRIVATE);
|
||||
prefs.edit().clear().commit();
|
||||
prefs2.edit().clear().commit();
|
||||
VKImageLoader.b();
|
||||
ImEngineProvider.a().h();
|
||||
AudioMessageUtils.j();
|
||||
FileUtils.l();
|
||||
deleteCache();
|
||||
ToastUtils.a(getString("cachecleaned"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class b implements Preference.c {
|
||||
public static class b implements Preference.c {
|
||||
b() {
|
||||
}
|
||||
|
||||
@@ -96,7 +100,7 @@ public class OtherFragment extends MaterialPreferenceToolbarFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public class d implements Preference.c {
|
||||
public static class d implements Preference.c {
|
||||
d() {
|
||||
}
|
||||
|
||||
@@ -126,20 +130,23 @@ public class OtherFragment extends MaterialPreferenceToolbarFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public class f implements Preference.c {
|
||||
public static class f implements Preference.c {
|
||||
f() {
|
||||
}
|
||||
|
||||
@Override // android.support.v7.preference.Preference.c
|
||||
public boolean a(Preference preference) {
|
||||
SharedPreferences prefs = getContext().getSharedPreferences("stickers", Context.MODE_PRIVATE);
|
||||
SharedPreferences prefs2 = getContext().getSharedPreferences("stickers_storage", Context.MODE_PRIVATE);
|
||||
prefs.edit().clear().commit();
|
||||
restartApplication();
|
||||
prefs2.edit().clear().commit();
|
||||
deleteCache();
|
||||
ToastUtils.a(getString("cachecleaned"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class deleteprefs implements Preference.c {
|
||||
public static class deleteprefs implements Preference.c {
|
||||
deleteprefs() {
|
||||
}
|
||||
|
||||
@@ -151,7 +158,7 @@ public class OtherFragment extends MaterialPreferenceToolbarFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public class saveprefs implements Preference.c {
|
||||
public static class saveprefs implements Preference.c {
|
||||
saveprefs() {
|
||||
}
|
||||
|
||||
@@ -162,7 +169,7 @@ public class OtherFragment extends MaterialPreferenceToolbarFragment {
|
||||
}
|
||||
}
|
||||
|
||||
public class restoreprefs implements Preference.c {
|
||||
public static class restoreprefs implements Preference.c {
|
||||
restoreprefs() {
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package ru.vtosters.lite.ui.fragments;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.componentSwitcher;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Globals.restartApplicationWithTimer;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.preference.Preference;
|
||||
@@ -34,14 +35,15 @@ public class ThemesFragment extends MaterialPreferenceToolbarFragment {
|
||||
|
||||
private void prefs() {
|
||||
a("iconvk").a(new a());
|
||||
a("darktheme").a(new b());
|
||||
a("lighttheme").a(new b());
|
||||
a("darktheme").a(new restart());
|
||||
a("lighttheme").a(new restart());
|
||||
a("navbar").a(new restart());
|
||||
}
|
||||
|
||||
public static class b implements Preference.b {
|
||||
public static class restart implements Preference.b {
|
||||
@Override // android.support.v7.preference.Preference.b
|
||||
public boolean a(Preference preference, Object obj) {
|
||||
ToastUtils.a(getString("restartapp"));
|
||||
restartApplicationWithTimer();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,400 @@
|
||||
package ru.vtosters.lite.ui.fragments;
|
||||
|
||||
import static bruhcollective.itaysonlab.libvkx.client.LibVKXClient.isIntegrationEnabled;
|
||||
import static ru.vtosters.lite.f0x1d.VTVerifications.vtverif;
|
||||
import static ru.vtosters.lite.ui.fragments.multiaccount.MultiAccountManager.getAccountPrefsCount;
|
||||
import static ru.vtosters.lite.ui.fragments.multiaccount.MultiAccountManager.getCurrentAccount;
|
||||
import static ru.vtosters.lite.ui.fragments.multiaccount.MultiAccountManager.withRegex;
|
||||
import static ru.vtosters.lite.ui.fragments.multiaccount.MultiAccountManager.workingAccounts;
|
||||
import static ru.vtosters.lite.utils.About.getBuildNumber;
|
||||
import static ru.vtosters.lite.utils.About.getCommitLink;
|
||||
import static ru.vtosters.lite.utils.Globals.drawableFromUrl;
|
||||
import static ru.vtosters.lite.utils.Globals.edit;
|
||||
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.getUserId;
|
||||
import static ru.vtosters.lite.utils.Globals.isGmsInstalled;
|
||||
import static ru.vtosters.lite.utils.Globals.restartApplicationWithTimer;
|
||||
import static ru.vtosters.lite.utils.Preferences.ads;
|
||||
import static ru.vtosters.lite.utils.Preferences.devmenu;
|
||||
import static ru.vtosters.lite.utils.Preferences.disableSettingsSumms;
|
||||
import static ru.vtosters.lite.utils.Preferences.hasSpecialVerif;
|
||||
import static ru.vtosters.lite.utils.Preferences.isValidSignature;
|
||||
import static ru.vtosters.lite.utils.Preferences.navbar;
|
||||
import static ru.vtosters.lite.utils.Preferences.offline;
|
||||
import static ru.vtosters.lite.utils.Preferences.shortinfo;
|
||||
import static ru.vtosters.lite.utils.Preferences.vkme;
|
||||
import static ru.vtosters.lite.utils.Themes.applyTheme;
|
||||
import static ru.vtosters.lite.utils.Themes.getDarkTheme;
|
||||
import static ru.vtosters.lite.utils.Themes.getImDarkTheme;
|
||||
import static ru.vtosters.lite.utils.Themes.getImLightTheme;
|
||||
import static ru.vtosters.lite.utils.Themes.getLightTheme;
|
||||
import static ru.vtosters.lite.utils.Themes.setTheme;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.aefyr.tsg.g2.TelegramStickersService;
|
||||
import com.vk.about.AboutAppFragment;
|
||||
import com.vk.identity.fragments.IdentityListFragment;
|
||||
import com.vk.navigation.Navigator;
|
||||
import com.vk.notifications.settings.NotificationsSettingsFragment;
|
||||
import com.vk.webapp.Bugs;
|
||||
import com.vk.webapp.PrivacyFragment;
|
||||
import com.vk.webapp.SSFS;
|
||||
import com.vk.webapp.VKConnect;
|
||||
import com.vtosters.lite.auth.VKAccountManager;
|
||||
import com.vtosters.lite.fragments.MaterialPreferenceToolbarFragment;
|
||||
import com.vtosters.lite.fragments.SettingsAccountFragment;
|
||||
import com.vtosters.lite.fragments.SettingsDebugFragment;
|
||||
import com.vtosters.lite.fragments.SettingsGeneralFragment;
|
||||
import com.vtosters.lite.fragments.k.BlacklistFragment;
|
||||
import com.vtosters.lite.fragments.money.music.control.subscription.MusicSubscriptionControlFragment;
|
||||
|
||||
import ru.vtosters.lite.ui.PreferencesUtil;
|
||||
import ru.vtosters.lite.ui.dialogs.OTADialog;
|
||||
import ru.vtosters.lite.ui.fragments.dockbar.DockBarFragment;
|
||||
import ru.vtosters.lite.ui.fragments.dockbar.DockBarManager;
|
||||
import ru.vtosters.lite.ui.fragments.multiaccount.MultiAccountFragment;
|
||||
import ru.vtosters.lite.ui.fragments.tgstickers.StickersFragment;
|
||||
|
||||
public class VTSettings extends MaterialPreferenceToolbarFragment {
|
||||
|
||||
@Override
|
||||
public void b(Bundle bundle) {
|
||||
super.b(bundle);
|
||||
|
||||
String keyVKAccount = getCurrentAccount().getString("key_vk_account", "");
|
||||
String avatarUrl = withRegex(keyVKAccount, ".*\"photo\":\\{.*?:\"(.*?)\"\\}.*", "https://vk.com/images/camera_200.png").replace("\\/", "/");
|
||||
String name = withRegex(keyVKAccount, ".*\"name\":\\{.*?:\"(.*?)\"\\}.*", "");
|
||||
String id = "@id" + getUserId();
|
||||
|
||||
String feedsumm = getValAsString("vtlfeedsumm", ads());
|
||||
String docksumm = getDocksumm();
|
||||
String musicsumm = getValAsString("vtlmusicsumm", isIntegrationEnabled());
|
||||
String msgsumm = getValAsString("vtlmsgsumm", vkme());
|
||||
String activitysumm = getValAsString("vtlactivitysumm", !offline());
|
||||
String themessumm = getValAsString("vtlthemessumm", navbar());
|
||||
String tgssumm = getTGSsumm();
|
||||
String interfacesumm = getValAsString("vtlinterfacesumm", shortinfo());
|
||||
String proxysumm = getValAsString("vtlproxysumm", !getPrefsValue("proxy").equals("noproxy"));
|
||||
String othersumm = getValAsString("vtlothersumm", vtverif());
|
||||
String multiaccsumm = getMultiAccsumm();
|
||||
String ssfs = getSSFSsumm();
|
||||
String about = "Commit: " + getBuildNumber();
|
||||
|
||||
int vtosterXml = getIdentifier("empty", "xml");
|
||||
this.a(vtosterXml);
|
||||
|
||||
if (vkme()) {
|
||||
PreferencesUtil.addPreferenceDrawable(this, "", name, id, drawableFromUrl(avatarUrl), preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(MultiAccountFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
} else {
|
||||
PreferencesUtil.addPreference(this, "", getString("accounts"), multiaccsumm, "ic_user_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(MultiAccountFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreferenceCategory(this, getString("vtsettdarktheme"));
|
||||
}
|
||||
|
||||
PreferencesUtil.addMaterialSwitchPreference(this, "isdark", getString("vtsettdarktheme"), "", "ic_palette_24", false, (preference, o) -> {
|
||||
boolean value = (boolean) o;
|
||||
|
||||
if(value){
|
||||
applyTheme(getLightTheme(), getImLightTheme());
|
||||
} else {
|
||||
applyTheme(getDarkTheme(), getImDarkTheme());
|
||||
}
|
||||
|
||||
edit().putBoolean("isdark", value).commit();
|
||||
|
||||
setTheme(this.p());
|
||||
|
||||
restartApplicationWithTimer();
|
||||
return true;
|
||||
});
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 28) {
|
||||
PreferencesUtil.addMaterialSwitchPreference(this, "systemtheme", getString("appearance_theme_use_system"), getString("appearance_theme_use_system_summary"), "ic_recent_24", true, (preference, o) -> {
|
||||
boolean value = (boolean) o;
|
||||
|
||||
edit().putBoolean("systemtheme", value).commit();
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
if (!isGmsInstalled()) {
|
||||
PreferencesUtil.addPreference(this, "", getString("installgms"), "", "ic_alert", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(InstallGMSFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
if(devmenu()){
|
||||
PreferencesUtil.addPreferenceCategory(this, getString("sett_debug"));
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("sett_debug"), "", "ic_bug_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(SettingsDebugFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addMaterialSwitchPreference(this, "ssl", getString("debug_developer_force_ssl"), getString("debug_developer_force_ssl_summary"), "ic_globe_24", true, (preference, o) -> {
|
||||
boolean value = (boolean) o;
|
||||
edit().putBoolean("ssl", value).commit();
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
PreferencesUtil.addPreferenceCategory(this, getString("vtsettaccount"));
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("vkconnect"), "", "ic_tags_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(VKConnect.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("privacy_settings"), "", "ic_privacy_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(PrivacyFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("sett_account"), "", "ic_user_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(SettingsAccountFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("bugs"), "", "ic_bug_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(Bugs.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("vtssfs"), ssfs, "ic_link_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(SSFS.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreferenceCategory(this, getString("notification_settings"));
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("sett_general"), "", "ic_settings_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(SettingsGeneralFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("blacklist"), "", "ic_users_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(BlacklistFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("sett_notifications"), "", "ic_notification_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(NotificationsSettingsFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
if (VKAccountManager.b().isRealMusicSubs()) {
|
||||
PreferencesUtil.addPreference(this, "", getString("subscription_music"), "", "ic_music_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(MusicSubscriptionControlFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
if (VKAccountManager.b().ar()) {
|
||||
PreferencesUtil.addPreference(this, "", getString("identity_title"), "", "ic_services_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(IdentityListFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
PreferencesUtil.addPreferenceCategory(this, getString("vtsettmod"));
|
||||
|
||||
if (!vkme()) {
|
||||
PreferencesUtil.addPreference(this, "", getString("vtlfeed"), feedsumm, "ic_newsfeed_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(FeedFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("dockbar_editor"), docksumm, "ic_list_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(DockBarFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
if (isValidSignature())
|
||||
PreferencesUtil.addPreference(this, "", getString("vtlmusic"), musicsumm, "ic_music_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(MusicFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("vtlmessages"), msgsumm, "ic_message_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(MessagesFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("vtlactivity"), activitysumm, "ic_write_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(ActivityFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("vtlthemes"), themessumm, "ic_palette_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(ThemesFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("vtltgs"), tgssumm, "ic_telegram", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(StickersFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("vtlinterface"), interfacesumm, "ic_interface", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(InterfaceFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("vtlproxy"), proxysumm, "ic_globe_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(ProxySettingsFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("vtlother"), othersumm, "ic_more_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(OtherFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreferenceCategory(this, getString("vtsettaboutmod"));
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("menu_about"), about, "ic_about_24", preference -> {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(AboutAppFragment.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("opencommit"), "", "ic_link_24", preference -> {
|
||||
getContext().startActivity(new Intent("android.intent.action.VIEW").setData(Uri.parse(getCommitLink())));
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("vtfaq"), getString("vtfaqsumm"), "ic_help_24", preference -> {
|
||||
getContext().startActivity(new Intent("android.intent.action.VIEW").setData(Uri.parse("https://t.me/s/vtosters_faq")));
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("reportbug"), getString("reportbugsumm"), "ic_bug_24", preference -> {
|
||||
getContext().startActivity(new Intent("android.intent.action.VIEW").setData(Uri.parse("https://github.com/vtosters/lite/issues")));
|
||||
return false;
|
||||
});
|
||||
|
||||
if (isValidSignature()) {
|
||||
PreferencesUtil.addPreferenceCategory(this, getString("updates"));
|
||||
|
||||
PreferencesUtil.addPreference(this, "", getString("checkforupdates"), "", "ic_download_24", preference -> {
|
||||
OTADialog.checkUpdates(p());
|
||||
return false;
|
||||
});
|
||||
|
||||
PreferencesUtil.addMaterialSwitchPreference(this, "checkupdates", getString("checkupdates"), "", "ic_recent_24", true, (preference, o) -> {
|
||||
boolean value = (boolean) o;
|
||||
|
||||
edit().putBoolean("checkupdates", value).commit();
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public static String getValAsString(String stringid, Boolean value) {
|
||||
if(disableSettingsSumms()) return "";
|
||||
|
||||
if (value){
|
||||
return getString(stringid) + ": " + getString("vtlsettenabled");
|
||||
}
|
||||
|
||||
return getString(stringid) + ": " + getString("vtlsettdisabled");
|
||||
}
|
||||
|
||||
public static String getSSFSsumm() {
|
||||
if(disableSettingsSumms()) return "";
|
||||
|
||||
if(hasSpecialVerif()) return getString("vtlssfssumm") + ": " + getString("vtlsettverifyes");
|
||||
|
||||
return getString("vtlssfssumm") + ": " + getString("vtlsettverifno");
|
||||
}
|
||||
|
||||
public static String getDocksumm() {
|
||||
if(disableSettingsSumms()) return "";
|
||||
|
||||
return getString("vtldocksumm") + ": " + DockBarManager.getInstance().getTabCount();
|
||||
}
|
||||
|
||||
public static String getTGSsumm() {
|
||||
if(disableSettingsSumms()) return "";
|
||||
|
||||
return getString("vtltgssumm") + ": " + TelegramStickersService.getInstance(getContext()).getPacksListReference().size();
|
||||
}
|
||||
|
||||
public static String getMultiAccsumm() {
|
||||
if(disableSettingsSumms() || getAccountPrefsCount() <= 1) return "";
|
||||
|
||||
return getString("vtlmultiaccsumm") + ": " + workingAccounts();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int aq() {
|
||||
return getIdentifier("notification_settings", "string");
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,9 @@ import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Preferences.newfeed;
|
||||
import static ru.vtosters.lite.utils.Preferences.oldicons;
|
||||
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;
|
||||
|
||||
import com.vk.apps.AppsFragment;
|
||||
import com.vk.discover.DiscoverFragment;
|
||||
@@ -18,7 +21,6 @@ import com.vtosters.lite.R;
|
||||
import com.vtosters.lite.fragments.GamesFragment;
|
||||
import com.vtosters.lite.fragments.PhotosFragment;
|
||||
import com.vtosters.lite.fragments.ProfileFragment;
|
||||
import com.vtosters.lite.fragments.SettingsListFragment;
|
||||
import com.vtosters.lite.fragments.d.DocumentsViewFragment;
|
||||
import com.vtosters.lite.fragments.f.FriendsFragment;
|
||||
import com.vtosters.lite.fragments.g.BirthdaysFragment;
|
||||
@@ -79,6 +81,14 @@ public class DockBarManager {
|
||||
File dockbar = new File(getContext().getFilesDir(), "dockbar.json");
|
||||
|
||||
if (!dockbar.exists()) {
|
||||
if(vkme()) {
|
||||
mSelectedTabs.add(new DockBarTab("tab_settings", R.drawable.ic_settings_24, R.string.menu_settings, R.id.menu_settings, useNewSettings()));
|
||||
if(vkme_notifs()) mSelectedTabs.add(new DockBarTab("tab_feedback", oldicons() ? R.drawable.ic_menu_notifications_28 : R.drawable.ic_menu_notification_outline_28, R.string.feedback, R.id.tab_feedback, NotificationsContainerFragment.class));
|
||||
mSelectedTabs.add(new DockBarTab("tab_messages", oldicons() ? R.drawable.ic_menu_messages_28 : R.drawable.ic_message_28_outline, R.string.messages, R.id.tab_messages, DialogsFragment.class));
|
||||
mSelectedTabs.add(new DockBarTab("tab_profile", R.drawable.libverify_ic_account_circle_white, R.string.profile, R.id.profile, ProfileFragment.class));
|
||||
return;
|
||||
}
|
||||
|
||||
mSelectedTabs.add(new DockBarTab("tab_news", oldicons() ? 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_discover", oldicons() ? R.drawable.ic_search_28 : R.drawable.ic_menu_search_outline_28, R.string.search, R.id.tab_discover, DiscoverFragment.class ));
|
||||
mSelectedTabs.add(new DockBarTab("tab_messages", oldicons() ? R.drawable.ic_menu_messages_28 : R.drawable.ic_message_28_outline, R.string.messages, R.id.tab_messages, DialogsFragment.class));
|
||||
@@ -98,7 +108,7 @@ public class DockBarManager {
|
||||
mDisabledTabs.add(new DockBarTab("tab_payments", R.drawable.ic_money_transfer_24, R.string.money_transfer_money_transfers, R.id.menu_payments, MoneyTransfersFragment.class));
|
||||
mDisabledTabs.add(new DockBarTab("tab_vk_apps", R.drawable.ic_services_24, R.string.menu_apps, R.id.menu_vk_apps, AppsFragment.class));
|
||||
mDisabledTabs.add(new DockBarTab("tab_profile", R.drawable.libverify_ic_account_circle_white, R.string.profile, R.id.profile, ProfileFragment.class));
|
||||
mDisabledTabs.add(new DockBarTab("tab_settings", R.drawable.ic_settings_24, R.string.menu_settings, R.id.menu_settings, SettingsListFragment.class));
|
||||
mDisabledTabs.add(new DockBarTab("tab_settings", R.drawable.ic_settings_24, R.string.menu_settings, R.id.menu_settings, useNewSettings()));
|
||||
mDisabledTabs.add(new DockBarTab("tab_brtd", R.drawable.ic_menu_birthdays, R.string.birthdays_title, R.id.menu_birthdays, BirthdaysFragment.class));
|
||||
|
||||
} else {
|
||||
@@ -225,8 +235,11 @@ public class DockBarManager {
|
||||
int target = adapter.getIndexByViewType(toPosition, adapter.getItemType(toPosition));
|
||||
if (fromPosition < toPosition) {
|
||||
|
||||
if (mSelectedTabs.size() <= MIN_SELECTED_TABS_LIMIT || mSelectedTabs.get(curr).tag.equals("tab_menu"))
|
||||
return;
|
||||
if(!vkme()){
|
||||
if (mSelectedTabs.size() <= MIN_SELECTED_TABS_LIMIT || mSelectedTabs.get(curr).tag.equals("tab_menu")){
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
DockBarTab tab = mSelectedTabs.get(curr);
|
||||
mSelectedTabs.remove(tab);
|
||||
@@ -296,6 +309,10 @@ public class DockBarManager {
|
||||
return mSelectedTabs.get(getIndexByViewType(pos, 1));
|
||||
}
|
||||
|
||||
public int getTabCount() {
|
||||
return mSelectedTabs.size();
|
||||
}
|
||||
|
||||
public DockBarTab getDisabledTab(int pos) {
|
||||
return mDisabledTabs.get(getIndexByViewType(pos, 2));
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public class MultiAccountManager {
|
||||
return getContext().getSharedPreferences("pref_account_manager" + (account != 0 ? account : ""), Context.MODE_PRIVATE);
|
||||
}
|
||||
|
||||
private static int getAccountPrefsCount() {
|
||||
public static int getAccountPrefsCount() {
|
||||
File[] prefs = new File(getContext().getFilesDir().getParent(), "shared_prefs")
|
||||
.listFiles((dir, name) -> {
|
||||
return name.matches("pref_account_manager\\d+\\.xml");
|
||||
@@ -46,7 +46,7 @@ public class MultiAccountManager {
|
||||
return prefs != null ? prefs.length : 0;
|
||||
}
|
||||
|
||||
private static String withRegex(String base, String regex, String def) {
|
||||
public static String withRegex(String base, String regex, String def) {
|
||||
Pattern pattern = Pattern.compile(regex);
|
||||
Matcher matcher = pattern.matcher(base);
|
||||
if (matcher.find()) {
|
||||
@@ -57,7 +57,7 @@ public class MultiAccountManager {
|
||||
|
||||
public static List<MultiAccountItem> buildList() {
|
||||
List<MultiAccountItem> list = new ArrayList<>();
|
||||
for (int i = 0; i <= getAccountPrefsCount(); i++) {
|
||||
for (int i = 0; i <= workingAccounts(); i++) {
|
||||
SharedPreferences prefs = getContext().getSharedPreferences("pref_account_manager" + i, Context.MODE_PRIVATE);
|
||||
String keyVKAccount = prefs.getString("key_vk_account", "");
|
||||
if (!keyVKAccount.isEmpty()) {
|
||||
@@ -72,6 +72,18 @@ public class MultiAccountManager {
|
||||
return list;
|
||||
}
|
||||
|
||||
public static int workingAccounts() {
|
||||
int count = 0;
|
||||
for (int i = 0; i <= getAccountPrefsCount(); i++) {
|
||||
SharedPreferences prefs = getContext().getSharedPreferences("pref_account_manager" + i, Context.MODE_PRIVATE);
|
||||
String keyVKAccount = prefs.getString("key_vk_account", "");
|
||||
if (!keyVKAccount.isEmpty()) {
|
||||
++count;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public static boolean switchAccount(int i) {
|
||||
int account = getPreferences().getInt("account", 0);
|
||||
if (account == i) return false;
|
||||
@@ -81,7 +93,7 @@ public class MultiAccountManager {
|
||||
}
|
||||
|
||||
public static void addAccount() {
|
||||
getPreferences().edit().putInt("account", getAccountPrefsCount()).commit();
|
||||
getPreferences().edit().putInt("account", workingAccounts()).commit();
|
||||
}
|
||||
|
||||
public static void deleteAccount(int i) {
|
||||
@@ -90,7 +102,7 @@ public class MultiAccountManager {
|
||||
prefs.edit().clear().commit();
|
||||
File file = new File(new File(getContext().getFilesDir().getParent(), "shared_prefs"), "pref_account_manager" + i);
|
||||
if (file.exists()) file.delete();
|
||||
if (account == i && getAccountPrefsCount() > 0) {
|
||||
if (account == i && workingAccounts() > 0) {
|
||||
List<MultiAccountItem> accounts = buildList();
|
||||
if (accounts.size() > 0)
|
||||
switchAccount(buildList().get(0).index);
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
package ru.vtosters.lite.ui.vkui;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
|
||||
import com.vk.core.dialogs.bottomsheet.ModalBottomSheet;
|
||||
|
||||
public class ModalBottomSheetProxy {
|
||||
public final ModalBottomSheet.a builder;
|
||||
|
||||
public ModalBottomSheetProxy(Activity activity) {
|
||||
builder = new ModalBottomSheet.a(activity);
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
builder.b(title);
|
||||
}
|
||||
|
||||
|
||||
public void setClickableMessage(String text) {
|
||||
builder.a(text, kostil -> {
|
||||
});
|
||||
}
|
||||
|
||||
public void setClickableMessage(String text, Runnable runnable) {
|
||||
builder.a(text, listener -> runnable.run());
|
||||
}
|
||||
|
||||
public void setPositiveButton(String text, Runnable runnable) {
|
||||
builder.b(text, kostil -> runnable.run());
|
||||
}
|
||||
|
||||
public void setSubtitle(String text) {
|
||||
builder.b((CharSequence) text);
|
||||
}
|
||||
|
||||
public void setView(View view) {
|
||||
builder.a(view);
|
||||
}
|
||||
|
||||
public ModalBottomSheet show() {
|
||||
return builder.c(null);
|
||||
}
|
||||
|
||||
public ModalBottomSheet show(boolean isCancellable) {
|
||||
var sheet = builder.c(null);
|
||||
sheet.b(isCancellable);
|
||||
return sheet;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package ru.vtosters.lite.ui.vkui;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.graphics.Typeface;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.vk.core.dialogs.bottomsheet.ModalBottomSheet;
|
||||
|
||||
import ru.vtosters.lite.utils.Globals;
|
||||
import ru.vtosters.lite.utils.Themes;
|
||||
|
||||
public class ModalBottomSheetWrapper {
|
||||
public final ModalBottomSheet.a builder;
|
||||
|
||||
public ModalBottomSheetWrapper(Activity activity) {
|
||||
builder = new ModalBottomSheet.a(activity);
|
||||
}
|
||||
|
||||
public ModalBottomSheetWrapper setTitle(String title) {
|
||||
builder.b(title);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ModalBottomSheetWrapper setUpdateInfoView(String version, String changelog) {
|
||||
var context = Globals.getContext();
|
||||
var container = new LinearLayout(context);
|
||||
var title = new TextView(context);
|
||||
var changelogView = new TextView(context);
|
||||
|
||||
container.setOrientation(LinearLayout.VERTICAL);
|
||||
|
||||
title.setText(getString("newversion") + " " + version);
|
||||
title.setTypeface(title.getTypeface(), Typeface.BOLD);
|
||||
title.setSingleLine(true);
|
||||
title.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);
|
||||
title.setTextColor(Themes.getTextAttr());
|
||||
title.setTextSize(24.0f);
|
||||
container.addView(title, new LinearLayout.LayoutParams(-1, -2));
|
||||
|
||||
changelogView.setPadding(0, Globals.convertDpToPixel(8), 0, 0);
|
||||
changelogView.setText(getString("changelog") + ": \n" + changelog);
|
||||
changelogView.setTextColor(Themes.getTextAttr());
|
||||
container.addView(changelogView, new LinearLayout.LayoutParams(-1, -2));
|
||||
|
||||
builder.a(container);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
// try to call a true function and you will understand my pain
|
||||
public ModalBottomSheetWrapper setMessage(
|
||||
String text
|
||||
) {
|
||||
builder.a(text, listener -> {});
|
||||
return this;
|
||||
}
|
||||
|
||||
public ModalBottomSheetWrapper setClickableMessage(
|
||||
String text,
|
||||
Runnable callback
|
||||
) {
|
||||
builder.a(text, listener -> callback.run());
|
||||
return this;
|
||||
}
|
||||
|
||||
public ModalBottomSheetWrapper setPositiveButton(
|
||||
String text,
|
||||
Runnable callback
|
||||
) {
|
||||
builder.b(text, kostil -> callback.run());
|
||||
return this;
|
||||
}
|
||||
|
||||
public ModalBottomSheetWrapper setSubtitle(String text) {
|
||||
builder.b((CharSequence) text);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ModalBottomSheetWrapper setView(View view) {
|
||||
builder.a(view);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ModalBottomSheet show() {
|
||||
return builder.c(null);
|
||||
}
|
||||
|
||||
public ModalBottomSheet show(boolean isCancellable) {
|
||||
var sheet = builder.c(null);
|
||||
sheet.b(isCancellable);
|
||||
return sheet;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static androidx.core.content.ContextCompat.getDrawable;
|
||||
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.Themes.isDarkTheme;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Application;
|
||||
@@ -13,10 +16,18 @@ import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Path;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.StrictMode;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
@@ -24,16 +35,27 @@ import android.widget.Toast;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.StringRes;
|
||||
|
||||
import com.vk.navigation.Navigator;
|
||||
import com.vtosters.lite.UserProfile;
|
||||
import com.vtosters.lite.VKActivity;
|
||||
import com.vtosters.lite.api.ExtendedUserProfile;
|
||||
import com.vtosters.lite.auth.VKAccountManager;
|
||||
import com.vtosters.lite.im.ImEngineProvider;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
|
||||
import ru.vtosters.lite.ui.dialogs.DisableBattery;
|
||||
import ru.vtosters.lite.ui.dialogs.InstallGMS;
|
||||
import ru.vtosters.lite.ui.dialogs.OTADialog;
|
||||
import ru.vtosters.lite.ui.dialogs.Start;
|
||||
|
||||
public class Globals {
|
||||
private static final List<Activity> activities = new ArrayList<>();
|
||||
@@ -43,6 +65,15 @@ public class Globals {
|
||||
return preferences;
|
||||
}
|
||||
|
||||
public static void MainActivityInit(Activity activity){
|
||||
if(checkupdates())
|
||||
OTADialog.checkUpdates(activity);
|
||||
Start.alert(activity);
|
||||
InstallGMS.alert(activity);
|
||||
DisableBattery.alert(activity);
|
||||
// VKIDProtection.alert(activity);
|
||||
}
|
||||
|
||||
public static void componentSwitcher(String component, Boolean enabled) {
|
||||
var packageManager = getContext().getPackageManager();
|
||||
packageManager.setComponentEnabledSetting(new ComponentName(getPackageName(), getPackageName() + "." + component), enabled? PackageManager.COMPONENT_ENABLED_STATE_ENABLED : PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
|
||||
@@ -92,6 +123,41 @@ public class Globals {
|
||||
return extendedUserProfile.a;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static Drawable drawableFromUrl(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(48), convertDpToPixel(48), true));
|
||||
} catch (Exception e) {
|
||||
return getDrawable(getContext(), com.vtosters.lite.R.drawable.libverify_ic_account_circle_white);
|
||||
}
|
||||
}
|
||||
|
||||
public static Bitmap getBitmapClippedCircle(Bitmap bitmap) {
|
||||
final int width = bitmap.getWidth();
|
||||
final int height = bitmap.getHeight();
|
||||
final Bitmap outputBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
|
||||
|
||||
final Path path = new Path();
|
||||
path.addCircle(
|
||||
(float)(width / 2)
|
||||
, (float)(height / 2)
|
||||
, (float) Math.min(width, (height / 2))
|
||||
, Path.Direction.CCW);
|
||||
|
||||
final Canvas canvas = new Canvas(outputBitmap);
|
||||
canvas.clipPath(path);
|
||||
canvas.drawBitmap(bitmap, 0, 0, null);
|
||||
return outputBitmap;
|
||||
}
|
||||
|
||||
public static void restartApplication() {
|
||||
Context ctx = getContext();
|
||||
PackageManager pm = ctx.getPackageManager();
|
||||
@@ -103,6 +169,26 @@ public class Globals {
|
||||
Runtime.getRuntime().exit(0);
|
||||
} // Application restart (works on sdk 29+ too)
|
||||
|
||||
public static void restartApplicationWithTimer() {
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
public void run() {
|
||||
restartApplication();
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
|
||||
public static void restartApplicationInto(Class Class) {
|
||||
Context ctx = getContext();
|
||||
PackageManager pm = ctx.getPackageManager();
|
||||
|
||||
Intent intent = new Navigator(Class).a(ctx);
|
||||
Intent mainIntent = Intent.makeRestartActivityTask(intent.getComponent());
|
||||
ctx.startActivity(mainIntent);
|
||||
|
||||
Runtime.getRuntime().exit(0);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static Context getContext() {
|
||||
try {
|
||||
@@ -116,7 +202,31 @@ public class Globals {
|
||||
return null;
|
||||
} // Getting the global context through reflection to use context on application initialization
|
||||
|
||||
public static void deleteCache() {
|
||||
try {
|
||||
File dir = getContext().getCacheDir();
|
||||
deleteDir(dir);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean deleteDir(File dir) {
|
||||
if (dir != null && dir.isDirectory()) {
|
||||
String[] children = dir.list();
|
||||
for (int i=0; i < Objects.requireNonNull(children).length; i++) {
|
||||
boolean success = deleteDir(new File(dir, children[i]));
|
||||
if (!success) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return dir.delete();
|
||||
} else if(dir!= null && dir.isFile()) {
|
||||
return dir.delete();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static boolean isGmsInstalled() {
|
||||
try {
|
||||
getContext().getPackageManager().getPackageInfo("com.google.android.gms", 0);
|
||||
@@ -254,6 +364,8 @@ public class Globals {
|
||||
configuration.setLayoutDirection(locale);
|
||||
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
|
||||
|
||||
edit().putBoolean("isdark", isDarkTheme()).commit();
|
||||
|
||||
return context;
|
||||
} // Language changer and BaseContext injector
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ 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.postsrecomm;
|
||||
import static ru.vtosters.lite.utils.Preferences.useNewSettings;
|
||||
import static ru.vtosters.lite.utils.Preferences.vkme;
|
||||
|
||||
import com.vk.apps.AppsFragment;
|
||||
import com.vk.core.preference.Preference;
|
||||
@@ -27,7 +29,6 @@ import com.vk.notifications.NotificationsContainerFragment;
|
||||
import com.vtosters.lite.fragments.GamesFragment;
|
||||
import com.vtosters.lite.fragments.PhotosFragment;
|
||||
import com.vtosters.lite.fragments.ProfileFragment;
|
||||
import com.vtosters.lite.fragments.SettingsListFragment;
|
||||
import com.vtosters.lite.fragments.d.DocumentsViewFragment;
|
||||
import com.vtosters.lite.fragments.f.FriendsFragment;
|
||||
import com.vtosters.lite.fragments.g.BirthdaysFragment;
|
||||
@@ -175,6 +176,9 @@ public class Newsfeed {
|
||||
}
|
||||
|
||||
public static long getUpdateNewsfeed(boolean refresh_timeout) {
|
||||
if (vkme()) {
|
||||
return MAX_VALUE;
|
||||
}
|
||||
switch (getPrefsValue("newsupdate")) {
|
||||
case "no_update":
|
||||
return MAX_VALUE;
|
||||
@@ -186,6 +190,9 @@ public class Newsfeed {
|
||||
}
|
||||
|
||||
public static Class getStartFragment() {
|
||||
if (vkme()) {
|
||||
return DialogsFragment.class;
|
||||
}
|
||||
switch (getPrefsValue("start_values")) {
|
||||
case "newsfeed":
|
||||
return newfeed() ? HomeFragment.class : NewsfeedFragment.class;
|
||||
@@ -202,7 +209,7 @@ public class Newsfeed {
|
||||
case "videos":
|
||||
return VideosFragment.class;
|
||||
case "settings":
|
||||
return SettingsListFragment.class;
|
||||
return useNewSettings();
|
||||
case "apps":
|
||||
return AppsFragment.class;
|
||||
case "discover":
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import okhttp3.Call;
|
||||
import okhttp3.Callback;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
|
||||
public class OTAHelper {
|
||||
|
||||
private static final String LATEST_RELEASE_URL = "https://api.github.com/repositories/473685743/releases/latest";
|
||||
private static final String LATEST_RELEASE_COMMIT_URL = "https://api.github.com/repositories/473685743/git/ref/tags/%s";
|
||||
|
||||
private OTAListener mListener;
|
||||
|
||||
private final OkHttpClient mClient = new OkHttpClient();
|
||||
|
||||
private JSONObject mReleaseJson;
|
||||
private JSONObject mCommitJson;
|
||||
|
||||
public OTAHelper(OTAListener listener) {
|
||||
this.mListener = listener;
|
||||
}
|
||||
|
||||
public void loadData() {
|
||||
Request release = new Request.Builder()
|
||||
.url(LATEST_RELEASE_URL)
|
||||
.build();
|
||||
mClient.newCall(release).a(new Callback() {
|
||||
@Override
|
||||
public void a(Call call, IOException e) {
|
||||
Log.d("OTAHelper", "Error while getting latest release info: " + e);
|
||||
mListener.onUpdateCanceled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(Call call, Response response) throws IOException {
|
||||
try {
|
||||
setData(response);
|
||||
} catch (JSONException | NullPointerException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void setData(Response response) throws IOException, JSONException {
|
||||
mReleaseJson = new JSONObject(response.body().string());
|
||||
|
||||
String tag = mReleaseJson.getString("tag_name");
|
||||
Request commit = new Request.Builder()
|
||||
.url(String.format(LATEST_RELEASE_COMMIT_URL, tag))
|
||||
.build();
|
||||
mClient.newCall(commit).a(new Callback() {
|
||||
@Override
|
||||
public void a(Call call, IOException e) {
|
||||
Log.d("OTAHelper", "Error while getting latest commit info: " + e);
|
||||
mListener.onUpdateCanceled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(Call call, Response response) throws IOException {
|
||||
try {
|
||||
mCommitJson = new JSONObject(response.body().string());
|
||||
if (isNewVersion())
|
||||
mListener.onUpdateApplied();
|
||||
else mListener.onUpdateCanceled();
|
||||
} catch (NullPointerException | JSONException e) {
|
||||
e.printStackTrace();
|
||||
mListener.onUpdateCanceled();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public boolean isNewVersion() {
|
||||
try {
|
||||
String commitSHA = mCommitJson.getJSONObject("object").getString("sha");
|
||||
return !commitSHA.startsWith(About.getBuildNumber());
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public String getNewVersionName() {
|
||||
try {
|
||||
return mReleaseJson.getString("name");
|
||||
} catch (JSONException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getUpdateDescription() {
|
||||
try {
|
||||
return mReleaseJson.getString("body");
|
||||
} catch (JSONException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public String getDownloadUrl() {
|
||||
try {
|
||||
return mReleaseJson.getJSONArray("assets")
|
||||
.getJSONObject(0)
|
||||
.getString("browser_download_url");
|
||||
} catch (JSONException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public interface OTAListener {
|
||||
|
||||
void onUpdateApplied();
|
||||
|
||||
void onUpdateCanceled();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static android.os.Build.VERSION;
|
||||
import static ru.vtosters.lite.f0x1d.VTVerifications.hasPrometheus;
|
||||
import static ru.vtosters.lite.f0x1d.VTVerifications.isVerified;
|
||||
import static ru.vtosters.lite.ui.fragments.multiaccount.MultiAccountManager.migrate;
|
||||
import static ru.vtosters.lite.utils.DeletedMessagesHandler.reloadMessagesList;
|
||||
@@ -15,23 +16,29 @@ 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.validateAppSignature;
|
||||
import static ru.vtosters.lite.utils.Themes.systemThemeChanger;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
|
||||
import com.vk.core.util.Screen;
|
||||
import com.vk.im.engine.models.users.UserSex;
|
||||
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;
|
||||
|
||||
public class Preferences {
|
||||
public static SharedPreferences preferences = getContext().getSharedPreferences("com.vtosters.lite_preferences", Context.MODE_PRIVATE);
|
||||
|
||||
@@ -47,7 +54,9 @@ public class Preferences {
|
||||
migrate();
|
||||
reloadMessagesList();
|
||||
registerActivities(application);
|
||||
LoadLibrary("vkopustest");
|
||||
if(dev()){
|
||||
LoadLibrary("vkopustest");
|
||||
}
|
||||
systemThemeChanger();
|
||||
} // VK Init
|
||||
|
||||
@@ -74,7 +83,7 @@ public class Preferences {
|
||||
}
|
||||
|
||||
public static boolean systemtheme() {
|
||||
return getBoolValue("systemtheme", true);
|
||||
return getBoolValue("systemtheme", true) && VERSION.SDK_INT >= 28;
|
||||
}
|
||||
|
||||
public static boolean authorsrecomm() {
|
||||
@@ -117,6 +126,10 @@ public class Preferences {
|
||||
return getBoolValue("oldicons", false);
|
||||
}
|
||||
|
||||
public static boolean vkme() {
|
||||
return getBoolValue("vkme", false);
|
||||
}
|
||||
|
||||
public static boolean adsslider() {
|
||||
return getBoolValue("__dbg_no_slider_ads", false);
|
||||
}
|
||||
@@ -137,6 +150,15 @@ public class Preferences {
|
||||
return getBoolValue("awayphp", true);
|
||||
}
|
||||
|
||||
public static boolean musicFixNew() {
|
||||
return getBoolValue("musicFixNew", true);
|
||||
}
|
||||
|
||||
public static Class useNewSettings() {
|
||||
boolean bool = getBoolValue("useNewSettings", true);
|
||||
return bool? VTSettings.class : SettingsListFragment.class;
|
||||
}
|
||||
|
||||
public static boolean VKUI_INJ() {
|
||||
return getBoolValue("VKUI_INJ", true);
|
||||
}
|
||||
@@ -194,7 +216,7 @@ public class Preferences {
|
||||
}
|
||||
|
||||
public static boolean gcmfix() {
|
||||
return getBoolValue("gcmfix", true);
|
||||
return getBoolValue("gcmfix", true) && isValidSignature();
|
||||
}
|
||||
|
||||
public static boolean hasMusicSubscription() {
|
||||
@@ -338,14 +360,35 @@ public class Preferences {
|
||||
return getBoolValue("vkme_msg", false);
|
||||
}
|
||||
|
||||
public static boolean vkme_notifs() {
|
||||
return getBoolValue("vkme_notifs", false);
|
||||
}
|
||||
|
||||
public static boolean roundedmsgs() {
|
||||
return getBoolValue("roundedmsgs", false);
|
||||
}
|
||||
|
||||
public static boolean checkupdates() {
|
||||
return getBoolValue("checkupdates", true) && isValidSignature();
|
||||
}
|
||||
|
||||
public static boolean disableanimstickers() {
|
||||
return getBoolValue("disableanimstickers", true);
|
||||
}
|
||||
|
||||
public static boolean isValidSignature() {
|
||||
try {
|
||||
return validateAppSignature();
|
||||
} catch (PackageManager.NameNotFoundException | NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean disableSettingsSumms() {
|
||||
return getBoolValue("disableSettingsSumms", false);
|
||||
}
|
||||
|
||||
public static boolean donaterecomm() {
|
||||
return getBoolValue("donaterecomm", false);
|
||||
}
|
||||
@@ -366,6 +409,10 @@ public class Preferences {
|
||||
return isVerified(getUserId());
|
||||
}
|
||||
|
||||
public static boolean hasSpecialVerif() {
|
||||
return hasPrometheus(getUserId());
|
||||
}
|
||||
|
||||
public static String getLocale() {
|
||||
String string = getPrefsValue("lang_value");
|
||||
|
||||
@@ -391,6 +438,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());
|
||||
|
||||
@@ -200,7 +200,6 @@ public class Proxy {
|
||||
return getPrefsValue("proxy").equals("apiproxy");
|
||||
}
|
||||
|
||||
|
||||
public static boolean proxyvk() {
|
||||
return getBoolValue("proxyvk", false);
|
||||
} // Official vk proxy enforcer
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static android.content.pm.PackageManager.GET_SIGNATURES;
|
||||
import static android.content.pm.PackageManager.NameNotFoundException;
|
||||
import static ru.vtosters.lite.f0x1d.VTVerifications.decode;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getPackageName;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.Signature;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
public class SignatureChecker {
|
||||
private static final String APP_SIGNATURE = "QzNFQTI3Q0ExNEJENzJFM0U2QUUyMDM0OTdCNDQ0NUFEQUMxRjk0NQ==";
|
||||
|
||||
public static String getSHA1(byte[] sig) throws NoSuchAlgorithmException{
|
||||
MessageDigest digest = MessageDigest.getInstance("SHA1");
|
||||
digest.update(sig);
|
||||
byte[] hashtext = digest.digest();
|
||||
return bytesToHex(hashtext);
|
||||
}
|
||||
|
||||
public static String bytesToHex(byte[] bytes){
|
||||
final char[] hexArray = {'0', '1', '2', '3', '4', '5', '6', '7', '8',
|
||||
'9', 'A', 'B', 'C', 'D', 'E', 'F'};
|
||||
char[] hexChars = new char[bytes.length * 2];
|
||||
int v;
|
||||
for (int j = 0; j < bytes.length; j++) {
|
||||
v = bytes[j] & 0xFF;
|
||||
hexChars[j * 2] = hexArray[v >>> 4];
|
||||
hexChars[j * 2 + 1] = hexArray[v & 0x0F];
|
||||
}
|
||||
return new String(hexChars);
|
||||
}
|
||||
|
||||
public static boolean validateAppSignature() throws NameNotFoundException, NoSuchAlgorithmException{
|
||||
@SuppressLint("PackageManagerGetSignatures") PackageInfo packageInfo = getContext().getPackageManager().getPackageInfo(getPackageName(), GET_SIGNATURES);
|
||||
for (Signature signature : packageInfo.signatures) {
|
||||
String sha1 = getSHA1(signature.toByteArray());
|
||||
return decode(APP_SIGNATURE).equals(sha1);
|
||||
}
|
||||
return false;
|
||||
} // Sig check to detect actions builds and etc
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static android.view.View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
|
||||
import static com.vk.im.ui.themes.ImTheme.*;
|
||||
import static ru.vtosters.lite.utils.Globals.edit;
|
||||
import static ru.vtosters.lite.utils.Globals.getIdentifier;
|
||||
import static ru.vtosters.lite.utils.Globals.getPrefsValue;
|
||||
import static ru.vtosters.lite.utils.Globals.getResources;
|
||||
@@ -9,8 +11,11 @@ import static ru.vtosters.lite.utils.Preferences.isBGStickersEnabled;
|
||||
import static ru.vtosters.lite.utils.Preferences.navbar;
|
||||
import static ru.vtosters.lite.utils.Preferences.roundedmsgs;
|
||||
import static ru.vtosters.lite.utils.Preferences.systemtheme;
|
||||
import static ru.vtosters.lite.utils.Preferences.vkme;
|
||||
import static ru.vtosters.lite.utils.Preferences.vksans;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.Configuration;
|
||||
@@ -44,6 +49,9 @@ public class Themes {
|
||||
ImThemeHelper.b.a(imtheme); // ImThemeHelper.b.a(ImTheme value) VK Theme Msg apply
|
||||
} // Apply VKTheme and ImTheme (hard applying without dynamic theme changing)
|
||||
|
||||
public static void setTheme(Activity activity) {
|
||||
VKThemeHelper.a(activity); // apply changed theme
|
||||
}
|
||||
public static boolean isDarkTheme() {
|
||||
return !VKThemeHelper.d();
|
||||
}
|
||||
@@ -126,9 +134,9 @@ public class Themes {
|
||||
public static ImTheme getImDarkTheme() {
|
||||
switch (getPrefsValue("darktheme")) {
|
||||
case "amoled":
|
||||
return roundedmsgs() ? ImTheme.VKME_AMOLED : ImTheme.VKAPP_AMOLED;
|
||||
return roundedmsgs() ? VKME_AMOLED : VKAPP_AMOLED;
|
||||
default:
|
||||
return roundedmsgs() ? ImTheme.VKME_DARK : ImTheme.VKAPP_DARK;
|
||||
return roundedmsgs() ? VKME_DARK : VKAPP_DARK;
|
||||
}
|
||||
} // Return needed theme for theme changer
|
||||
|
||||
@@ -142,7 +150,7 @@ public class Themes {
|
||||
public static ImTheme getImLightTheme() {
|
||||
switch (getPrefsValue("lighttheme")) {
|
||||
default:
|
||||
return roundedmsgs() ? ImTheme.VKME_LIGHT : ImTheme.VKAPP_LIGHT;
|
||||
return roundedmsgs() ? VKME_LIGHT : VKAPP_LIGHT;
|
||||
}
|
||||
} // Return needed theme for theme changer
|
||||
|
||||
@@ -179,6 +187,11 @@ public class Themes {
|
||||
return new RecoloredDrawable(drawable, getHeaderText());
|
||||
} // Recolor toolbar drawable to accent color
|
||||
|
||||
public static Drawable recolorDrawableInt(int drawable) {
|
||||
@SuppressLint("UseCompatLoadingForDrawables") Drawable res = getResources().getDrawable(drawable);
|
||||
return new RecoloredDrawable(res, getAccentColor());
|
||||
} // Get res drawable via id and coloring to accent
|
||||
|
||||
public static ColorStateList recolorCSL(ColorStateList colorStateList) {
|
||||
if (colorStateList == null) {
|
||||
return null;
|
||||
@@ -311,24 +324,41 @@ public class Themes {
|
||||
return "images";
|
||||
}
|
||||
|
||||
public static int getNavigationHeight(int Default) {
|
||||
int VKME = R.dimen.design_bottom_sheet_peek_height_min;
|
||||
|
||||
return vkme()? VKME : Default;
|
||||
}
|
||||
|
||||
public static int getNavigationWidth(int Default) {
|
||||
int VKME = R.dimen.app_minimumsize_h;
|
||||
|
||||
return vkme()? VKME : Default;
|
||||
}
|
||||
|
||||
public static void systemThemeChanger() {
|
||||
if (isDarkTheme()){
|
||||
boolean isDarkTheme = isDarkTheme();
|
||||
|
||||
if (isDarkTheme){
|
||||
applyTheme(getDarkTheme(), getImDarkTheme());
|
||||
} else {
|
||||
applyTheme(getLightTheme(), getImLightTheme());
|
||||
}
|
||||
|
||||
if (!systemtheme()) return;
|
||||
if (!systemtheme()){
|
||||
edit().putBoolean("isdark", isDarkTheme).commit();
|
||||
return;
|
||||
}
|
||||
|
||||
int currentNightMode = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
|
||||
switch (currentNightMode) {
|
||||
case Configuration.UI_MODE_NIGHT_UNDEFINED:
|
||||
applyTheme(getLightTheme(), getImLightTheme());
|
||||
break;
|
||||
case Configuration.UI_MODE_NIGHT_NO:
|
||||
edit().putBoolean("isdark", false).commit();
|
||||
applyTheme(getLightTheme(), getImLightTheme());
|
||||
break;
|
||||
case Configuration.UI_MODE_NIGHT_YES:
|
||||
edit().putBoolean("isdark", true).commit();
|
||||
applyTheme(getDarkTheme(), getImDarkTheme());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
<meta-data android:name="com.facebook.sdk.CodelessDebugLogEnabled" android:value="false"/>
|
||||
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
|
||||
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/cornflower_blue"/>
|
||||
<activity android:name="ru.vtosters.lite.ui.activities.APKInstallActivity" />
|
||||
<activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize" android:label="@string/app_name" android:launchMode="singleTask" android:name="com.vtosters.lite.MainActivity" android:theme="@style/SplashTheme">
|
||||
<intent-filter>
|
||||
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER"/>
|
||||
|
||||
@@ -58,15 +58,15 @@ body[scheme=space_gray] {
|
||||
--counter_secondary_text: #000000 !important;
|
||||
--loader_background: #000000 !important;
|
||||
--overlay_status_background: #000000 !important;
|
||||
--header_background: #19191a !important;
|
||||
--header_alternate_background: #19191a !important;
|
||||
--header_background: #000000 !important;
|
||||
--header_alternate_background: #000000 !important;
|
||||
--separator_alternate: #000000 !important;
|
||||
--segmented_control_bar_background: #000000 !important;
|
||||
--search_bar_background: #000000 !important;
|
||||
/* background */
|
||||
--background_page: #000000 !important;
|
||||
--header_background_before_blur: #19191a !important;
|
||||
--header_background_before_blur_alternate: #19191a !important;
|
||||
--header_background_before_blur: #000000 !important;
|
||||
--header_background_before_blur_alternate: #000000 !important;
|
||||
/* lighter BG (text fields) */
|
||||
--attach_picker_tab_inactive_background: #121212 !important;
|
||||
--background_keyboard: #121212 !important;
|
||||
|
||||
|
Before Width: | Height: | Size: 975 B After Width: | Height: | Size: 664 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 790 B |
|
Before Width: | Height: | Size: 758 B After Width: | Height: | Size: 462 B |
|
Before Width: | Height: | Size: 882 B After Width: | Height: | Size: 651 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 758 B After Width: | Height: | Size: 439 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 552 B |
|
Before Width: | Height: | Size: 521 B After Width: | Height: | Size: 372 B |
|
Before Width: | Height: | Size: 596 B After Width: | Height: | Size: 402 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 874 B |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 876 B After Width: | Height: | Size: 629 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 773 B |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 895 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.9 KiB |
@@ -16,7 +16,7 @@
|
||||
|
||||
<TextView
|
||||
android:textSize="14.0sp"
|
||||
android:textColor="#ff528bcc"
|
||||
android:textColor="?accent"
|
||||
android:gravity="center|right"
|
||||
android:id="@id/tv_reset"
|
||||
android:background="@drawable/picker_white_ripple_bounded"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView android:textSize="16.0sp"
|
||||
android:textColor="@color/muted_black"
|
||||
android:textColor="?text_primary"
|
||||
android:ellipsize="marquee"
|
||||
android:gravity="center|left"
|
||||
android:id="@android:id/text1"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<com.vtosters.lite.ui.BadooTextView
|
||||
android:textSize="16.0dip"
|
||||
android:textColor="@color/sharing_blue_btn_text"
|
||||
android:textColor="@color/cool_blue"
|
||||
android:gravity="center"
|
||||
android:id="@android:id/text1"
|
||||
android:duplicateParentState="true"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<com.vtosters.lite.ui.BadooTextView
|
||||
android:textSize="16.0dip"
|
||||
android:textColor="@color/dark_grey"
|
||||
android:textColor="?text_primary"
|
||||
android:id="@id/sharing_title"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<TextView
|
||||
android:textSize="14.0dip"
|
||||
android:textColor="@color/cool_grey"
|
||||
android:textColor="?text_secondary"
|
||||
android:ellipsize="end"
|
||||
android:id="@id/sharing_subtitle"
|
||||
android:visibility="gone"
|
||||
@@ -39,7 +39,7 @@
|
||||
android:layout_width="48.0dip"
|
||||
android:layout_height="48.0dip"
|
||||
android:layout_marginRight="4.0dip"
|
||||
android:tint="@color/cool_grey"
|
||||
android:tint="?text_primary"
|
||||
android:contentDescription="@string/search"
|
||||
android:layout_marginEnd="4.0dip"
|
||||
app:srcCompat="@drawable/ic_search_24"
|
||||
@@ -53,7 +53,7 @@
|
||||
android:layout_height="48.0dip"
|
||||
android:src="@drawable/ic_settings_24"
|
||||
android:scaleType="center"
|
||||
android:tint="@color/gray_300"
|
||||
android:tint="?text_primary"
|
||||
android:contentDescription="@string/menu_settings"
|
||||
android:layout_marginEnd="4.0dip"
|
||||
style="@style/Widget.AppCompat.ActionButton" />
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
android:textSize="12.0dip"
|
||||
android:textColor="#fffafafa"
|
||||
android:gravity="center"
|
||||
android:layout_gravity="center"
|
||||
android:id="@id/counter"
|
||||
android:background="@drawable/bottom_navigation_counter_bg"
|
||||
android:paddingLeft="@dimen/bottom_navigation_counter_padding"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<LinearLayout android:layout_gravity="start"
|
||||
android:orientation="horizontal"
|
||||
android:padding="12.0dip"
|
||||
android:background="?tabbar_background"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="fill_parent"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
|
||||
@@ -4039,6 +4039,7 @@
|
||||
<string name="tgchannel">Telegram Канал</string>
|
||||
<string name="tgchat">Telegram Чат</string>
|
||||
<string name="vkgroup">Наша группа в ВК</string>
|
||||
<string name="vtfaqsumm">Ответы на все ваши вопросы здесь</string>
|
||||
<string name="vtsite">Наш сайт</string>
|
||||
<string name="installgms">Установите Сервисы Google Play</string>
|
||||
<string name="vtldads">Отключить рекламу</string>
|
||||
@@ -4200,6 +4201,7 @@
|
||||
<string name="proxysocks">Socks Прокси</string>
|
||||
<string name="proxystatic">Static Домен</string>
|
||||
<string name="reportbug">Сообщить о баге</string>
|
||||
<string name="reportbugsumm">Репорты багов помогают нам их исправлять</string>
|
||||
<string name="restartapp">Перезапустите приложение</string>
|
||||
<string name="savedmsg">Сохраненные сообщения</string>
|
||||
<string name="selectacc">Выберите аккаунт</string>
|
||||
@@ -4337,7 +4339,7 @@
|
||||
|
||||
<string name="add_another_account">Добавить новый аккаунт</string>
|
||||
|
||||
<string name="download_latest_vtl">Скачать последнюю версию</string>
|
||||
<string name="checkforupdates">Проверить обновления</string>
|
||||
|
||||
<string name="debug_warning">Внимание!</string>
|
||||
<string name="debug_warning_summary">Данное меню предназначено только для тестирования работоспособности приложения. Если вы являетесь рядовым юзером, то вам не следует ничего не трогать в данных настройках (пожалуйста)</string>
|
||||
@@ -4348,7 +4350,7 @@
|
||||
<string name="debug_experimental_page_stats">Статистика страницы</string>
|
||||
<string name="debug_experimental_page_stats_summary">Вкшники вроде перестали отдавать инфу</string>
|
||||
<string name="debug_experimental_vk_sans_font">Шрифт VK Sans</string>
|
||||
<string name="debug_experimental_vk_me_mode">Режим VK Me MSG</string>
|
||||
<string name="debug_experimental_vk_me_mode">Режим VK Me для диалогов</string>
|
||||
<string name="debug_experimental_libverify">Поддержка libverify</string>
|
||||
<string name="debug_experimental_libverify_summary">Включение может пофиксить 2фа вход</string>
|
||||
<string name="debug_experimental_opusmodule">Модуль Opus</string>
|
||||
@@ -4437,6 +4439,9 @@
|
||||
<string name="startbtn1">Новости</string>
|
||||
<string name="startbtn2">Продолжить</string>
|
||||
|
||||
<string name="vkiddisable">Отключить защиту</string>
|
||||
<string name="vkidsumm">ВКонтакте начали блокировать использование сторонних приложений, поэтому для стабильной работы всех разделов приложения необходимо отключить Защиту от подозрительных приложений \n\nVK ID -> Безопасность и вход -> Защита от подозрительных приложений</string>
|
||||
|
||||
<string name="videodownloaderr">Данное видео невозможно скачать</string>
|
||||
|
||||
<string name="roundedmsgs">Круглые сообщения</string>
|
||||
@@ -4446,5 +4451,43 @@
|
||||
<string name="franimation">Анимация фрагментов (бета)</string>
|
||||
<string name="selectfranimation">Выберите анимацию фрагментов</string>
|
||||
|
||||
<string name="vkme">Режим VK Me</string>
|
||||
<string name="vkmesumm">Замена докбара и некоторых элементов на что-то похожее как в VK Me</string>
|
||||
|
||||
<string name="vtsettaccount">Аккаунт</string>
|
||||
<string name="vtsettdarktheme">Темная тема</string>
|
||||
<string name="vtsettaboutmod">О модификации</string>
|
||||
<string name="vtsettmod">Настройки мода</string>
|
||||
|
||||
<string name="vtlsettenabled">Включено</string>
|
||||
<string name="vtlsettdisabled">Отключено</string>
|
||||
|
||||
<string name="vtlsettverifno">Нет</string>
|
||||
<string name="vtlsettverifyes">Да</string>
|
||||
|
||||
<string name="vtlfeedsumm">Блокировать рекламу</string>
|
||||
<string name="vtldocksumm">Докбар элементов</string>
|
||||
<string name="vtlmusicsumm">VKX интеграция</string>
|
||||
<string name="vtlmsgsumm">Режим VK Me</string>
|
||||
<string name="vtlactivitysumm">Офлайн режим</string>
|
||||
<string name="vtlthemessumm">Покраска навбара</string>
|
||||
<string name="vtltgssumm">Установлено паков</string>
|
||||
<string name="vtlinterfacesumm">Округление чисел</string>
|
||||
<string name="vtlproxysumm">Проксирование</string>
|
||||
<string name="vtlothersumm">Отображение верификаций</string>
|
||||
<string name="vtlmultiaccsumm">Доступно аккаунтов</string>
|
||||
<string name="vtlhidesumm">Скрыть подписи в настройках</string>
|
||||
|
||||
<string name="vtlssfssumm">Есть доступ</string>
|
||||
<string name="checkupdates">Авто обновления</string>
|
||||
<string name="updates">Обновления</string>
|
||||
|
||||
<string name="vkme_notifs">Вернуть вкладку уведомлений</string>
|
||||
<string name="updateanddownload">Обновить</string>
|
||||
<string name="newversion">Новая версия</string>
|
||||
<string name="changelog">Список изменений</string>
|
||||
<string name="downloaderr">Ошибка загрузки файла</string>
|
||||
<string name="onlineNull">Онлайн скрыт</string>
|
||||
|
||||
<string name="empty_text" />
|
||||
</resources>
|
||||
|
||||
@@ -117,9 +117,9 @@
|
||||
<item name="im_bubble_button_background_disabled">#66313233</item>
|
||||
<item name="im_bubble_button_foreground">@android:color/system_accent1_50</item>
|
||||
<item name="im_bubble_button_foreground_disabled">#66e1e3e6</item>
|
||||
<item name="im_bubble_gift_background">@color/gold_300</item>
|
||||
<item name="im_bubble_gift_text">@color/gold_100</item>
|
||||
<item name="im_bubble_gift_text_secondary">@color/gold_150</item>
|
||||
<item name="im_bubble_gift_background">@android:color/system_accent1_50</item>
|
||||
<item name="im_bubble_gift_text">?text_primary</item>
|
||||
<item name="im_bubble_gift_text_secondary">?text_secondary</item>
|
||||
<item name="im_bubble_incoming">@android:color/system_neutral1_900</item>
|
||||
<item name="im_bubble_incoming_alternate">@android:color/system_neutral1_900</item>
|
||||
<item name="im_bubble_incoming_alternate_highlighted">@android:color/system_neutral2_200
|
||||
@@ -480,7 +480,7 @@
|
||||
<item name="header_alternate_tab_active_indicator">@color/gray_100</item>
|
||||
<item name="header_alternate_tab_active_text">@color/gray_100</item>
|
||||
<item name="header_alternate_tab_inactive_text">@color/gray_500</item>
|
||||
<item name="header_background">@color/gray_900</item>
|
||||
<item name="header_background">@color/black</item>
|
||||
<item name="header_background_before_blur">@color/gray_950</item>
|
||||
<item name="header_background_before_blur_alternate">@color/gray_950</item>
|
||||
<item name="header_search_field_background">@color/gray_700</item>
|
||||
@@ -579,7 +579,7 @@
|
||||
<item name="stories_skeleton_loader_background">@color/gray_700</item>
|
||||
<item name="switch_ios_off_border">@color/black</item>
|
||||
<item name="tabbar_active_icon">@color/white</item>
|
||||
<item name="tabbar_background">@color/gray_900</item>
|
||||
<item name="tabbar_background">@color/black</item>
|
||||
<item name="tabbar_inactive_icon">@color/gray_500</item>
|
||||
<item name="text_action_counter">@color/gray_300</item>
|
||||
<item name="text_link">@android:color/system_accent1_100</item>
|
||||
@@ -1244,7 +1244,7 @@
|
||||
<item name="header_alternate_tab_active_indicator">@color/gray_100</item>
|
||||
<item name="header_alternate_tab_active_text">@color/gray_100</item>
|
||||
<item name="header_alternate_tab_inactive_text">@color/gray_500</item>
|
||||
<item name="header_background">@color/gray_900</item>
|
||||
<item name="header_background">@color/black</item>
|
||||
<item name="header_background_before_blur">@color/black</item>
|
||||
<item name="header_background_before_blur_alternate">@color/black</item>
|
||||
<item name="header_search_field_background">@color/gray_700</item>
|
||||
@@ -1429,7 +1429,7 @@
|
||||
<item name="stories_skeleton_loader_background">@color/gray_700</item>
|
||||
<item name="switch_ios_off_border">@color/black</item>
|
||||
<item name="tabbar_active_icon">@color/white</item>
|
||||
<item name="tabbar_background">@color/gray_900</item>
|
||||
<item name="tabbar_background">@color/black</item>
|
||||
<item name="tabbar_inactive_icon">@color/gray_500</item>
|
||||
<item name="text_action_counter">@color/gray_300</item>
|
||||
<item name="text_link">@android:color/system_accent1_100</item>
|
||||
@@ -2085,7 +2085,7 @@
|
||||
<item name="header_alternate_tab_active_indicator">@color/gray_100</item>
|
||||
<item name="header_alternate_tab_active_text">@color/gray_100</item>
|
||||
<item name="header_alternate_tab_inactive_text">@color/gray_500</item>
|
||||
<item name="header_background">@color/gray_900</item>
|
||||
<item name="header_background">@color/black</item>
|
||||
<item name="header_background_before_blur">@color/black</item>
|
||||
<item name="header_background_before_blur_alternate">@color/black</item>
|
||||
<item name="header_search_field_background">@color/gray_700</item>
|
||||
@@ -2270,7 +2270,7 @@
|
||||
<item name="stories_skeleton_loader_background">@color/gray_700</item>
|
||||
<item name="switch_ios_off_border">@color/black</item>
|
||||
<item name="tabbar_active_icon">@color/white</item>
|
||||
<item name="tabbar_background">@color/gray_900</item>
|
||||
<item name="tabbar_background">@color/black</item>
|
||||
<item name="tabbar_inactive_icon">@color/gray_500</item>
|
||||
<item name="text_action_counter">@color/gray_300</item>
|
||||
<item name="text_link">@android:color/system_accent1_100</item>
|
||||
|
||||
@@ -14953,7 +14953,7 @@
|
||||
<public type="string" name="dockbar_save" id="0x7f11123b" />
|
||||
<public type="string" name="dockbar_selected_items" id="0x7f11123c" />
|
||||
<public type="string" name="dockbar_unselected_items" id="0x7f11123d" />
|
||||
<public type="string" name="download_latest_vtl" id="0x7f11123e" />
|
||||
<public type="string" name="checkforupdates" id="0x7f11123e" />
|
||||
<public type="string" name="other_fix_dynamic_colors" id="0x7f11123f" />
|
||||
<public type="string" name="other_reset_settings" id="0x7f111240" />
|
||||
<public type="string" name="other_reset_settings_summary" id="0x7f111241" />
|
||||
|
||||
@@ -4164,6 +4164,7 @@ with video"</string>
|
||||
<string name="tgchat">Telegram Chat</string>
|
||||
<string name="vkgroup">Our VK Group</string>
|
||||
<string name="vtfaq">FAQ</string>
|
||||
<string name="vtfaqsumm">All your questions are answered here</string>
|
||||
<string name="vtsite">Our site</string>
|
||||
<string name="installgms">Install Google Play Services</string>
|
||||
<string name="vtldads">Disable Ads</string>
|
||||
@@ -4325,6 +4326,7 @@ You need to restart the application to apply proxy settings"</string>
|
||||
<string name="proxysocks">Socks Proxy</string>
|
||||
<string name="proxystatic">Static Domain</string>
|
||||
<string name="reportbug">Report a bug</string>
|
||||
<string name="reportbugsumm">Bug reports help us fix them</string>
|
||||
<string name="restartapp">Please, restart app</string>
|
||||
<string name="savedmsg">Saved messages</string>
|
||||
<string name="selectacc">Select account</string>
|
||||
@@ -4463,7 +4465,7 @@ May look like a fake leaving the online"</string>
|
||||
|
||||
<string name="add_another_account">Add new account</string>
|
||||
|
||||
<string name="download_latest_vtl">Download latest version</string>
|
||||
<string name="checkforupdates">Check for updates</string>
|
||||
|
||||
<string name="debug_warning">Warning!</string>
|
||||
<string name="debug_warning_summary">These options are for testing this app only. If you are a regular user, please, don\'t use them</string>
|
||||
@@ -4474,7 +4476,7 @@ May look like a fake leaving the online"</string>
|
||||
<string name="debug_experimental_page_stats">Page stats</string>
|
||||
<string name="debug_experimental_page_stats_summary">VK Devs seems to have stopped sending info</string>
|
||||
<string name="debug_experimental_vk_sans_font">VK Sans font</string>
|
||||
<string name="debug_experimental_vk_me_mode">VK Me MSG mode</string>
|
||||
<string name="debug_experimental_vk_me_mode">VK Me dialogs mode</string>
|
||||
<string name="debug_experimental_libverify">libverify support</string>
|
||||
<string name="debug_experimental_libverify_summary">Turning on may fix 2fa login</string>
|
||||
<string name="debug_experimental_opusmodule">Opus Module</string>
|
||||
@@ -4580,6 +4582,47 @@ May look like a fake leaving the online"</string>
|
||||
<string name="franimation">Fragment animation (beta)</string>
|
||||
<string name="selectfranimation">Select fragment animation</string>
|
||||
|
||||
<string name="vkme">VK Me mode</string>
|
||||
<string name="vkmesumm">Replacing the dock and some elements with something similar as in VK Me</string>
|
||||
|
||||
<string name="vtsettaccount">Account</string>
|
||||
<string name="vtsettdarktheme">Dark theme</string>
|
||||
<string name="vtsettaboutmod">About modification</string>
|
||||
<string name="vtsettmod">Mod settings</string>
|
||||
|
||||
<string name="vtlsettenabled">Enabled</string>
|
||||
<string name="vtlsettdisabled">Disabled</string>
|
||||
|
||||
<string name="vtlsettverifno">No</string>
|
||||
<string name="vtlsettverifyes">Yes</string>
|
||||
|
||||
<string name="vtlfeedsumm">Block ads</string>
|
||||
<string name="vtldocksumm">Dockbar elements</string>
|
||||
<string name="vtlmusicsumm">VKX Integration</string>
|
||||
<string name="vtlmsgsumm">VK Me mode</string>
|
||||
<string name="vtlactivitysumm">Offline mode</string>
|
||||
<string name="vtlthemessumm">Navbar coloring</string>
|
||||
<string name="vtltgssumm">Installed packs</string>
|
||||
<string name="vtlinterfacesumm">Round numbers</string>
|
||||
<string name="vtlproxysumm">Proxy</string>
|
||||
<string name="vtlothersumm">Show verifications</string>
|
||||
<string name="vtlmultiaccsumm">Available accounts</string>
|
||||
<string name="vtlhidesumm">Hide settings summaries</string>
|
||||
|
||||
<string name="vtlssfssumm">Have access</string>
|
||||
<string name="checkupdates">Auto updates</string>
|
||||
<string name="updates">Updates</string>
|
||||
|
||||
<string name="vkme_notifs">Back notification tab to dock</string>
|
||||
<string name="updateanddownload">Update</string>
|
||||
<string name="newversion">New version</string>
|
||||
<string name="changelog">Changelog</string>
|
||||
<string name="downloaderr">Download error</string>
|
||||
<string name="onlineNull">Online is hidden</string>
|
||||
|
||||
<string name="vkiddisable">Disable protection</string>
|
||||
<string name="vkidsumm">VK has started blocking the use of third-party applications, so for the stable operation of all parts of the application, it is necessary to disable Protection from suspicious applications \n\nVK ID -> Security and Login -> Protection from suspicious applications</string>
|
||||
|
||||
<item type="string" name="APKTOOL_DUMMY_10be" />
|
||||
<item type="string" name="APKTOOL_DUMMY_10bf" />
|
||||
<item type="string" name="APKTOOL_DUMMY_10c0" />
|
||||
|
||||
@@ -1504,7 +1504,7 @@
|
||||
<item name="header_alternate_tab_active_indicator">@color/gray_100</item>
|
||||
<item name="header_alternate_tab_active_text">@color/gray_100</item>
|
||||
<item name="header_alternate_tab_inactive_text">@color/gray_500</item>
|
||||
<item name="header_background">@color/gray_900</item>
|
||||
<item name="header_background">@color/black</item>
|
||||
<item name="header_background_before_blur">@color/black</item>
|
||||
<item name="header_background_before_blur_alternate">@color/black</item>
|
||||
<item name="header_search_field_background">@color/gray_700</item>
|
||||
@@ -1689,7 +1689,7 @@
|
||||
<item name="stories_skeleton_loader_background">@color/gray_700</item>
|
||||
<item name="switch_ios_off_border">@color/black</item>
|
||||
<item name="tabbar_active_icon">@color/white</item>
|
||||
<item name="tabbar_background">@color/gray_900</item>
|
||||
<item name="tabbar_background">@color/black</item>
|
||||
<item name="tabbar_inactive_icon">@color/gray_500</item>
|
||||
<item name="text_action_counter">@color/gray_300</item>
|
||||
<item name="text_link">@color/sky_300</item>
|
||||
@@ -4803,7 +4803,7 @@
|
||||
<item name="header_alternate_tab_active_indicator">@color/gray_100</item>
|
||||
<item name="header_alternate_tab_active_text">@color/gray_100</item>
|
||||
<item name="header_alternate_tab_inactive_text">@color/gray_500</item>
|
||||
<item name="header_background">@color/gray_900</item>
|
||||
<item name="header_background">@color/black</item>
|
||||
<item name="header_background_before_blur">@color/gray_950</item>
|
||||
<item name="header_background_before_blur_alternate">@color/gray_950</item>
|
||||
<item name="header_search_field_background">@color/gray_700</item>
|
||||
@@ -4902,7 +4902,7 @@
|
||||
<item name="stories_skeleton_loader_background">@color/gray_700</item>
|
||||
<item name="switch_ios_off_border">@color/black</item>
|
||||
<item name="tabbar_active_icon">@color/white</item>
|
||||
<item name="tabbar_background">@color/gray_900</item>
|
||||
<item name="tabbar_background">@color/black</item>
|
||||
<item name="tabbar_inactive_icon">@color/gray_500</item>
|
||||
<item name="text_action_counter">@color/gray_300</item>
|
||||
<item name="text_link">@color/sky_300</item>
|
||||
@@ -7500,7 +7500,7 @@
|
||||
<item name="header_alternate_tab_active_indicator">@color/gray_100</item>
|
||||
<item name="header_alternate_tab_active_text">@color/gray_100</item>
|
||||
<item name="header_alternate_tab_inactive_text">@color/gray_500</item>
|
||||
<item name="header_background">@color/gray_900</item>
|
||||
<item name="header_background">@color/black</item>
|
||||
<item name="header_background_before_blur">@color/gray_950</item>
|
||||
<item name="header_background_before_blur_alternate">@color/gray_950</item>
|
||||
<item name="header_search_field_background">@color/gray_700</item>
|
||||
@@ -7681,7 +7681,7 @@
|
||||
<item name="stories_skeleton_loader_background">@color/gray_700</item>
|
||||
<item name="switch_ios_off_border">@color/gray_800</item>
|
||||
<item name="tabbar_active_icon">@color/white</item>
|
||||
<item name="tabbar_background">@color/gray_900</item>
|
||||
<item name="tabbar_background">@color/black</item>
|
||||
<item name="tabbar_inactive_icon">@color/gray_500</item>
|
||||
<item name="text_action_counter">@color/gray_300</item>
|
||||
<item name="text_link">@color/sky_300</item>
|
||||
|
||||
@@ -41,10 +41,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="vkme_msg"
|
||||
android:title="@string/debug_experimental_vk_me_mode" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="libverify"
|
||||
@@ -69,6 +65,10 @@
|
||||
android:defaultValue="true"
|
||||
android:key="disableanimstickers"
|
||||
android:title="Disable anim stickers + suggestions" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="useNewSettings"
|
||||
android:title="Use New Settings" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/debug_developer_functions">
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
|
||||
@@ -34,16 +34,6 @@
|
||||
<PreferenceCategory
|
||||
android:key="multimedia"
|
||||
android:title="@string/sett_media">
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="compressPhotos"
|
||||
android:title="@string/sett_compress_photos"
|
||||
app:singleLine="false" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="compressVideos"
|
||||
android:title="@string/sett_compress_videos"
|
||||
app:singleLine="false" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="saveProcessedImage"
|
||||
|
||||
@@ -75,5 +75,9 @@
|
||||
android:key="dockcounter"
|
||||
android:summary="@string/docknumberssum"
|
||||
android:title="@string/docknumbers" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="disableSettingsSumms"
|
||||
android:title="@string/vtlhidesumm" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
@@ -12,6 +12,29 @@
|
||||
android:title="@string/roundedmsgs" />
|
||||
<com.vtosters.lite.ui.MaterialSectionDividerPreference />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/sett_media">
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="compressPhotos"
|
||||
android:title="@string/sett_compress_photos" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="compressVideos"
|
||||
android:title="@string/sett_compress_videos" />
|
||||
<com.vtosters.lite.ui.MaterialSectionDividerPreference />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="VK Me">
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="vkme"
|
||||
android:summary="@string/vkmesumm"
|
||||
android:title="@string/vkme" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="vkme_notifs"
|
||||
android:title="@string/vkme_notifs" />
|
||||
<com.vtosters.lite.ui.MaterialSectionDividerPreference />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/interfaceemoji">
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
|
||||
@@ -24,5 +24,9 @@
|
||||
android:key="gcmfix"
|
||||
android:summary="@string/vk_fix_music_summary"
|
||||
android:title="@string/vk_fix_music" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="musicFixNew"
|
||||
android:title="Фикс музыки v2" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
@@ -19,11 +19,6 @@
|
||||
android:entryValues="@array/lighttheme"
|
||||
android:key="lighttheme"
|
||||
android:title="@string/appearance_theme_light_theme" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="systemtheme"
|
||||
android:summary="@string/appearance_theme_use_system_summary"
|
||||
android:title="@string/appearance_theme_use_system" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="oldicons"
|
||||
|
||||
@@ -542,6 +542,10 @@
|
||||
iget-object v1, p0, Landroid/support/v7/widget/ToolbarWidgetWrapper;->q:Landroid/graphics/drawable/Drawable;
|
||||
|
||||
:goto_0
|
||||
invoke-static {v1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/support/v7/widget/Toolbar;->setNavigationIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
goto :goto_1
|
||||
|
||||
@@ -3610,6 +3610,10 @@
|
||||
|
||||
const-class v2, Lcom/vtosters/lite/fragments/SettingsListFragment;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->useNewSettings()Ljava/lang/Class;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
invoke-direct {v0, v2, v12}, Lcom/vk/navigation/Navigator;-><init>(Ljava/lang/Class;Landroid/os/Bundle;)V
|
||||
|
||||
invoke-virtual {v0, v1}, Lcom/vk/navigation/Navigator;->c(Landroid/content/Context;)V
|
||||
@@ -4670,6 +4674,10 @@
|
||||
|
||||
const-class v0, Lcom/vtosters/lite/fragments/SettingsListFragment;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->useNewSettings()Ljava/lang/Class;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-direct {v8, v0}, Lcom/vk/navigation/Navigator;-><init>(Ljava/lang/Class;)V
|
||||
|
||||
invoke-virtual {v8, v1}, Lcom/vk/navigation/Navigator;->a(Landroid/content/Context;)Landroid/content/Intent;
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result v1
|
||||
|
||||
|
||||
@@ -2651,6 +2651,10 @@
|
||||
|
||||
check-cast v0, Landroid/graphics/drawable/Drawable;
|
||||
|
||||
invoke-static {v0}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-virtual {p1, v0}, Landroid/support/v7/widget/Toolbar;->setNavigationIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
:goto_0
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result v1
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -343,7 +343,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
@@ -832,7 +832,11 @@
|
||||
|
||||
sget v1, Lcom/vk/im/ui/R$e;->vkim_ic_verified:I
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/support/v7/widget/AppCompatImageView;->setImageResource(I)V
|
||||
invoke-static {v1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableInt(I)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/support/v7/widget/AppCompatImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
.line 116
|
||||
iget-object v0, v9, Lcom/vk/im/ui/views/dialogs/DialogItemView;->s:Landroid/support/v7/widget/AppCompatImageView;
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setTextSize(F)V
|
||||
|
||||
.line 180
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getHeaderText()I
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getSTextAttr()I
|
||||
|
||||
move-result v1
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -5556,6 +5556,31 @@
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-virtual {p0, p1}, Landroid/support/v7/widget/Toolbar;->setNavigationIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public setNavigationIconAcent(I)V
|
||||
.locals 1
|
||||
|
||||
.line 939
|
||||
invoke-virtual {p0}, Landroid/support/v7/widget/Toolbar;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-static {v0, p1}, Landroid/support/v7/c/a/AppCompatResources;->b(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Themes;->recolorDrawable(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-virtual {p0, p1}, Landroid/support/v7/widget/Toolbar;->setNavigationIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
return-void
|
||||
@@ -5629,7 +5654,7 @@
|
||||
|
||||
if-eqz v3, :cond_228
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Themes;->recolorDrawable(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
@@ -5680,6 +5705,10 @@
|
||||
.line 1017
|
||||
iget-object v0, p0, Landroid/support/v7/widget/Toolbar;->e:Landroid/support/v7/widget/ActionMenuView;
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-virtual {v0, p1}, Landroid/support/v7/widget/ActionMenuView;->setOverflowIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
return-void
|
||||
|
||||
@@ -191,6 +191,10 @@
|
||||
|
||||
invoke-static {p2, p3}, Landroid/support/v4/a/a/DrawableCompat;->a(Landroid/graphics/drawable/Drawable;I)V
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
.line 53
|
||||
invoke-virtual {p0, p1}, Landroid/support/v7/widget/Toolbar;->setOverflowIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
|
||||
# instance fields
|
||||
.field private final b:I
|
||||
.field public final b:I
|
||||
|
||||
.field private final c:Lcom/vk/im/engine/models/typing/ComposingType;
|
||||
|
||||
|
||||
@@ -370,7 +370,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -861,7 +861,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->roundedmsgs()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -96,6 +96,13 @@
|
||||
|
||||
move-result p2
|
||||
|
||||
.line 180
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTextAttr()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {p1, v1}, Landroid/widget/TextView;->setTextColor(I)V
|
||||
|
||||
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(I)V
|
||||
|
||||
return-void
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
|
||||
move-result-object v0
|
||||
|
||||
const/4 v1, 0x0
|
||||
const/4 v1, 0x1
|
||||
|
||||
invoke-virtual {v0, v1}, Lcom/vk/imageloader/view/VKImageView;->setClickable(Z)V
|
||||
|
||||
|
||||
@@ -254,6 +254,14 @@
|
||||
|
||||
iput-object p1, p0, Lcom/vk/sharing/view/SharingView;->l:Landroid/view/View;
|
||||
|
||||
iget-object p1, p0, Lcom/vk/sharing/view/SharingView;->l:Landroid/view/View;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {p1, v1}, Landroid/view/View;->setBackgroundColor(I)V
|
||||
|
||||
const/16 p1, 0x200
|
||||
|
||||
.line 269
|
||||
@@ -342,6 +350,14 @@
|
||||
|
||||
iput-object p1, p0, Lcom/vk/sharing/view/SharingView;->p:Landroid/widget/TextView;
|
||||
|
||||
iget-object p1, p0, Lcom/vk/sharing/view/SharingView;->p:Landroid/widget/TextView;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTextAttr()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {p1, v1}, Landroid/widget/TextView;->setTextColor(I)V
|
||||
|
||||
const p1, 0x7f0a09ea
|
||||
|
||||
.line 281
|
||||
@@ -353,6 +369,12 @@
|
||||
|
||||
iput-object p1, p0, Lcom/vk/sharing/view/SharingView;->q:Landroid/widget/TextView;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getSTextAttr()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {p1, v1}, Landroid/widget/TextView;->setTextColor(I)V
|
||||
|
||||
.line 283
|
||||
new-instance p1, Lcom/vk/sharing/view/SharingView$1;
|
||||
|
||||
@@ -504,6 +526,12 @@
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {p1, v1}, Landroid/view/View;->setBackgroundColor(I)V
|
||||
|
||||
check-cast p1, Lcom/vk/sharing/view/SharingActionsView;
|
||||
|
||||
iput-object p1, p0, Lcom/vk/sharing/view/SharingView;->H:Lcom/vk/sharing/view/SharingActionsView;
|
||||
@@ -528,6 +556,14 @@
|
||||
|
||||
iput-object p1, p0, Lcom/vk/sharing/view/SharingView;->I:Landroid/widget/LinearLayout;
|
||||
|
||||
iget-object p1, p0, Lcom/vk/sharing/view/SharingView;->I:Landroid/widget/LinearLayout;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {p1, v1}, Landroid/widget/LinearLayout;->setBackgroundColor(I)V
|
||||
|
||||
.line 370
|
||||
new-instance p1, Lcom/vk/sharing/view/SharingView$16;
|
||||
|
||||
@@ -2209,6 +2245,14 @@
|
||||
|
||||
iput-object v0, p0, Lcom/vk/sharing/view/SharingView;->O:Landroid/view/View;
|
||||
|
||||
iget-object v0, p0, Lcom/vk/sharing/view/SharingView;->O:Landroid/view/View;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundColor(I)V
|
||||
|
||||
.line 711
|
||||
iget-object v0, p0, Lcom/vk/sharing/view/SharingView;->O:Landroid/view/View;
|
||||
|
||||
@@ -2244,6 +2288,14 @@
|
||||
|
||||
iput-object v0, p0, Lcom/vk/sharing/view/SharingView;->P:Landroid/view/View;
|
||||
|
||||
iget-object v0, p0, Lcom/vk/sharing/view/SharingView;->P:Landroid/view/View;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundColor(I)V
|
||||
|
||||
.line 719
|
||||
iget-object v0, p0, Lcom/vk/sharing/view/SharingView;->P:Landroid/view/View;
|
||||
|
||||
@@ -2279,6 +2331,14 @@
|
||||
|
||||
iput-object v0, p0, Lcom/vk/sharing/view/SharingView;->Q:Landroid/view/View;
|
||||
|
||||
iget-object v0, p0, Lcom/vk/sharing/view/SharingView;->Q:Landroid/view/View;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result v1
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundColor(I)V
|
||||
|
||||
.line 727
|
||||
iget-object v0, p0, Lcom/vk/sharing/view/SharingView;->Q:Landroid/view/View;
|
||||
|
||||
|
||||
@@ -85,9 +85,7 @@
|
||||
|
||||
invoke-static {v0}, Lcom/vtosters/lite/fragments/SettingsListFragment;->b(Lcom/vtosters/lite/fragments/SettingsListFragment;)V
|
||||
|
||||
const-string v0, "\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435!"
|
||||
|
||||
invoke-static {v0}, Lcom/vk/core/util/ToastUtils;->a(Ljava/lang/CharSequence;)V
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Globals;->restartApplicationWithTimer()V
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
@@ -835,6 +835,12 @@
|
||||
|
||||
invoke-virtual {v0, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result v5
|
||||
|
||||
if-nez v5, :cond_228
|
||||
|
||||
new-instance v5, Lcom/vtosters/lite/fragments/SettingsListFragment$a;
|
||||
|
||||
const v6, 0x7f0803bc
|
||||
@@ -867,6 +873,7 @@
|
||||
|
||||
invoke-virtual {v0, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
||||
|
||||
:cond_228
|
||||
new-instance v5, Lcom/vtosters/lite/fragments/SettingsListFragment$a;
|
||||
|
||||
const v6, 0x7f08067b
|
||||
|
||||
@@ -246,6 +246,10 @@
|
||||
|
||||
move-result p1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result p1
|
||||
|
||||
invoke-virtual {p0, p1}, Lcom/vk/im/ui/views/WriteBarDisabled;->setBackgroundColor(I)V
|
||||
|
||||
const/16 p1, 0x11
|
||||
@@ -307,6 +311,10 @@
|
||||
|
||||
const/4 p1, -0x1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Themes;->getTabbarBackground()I
|
||||
|
||||
move-result p1
|
||||
|
||||
.line 57
|
||||
invoke-virtual {p0, p1}, Lcom/vk/im/ui/views/WriteBarDisabled;->setBackgroundColor(I)V
|
||||
|
||||
|
||||
@@ -566,11 +566,7 @@
|
||||
|
||||
.line 65
|
||||
:cond_0
|
||||
invoke-static {p0}, Lru/vtosters/lite/ui/dialogs/Start;->alert(Landroid/app/Activity;)V
|
||||
|
||||
invoke-static {p0}, Lru/vtosters/lite/ui/dialogs/InstallGMS;->alert(Landroid/app/Activity;)V
|
||||
|
||||
invoke-static {p0}, Lru/vtosters/lite/ui/dialogs/DisableBattery;->alert(Landroid/app/Activity;)V
|
||||
invoke-static {p0}, Lru/vtosters/lite/utils/Globals;->MainActivityInit(Landroid/app/Activity;)V
|
||||
|
||||
invoke-virtual {p0}, Lcom/vtosters/lite/MainActivity;->getWindow()Landroid/view/Window;
|
||||
|
||||
|
||||
@@ -568,6 +568,10 @@
|
||||
|
||||
invoke-static {v1, v2}, Landroid/support/v4/a/a/DrawableCompat;->a(Landroid/graphics/drawable/Drawable;I)V
|
||||
|
||||
invoke-static {v1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
.line 627
|
||||
invoke-virtual {v0, v1}, Landroid/support/v7/widget/Toolbar;->setOverflowIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
|
||||
@@ -586,6 +586,10 @@
|
||||
|
||||
check-cast v0, Landroid/graphics/drawable/Drawable;
|
||||
|
||||
invoke-static {v0}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-virtual {p2, v0}, Landroid/support/v7/widget/Toolbar;->setNavigationIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
const v0, 0x7f11062b
|
||||
|
||||
@@ -2318,6 +2318,10 @@
|
||||
.line 554
|
||||
iget-object v0, p0, Landroid/support/v7/widget/ActionMenuView;->g:Landroid/support/v7/widget/ActionMenuPresenter;
|
||||
|
||||
invoke-static {p1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-virtual {v0, p1}, Landroid/support/v7/widget/ActionMenuPresenter;->a(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
return-void
|
||||
|
||||
@@ -207,6 +207,17 @@
|
||||
|
||||
check-cast v4, Ljava/lang/String;
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->gcmfix()Z
|
||||
|
||||
move-result v6
|
||||
|
||||
if-eqz v6, :cond_10
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/audio/gcm/GCMFix;->requestTokenV2()Ljava/lang/String;
|
||||
|
||||
move-result-object v4
|
||||
|
||||
:cond_10
|
||||
invoke-virtual {v0, v3, v4}, Lcom/vk/api/internal/MethodCall$a;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/vk/api/internal/MethodCall$a;
|
||||
|
||||
const-string v3, "nonce"
|
||||
|
||||
@@ -85,6 +85,10 @@
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-static {v1}, Lru/vtosters/lite/utils/Themes;->recolorDrawableToolbar(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-virtual {v0, v1}, Landroid/support/v7/widget/Toolbar;->setNavigationIcon(Landroid/graphics/drawable/Drawable;)V
|
||||
|
||||
.line 49
|
||||
|
||||
@@ -673,7 +673,7 @@
|
||||
|
||||
move-result p1
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result p1
|
||||
|
||||
@@ -1127,7 +1127,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -2617,7 +2617,7 @@
|
||||
|
||||
move-result v0
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result v0
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@
|
||||
|
||||
move-result p2
|
||||
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme_msg()Z
|
||||
invoke-static {}, Lru/vtosters/lite/utils/Preferences;->vkme()Z
|
||||
|
||||
move-result p2
|
||||
|
||||
|
||||