Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfa7ba031e | ||
|
|
6ddea672ad | ||
|
|
047378a11d | ||
|
|
3420c4abb0 | ||
|
|
15a8d70f5f | ||
|
|
91f90a6609 | ||
|
|
e170b70999 | ||
|
|
b489011d24 | ||
|
|
58adfbd261 | ||
|
|
3bb18b6daf | ||
|
|
120bf18416 | ||
|
|
428c4ef7d6 | ||
|
|
40fc05fc15 | ||
|
|
2e913223a2 | ||
|
|
48f12a912c | ||
|
|
0228c0b8a1 | ||
|
|
ba07aeb4d7 | ||
|
|
529b13f18b | ||
|
|
5720fddb59 | ||
|
|
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 | ||
|
|
c60b766f37 | ||
|
|
da9ded2ae1 | ||
|
|
29eb517bb9 | ||
|
|
84a3f6caff | ||
|
|
b34821463a | ||
|
|
127abbaaeb | ||
|
|
d462d42775 | ||
|
|
5e80ad7e4e | ||
|
|
e1aadade5f | ||
|
|
77d6f5d977 | ||
|
|
c4ae2ec0a3 |
@@ -34,7 +34,6 @@ jobs:
|
||||
|
||||
- name: Build VTLite
|
||||
run: |
|
||||
git checkout master
|
||||
bash scripts/buildworkflow.sh
|
||||
|
||||
- name: Sign and verify the apk
|
||||
|
||||
@@ -21,13 +21,13 @@ android:debuggable="false" -> android:debuggable="true"
|
||||
|
||||
Для дополнительной отладки ответов, доп логов и подмены данных для дебаг приложения необходимо включить **Режим разработчика**
|
||||
```
|
||||
Настройки -> Для разработчиков -> Режим разработчика
|
||||
Настройки -> О приложении -> Для разработчиков -> Режим разработчика
|
||||
```
|
||||
|
||||
Для просмотра трафика необходимо отключить функцию **SSL Pinning**
|
||||
|
||||
```
|
||||
Настройки -> Для разработчиков -> SSL Pinning
|
||||
Настройки -> О приложении -> Для разработчиков -> SSL Pinning
|
||||
```
|
||||
|
||||
Для логгирования внутренних запросов к API необходимо включить функции **Логгирование API**
|
||||
@@ -35,12 +35,12 @@ android:debuggable="false" -> android:debuggable="true"
|
||||
(Работает только при использовании внутреннего логгера!)
|
||||
|
||||
```
|
||||
Настройки -> Для разработчиков -> Логгирование API
|
||||
Настройки -> О приложении -> Для разработчиков -> Логгирование API
|
||||
```
|
||||
|
||||
Для использования внутреннего логгера необходимо включить функции **Запись логов в файл**
|
||||
```
|
||||
Настройки -> Для разработчиков -> Запись логов в файл
|
||||
Настройки -> О приложении -> Для разработчиков -> Запись логов в файл
|
||||
```
|
||||
Сразу после нажатия на запись аппа начнет записывать **все действия** в файлы по пути
|
||||
```
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.vk.core.ui.themes;
|
||||
|
||||
import com.vk.s.R;
|
||||
|
||||
import ru.vtosters.lite.utils.Themes;
|
||||
|
||||
public enum VKTheme {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,6 @@ import android.support.v7.app.AlertDialog;
|
||||
import androidx.exifinterface.media.ExifInterface;
|
||||
|
||||
import com.vk.core.dialogs.alert.VkAlertDialog;
|
||||
import com.vtosters.lite.R;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
|
||||
@@ -45,6 +45,20 @@ public class PreferencesUtil {
|
||||
fragment.ay().d(preference); // fragment.getPreferenceScreen().addPreference(preference)
|
||||
}
|
||||
|
||||
public static void addListPreferenceIcon(MaterialPreferenceToolbarFragment fragment, String key, String def, CharSequence title, String icon, CharSequence summary, CharSequence[] entries, CharSequence[] entriesValue) {
|
||||
ListPreference preference = new ListPreference(getContext());
|
||||
preference.a(entries);
|
||||
preference.b(entriesValue);
|
||||
preference.b(summary); // setSummary
|
||||
preference.c(title); // setTitle
|
||||
preference.a(title); // setDialogTitle
|
||||
preference.d(key); // setKey
|
||||
preference.b(def); // setDefaultValue
|
||||
if (icon != null)
|
||||
preference.a(setTint(getContext(), getDrawable(getContext(), icon))); // preference.setIcon
|
||||
fragment.ay().d(preference); // fragment.getPreferenceScreen().addPreference(preference)
|
||||
}
|
||||
|
||||
public static void addMaterialSwitchPreference(MaterialPreferenceToolbarFragment materialPreferenceToolbarFragment, String key, CharSequence title, CharSequence summary, boolean defValue) {
|
||||
MaterialSwitchPreference materialSwitchPreference = new MaterialSwitchPreference(getContext());
|
||||
materialSwitchPreference.c(title); // setTitle
|
||||
@@ -118,6 +132,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.CacheUtils.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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.CacheUtils.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,408 @@
|
||||
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.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.CacheUtils.humanReadableByteCountBin;
|
||||
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;
|
||||
import ru.vtosters.lite.utils.CacheUtils;
|
||||
|
||||
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.addListPreferenceIcon(this, "clearcache", "Default", getString("autoclearcache"), "ic_delete_24", getString("autoclearcachesumm") + " " + humanReadableByteCountBin(CacheUtils.getInstance().size), new CharSequence[]{
|
||||
getString("autoclearcachedisabled"), "100 MB", "500 MB", "1 GB", "2 GB", "5 GB"
|
||||
}, new String[]{
|
||||
"Default", "100mb", "500mb", "1gb", "2gb", "5gb"
|
||||
});
|
||||
|
||||
|
||||
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() || workingAccounts() <= 1) return "";
|
||||
|
||||
return getString("vtlmultiaccsumm") + ": " + workingAccounts();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int aq() {
|
||||
return getIdentifier("notification_settings", "string");
|
||||
}
|
||||
}
|
||||
@@ -8,12 +8,13 @@ import android.os.Bundle;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.a.ItemTouchHelper;
|
||||
import android.view.ContextThemeWrapper;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import me.grishka.appkit.fragments.ToolbarFragment;
|
||||
|
||||
@@ -40,7 +41,7 @@ public class DockBarFragment extends ToolbarFragment {
|
||||
);
|
||||
container.addView(buttonsContainer, new LinearLayout.LayoutParams(-1, -2));
|
||||
|
||||
Button save = new Button(n());
|
||||
TextView save = new TextView(new ContextThemeWrapper(n(), com.vtosters.lite.R.style.VKUIButton_Primary));
|
||||
save.setText(getString("dockbar_save"));
|
||||
save.setOnClickListener(v -> {
|
||||
DockBarManager.getInstance().save();
|
||||
@@ -54,7 +55,7 @@ public class DockBarFragment extends ToolbarFragment {
|
||||
View divider = new View(n());
|
||||
buttonsContainer.addView(divider, new LinearLayout.LayoutParams(convertDpToPixel(10), 0));
|
||||
|
||||
Button reset = new Button(n());
|
||||
TextView reset = new TextView(new ContextThemeWrapper(n(), com.vtosters.lite.R.style.VKUIButton_Primary));
|
||||
reset.setText(getString("dockbar_reset"));
|
||||
reset.setOnClickListener(v -> {
|
||||
DockBarManager.getInstance().delete();
|
||||
|
||||
@@ -3,7 +3,10 @@ package ru.vtosters.lite.ui.fragments.dockbar;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.getString;
|
||||
import static ru.vtosters.lite.utils.Preferences.newfeed;
|
||||
import static ru.vtosters.lite.utils.Preferences.olddock;
|
||||
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,11 +81,19 @@ public class DockBarManager {
|
||||
File dockbar = new File(getContext().getFilesDir(), "dockbar.json");
|
||||
|
||||
if (!dockbar.exists()) {
|
||||
mSelectedTabs.add(new DockBarTab("tab_news", olddock() ? 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", olddock() ? 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", olddock() ? 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_feedback", olddock() ? 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_menu", olddock() ? R.drawable.ic_menu_more_28 : R.drawable.ic_menu_more_outline_28, R.string.menu, R.id.tab_menu, MenuFragment.class));
|
||||
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));
|
||||
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_menu", oldicons() ? R.drawable.ic_menu_more_28 : R.drawable.ic_menu_more_outline_28, R.string.menu, R.id.tab_menu, MenuFragment.class));
|
||||
|
||||
mDisabledTabs.add(new DockBarTab("tab_friends", R.drawable.ic_user_24, R.string.friends, R.id.menu_friends, FriendsFragment.class));
|
||||
mDisabledTabs.add(new DockBarTab("tab_groups", R.drawable.ic_users_24, R.string.groups, R.id.menu_groups, GroupsFragment.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() + 1).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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static ru.vtosters.lite.utils.Globals.sendToast;
|
||||
import static ru.vtosters.lite.utils.Preferences.dev;
|
||||
import static ru.vtosters.lite.utils.Preferences.getSizeForDelete;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.CharacterIterator;
|
||||
import java.text.StringCharacterIterator;
|
||||
import java.util.Objects;
|
||||
|
||||
public class CacheUtils {
|
||||
private static CacheUtils sInstance = new CacheUtils();
|
||||
public long size = 0;
|
||||
|
||||
public static CacheUtils getInstance() {
|
||||
if (sInstance == null)
|
||||
sInstance = new CacheUtils();
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
public void autoCleaningCache() {
|
||||
size = getDirSize(getContext().getCacheDir());
|
||||
|
||||
if(size >= getSizeForDelete()) {
|
||||
if(dev()) sendToast("Кэш очищен");
|
||||
deleteCache();
|
||||
size = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public long getDirSize(File dir){
|
||||
long size = 0;
|
||||
for (File file : Objects.requireNonNull(dir.listFiles())) {
|
||||
if (file != null && file.isDirectory()) {
|
||||
size += getDirSize(file);
|
||||
} else if (file != null && file.isFile()) {
|
||||
size += file.length();
|
||||
}
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public static String humanReadableByteCountBin(long bytes) {
|
||||
long absB = bytes == Long.MIN_VALUE ? Long.MAX_VALUE : Math.abs(bytes);
|
||||
if (absB < 1024) {
|
||||
return bytes + " B";
|
||||
}
|
||||
long value = absB;
|
||||
CharacterIterator ci = new StringCharacterIterator("KMGTPE");
|
||||
for (int i = 40; i >= 0 && absB > 0xfffccccccccccccL >> i; i -= 10) {
|
||||
value >>= 10;
|
||||
ci.next();
|
||||
}
|
||||
value *= Long.signum(bytes);
|
||||
return String.format("%.1f %cB", value / 1024.0, ci.current());
|
||||
}
|
||||
}
|
||||
@@ -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,17 +35,26 @@ 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.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 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 +63,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 +121,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 +167,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 +200,6 @@ public class Globals {
|
||||
return null;
|
||||
} // Getting the global context through reflection to use context on application initialization
|
||||
|
||||
|
||||
public static boolean isGmsInstalled() {
|
||||
try {
|
||||
getContext().getPackageManager().getPackageInfo("com.google.android.gms", 0);
|
||||
@@ -254,6 +337,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,8 +1,11 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static android.os.Build.VERSION;
|
||||
import static java.lang.Long.MAX_VALUE;
|
||||
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.CacheUtils.getInstance;
|
||||
import static ru.vtosters.lite.utils.DeletedMessagesHandler.reloadMessagesList;
|
||||
import static ru.vtosters.lite.utils.Globals.fixGapps;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
@@ -15,23 +18,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,15 +56,20 @@ public class Preferences {
|
||||
migrate();
|
||||
reloadMessagesList();
|
||||
registerActivities(application);
|
||||
LoadLibrary("vkopustest");
|
||||
if(dev()){
|
||||
LoadLibrary("vkopustest");
|
||||
}
|
||||
systemThemeChanger();
|
||||
getInstance().autoCleaningCache();
|
||||
} // VK Init
|
||||
|
||||
public static void forceOffline() {
|
||||
setupFilters();
|
||||
getInstance().autoCleaningCache();
|
||||
|
||||
if (setoffline() && !offline()) {
|
||||
Users.b();
|
||||
}
|
||||
setupFilters();
|
||||
}
|
||||
|
||||
public static boolean getBoolValue(String key, Boolean value) {
|
||||
@@ -74,7 +88,7 @@ public class Preferences {
|
||||
}
|
||||
|
||||
public static boolean systemtheme() {
|
||||
return getBoolValue("systemtheme", true);
|
||||
return getBoolValue("systemtheme", true) && VERSION.SDK_INT >= 28;
|
||||
}
|
||||
|
||||
public static boolean authorsrecomm() {
|
||||
@@ -113,8 +127,12 @@ public class Preferences {
|
||||
return getBoolValue("adsgroup", false);
|
||||
}
|
||||
|
||||
public static boolean olddock() {
|
||||
return getBoolValue("olddock", false);
|
||||
public static boolean oldicons() {
|
||||
return getBoolValue("oldicons", false);
|
||||
}
|
||||
|
||||
public static boolean vkme() {
|
||||
return getBoolValue("vkme", false);
|
||||
}
|
||||
|
||||
public static boolean adsslider() {
|
||||
@@ -137,6 +155,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 +221,7 @@ public class Preferences {
|
||||
}
|
||||
|
||||
public static boolean gcmfix() {
|
||||
return getBoolValue("gcmfix", true);
|
||||
return getBoolValue("gcmfix", true) && isValidSignature();
|
||||
}
|
||||
|
||||
public static boolean hasMusicSubscription() {
|
||||
@@ -338,14 +365,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 +414,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 +443,37 @@ public class Preferences {
|
||||
}
|
||||
}
|
||||
|
||||
public static long getSizeForDelete() {
|
||||
switch (getPrefsValue("clearcache")) {
|
||||
case "100mb":
|
||||
return 104857600L;
|
||||
case "500mb":
|
||||
return 524288000L;
|
||||
case "1gb":
|
||||
return 1073741824L;
|
||||
case "2gb":
|
||||
return 2147483648L;
|
||||
case "5gb":
|
||||
return 5368709120L;
|
||||
default:
|
||||
return MAX_VALUE;
|
||||
}
|
||||
}
|
||||
|
||||
public static int compress(int origquality) {
|
||||
if(getBoolValue("shakal", false)) return 5;
|
||||
if(!getBoolValue("compressPhotos", true)) return 100;
|
||||
return origquality;
|
||||
}
|
||||
|
||||
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,7 +1,13 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static android.view.View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
import static com.vk.im.ui.themes.ImTheme.VKAPP_AMOLED;
|
||||
import static com.vk.im.ui.themes.ImTheme.VKAPP_DARK;
|
||||
import static com.vk.im.ui.themes.ImTheme.VKAPP_LIGHT;
|
||||
import static com.vk.im.ui.themes.ImTheme.VKME_AMOLED;
|
||||
import static com.vk.im.ui.themes.ImTheme.VKME_DARK;
|
||||
import static com.vk.im.ui.themes.ImTheme.VKME_LIGHT;
|
||||
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;
|
||||
@@ -10,8 +16,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;
|
||||
@@ -45,6 +54,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();
|
||||
}
|
||||
@@ -127,9 +139,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
|
||||
|
||||
@@ -143,7 +155,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
|
||||
|
||||
@@ -155,8 +167,11 @@ public class Themes {
|
||||
return color_grishka() && Build.VERSION.SDK_INT >= 31;
|
||||
}
|
||||
|
||||
public static boolean isColorRefAccented(int i) {
|
||||
return i == R.color.cornflower_blue || i == R.color.cornflower_blue_two || i == R.color.dot_unread || i == R.color.music_action_button_blue || i == R.color.fave_promo_btn_pressed || i == R.color.im_back_to_vk_gradient_start || i == R.color.live_emoji_butt_hide || i == R.color.picker_tab_bg_selected || i == R.color.sky_300 || i == R.color.text_blue || i == R.color.tw__blue_default || i == R.color.tw__blue_pressed || i == R.color.white_blue32 || i == R.color.name || i == R.color.picker_blue || i == R.color.picker_blue_pressed || i == R.color.picker_tab_text_selected || i == R.color.sharing_blue_btn_pressed || i == R.color.sharing_blue_btn_normal || i == R.color.tip_background || i == R.color.vkim_msg_sending_ic || i == R.color.vkim_playing_drawable_rect || i == R.color.accent_blue || i == R.color.light_blue_gray || i == R.color.light_blue || i == R.color.blue_200 || i == R.color.header_blue || i == R.color.blue_200_muted || i == R.color.im_old_accent || i == R.color.im_old_accent_muted || i == R.color.im_dark_accent || i == R.color.im_dark_accent_muted || i == R.color.azure_A400 || i == R.color.blue || i == R.color.blue_400 || i == R.color.blue_300 || i == R.color.cool_blue;
|
||||
public static boolean isColorRefAccented(int color) {
|
||||
for (int accent : new int[]{R.color.accent_blue, R.color.azure_A400, R.color.blue, R.color.blue_200, R.color.blue_200_muted, R.color.blue_300, R.color.blue_400, R.color.cool_blue, R.color.cornflower_blue, R.color.cornflower_blue_two, R.color.dot_unread, R.color.fave_promo_btn_pressed, R.color.header_blue, R.color.im_back_to_vk_gradient_start, R.color.im_dark_accent, R.color.im_dark_accent_muted, R.color.im_old_accent, R.color.im_old_accent_muted, R.color.light_blue, R.color.light_blue_gray, R.color.live_emoji_butt_hide, R.color.music_action_button_blue, R.color.name, R.color.picker_blue, R.color.picker_blue_pressed, R.color.picker_tab_bg_selected, R.color.picker_tab_text_selected, R.color.sharing_blue_btn_normal, R.color.sharing_blue_btn_pressed, R.color.sky_300, R.color.text_blue, R.color.tip_background, R.color.tw__blue_default, R.color.tw__blue_pressed, R.color.vkim_msg_sending_ic, R.color.vkim_playing_drawable_rect, R.color.white_blue32}) {
|
||||
if(color == accent) return true;
|
||||
}
|
||||
return false;
|
||||
} // Accent colors
|
||||
|
||||
public static void themeMonetToolbar(ImageButton imageButton, Toolbar toolbar) {
|
||||
@@ -167,32 +182,60 @@ public class Themes {
|
||||
}
|
||||
|
||||
public static Drawable recolorDrawable(Drawable drawable) {
|
||||
if (drawable == null) {
|
||||
return null;
|
||||
}
|
||||
if (drawable == null) return null;
|
||||
return new RecoloredDrawable(drawable, getAccentColor());
|
||||
} // Recolor drawable to accent color
|
||||
|
||||
public static Drawable recolorVKIconMenu(Drawable drawable) {
|
||||
int accent = getHeaderText();
|
||||
|
||||
if (drawable == null) return null;
|
||||
|
||||
if(isAndroidMonet() || isDarkTheme()) accent = getAccentColor();
|
||||
|
||||
return new RecoloredDrawable(drawable, accent);
|
||||
} // Recolor vk icon to accent color
|
||||
|
||||
|
||||
public static Drawable recolorDrawableToolbar(Drawable drawable) {
|
||||
if (drawable == null) {
|
||||
return null;
|
||||
}
|
||||
if (drawable == null) return null;
|
||||
|
||||
if(!isAndroidMonet()) return drawable;
|
||||
|
||||
return new RecoloredDrawable(drawable, getHeaderText());
|
||||
} // Recolor toolbar drawable to accent color
|
||||
|
||||
@SuppressLint("UseCompatLoadingForDrawables")
|
||||
public static Drawable recolorDrawableInt(int drawable) {
|
||||
if(!isAndroidMonet()) return getResources().getDrawable(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;
|
||||
}
|
||||
if (colorStateList == null) return null;
|
||||
|
||||
if(!isAndroidMonet()) return colorStateList;
|
||||
|
||||
return ColorStateList.valueOf(getAccentColor());
|
||||
} // Recolor ColorStateList to accent color
|
||||
|
||||
@SuppressLint("UseCompatLoadingForColorStateLists")
|
||||
public static ColorStateList themeCSL(Context context, int color) {
|
||||
|
||||
if (isColorRefAccented(color) && isAndroidMonet()) {
|
||||
return ColorStateList.valueOf(getAccentColor());
|
||||
}
|
||||
|
||||
ColorStateList csl = context.getColorStateList(color);
|
||||
ColorStateList csl;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 23) {
|
||||
csl = context.getColorStateList(color);
|
||||
} else {
|
||||
csl = context.getResources().getColorStateList(color);
|
||||
}
|
||||
|
||||
try {
|
||||
int unsel = csl.getColorForState(new int[]{-android.R.attr.state_selected}, Color.BLACK);
|
||||
int sel = csl.getColorForState(new int[]{android.R.attr.state_selected}, Color.BLACK);
|
||||
@@ -230,6 +273,13 @@ public class Themes {
|
||||
return Color.argb(Color.alpha(color), red, green, blue);
|
||||
}
|
||||
|
||||
public static int fixTextColor(int resid) {
|
||||
if (resid == R.color.music_action_button_gray || resid == R.color.cool_grey || resid == R.color.accent_blue){
|
||||
return isDarkTheme()? R.color.white : R.color.cool_grey;
|
||||
}
|
||||
return resid;
|
||||
}
|
||||
|
||||
public static int halfAlpha(int src) {
|
||||
return ColorUtils.setAlphaComponent(src, 169);
|
||||
}
|
||||
@@ -305,24 +355,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;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="23" android:compileSdkVersionCodename="6.0-2438415" package="com.vtosters.lite" platformBuildVersionCode="23" platformBuildVersionName="6.0-2438415">
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="23" android:minSdkVersion="20" android:compileSdkVersionCodename="6.0-2438415" package="com.vtosters.lite" platformBuildVersionCode="23" platformBuildVersionName="6.0-2438415">
|
||||
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true"/>
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
|
||||
<uses-permission android:name="android.permission.CAMERA"/>
|
||||
@@ -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 |
@@ -2,5 +2,5 @@
|
||||
<shape android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="8.0dip" />
|
||||
<solid android:color="#10000c1a" />
|
||||
<solid android:color="?background_content" />
|
||||
</shape>
|
||||
@@ -23,7 +23,7 @@
|
||||
style="@style/VKUIText.Title1" />
|
||||
|
||||
<TextView
|
||||
android:textColor="?text_primary"
|
||||
android:textColor="?text_secondary"
|
||||
android:ellipsize="end"
|
||||
android:id="@id/label"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<TextView
|
||||
android:textSize="14.0dip"
|
||||
android:textStyle="normal"
|
||||
android:textColor="?header_text"
|
||||
android:textColor="?text_primary"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@id/playlist_title"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView android:textColorHint="?header_text"
|
||||
<TextView android:textColorHint="?text_primary"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="60.0dip"
|
||||
android:paddingRight="56.0dip"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
android:layout_height="fill_parent"
|
||||
android:src="@drawable/ic_back_24"
|
||||
android:scaleType="centerInside"
|
||||
android:tint="?header_text"
|
||||
android:tint="?text_primary"
|
||||
android:contentDescription="@string/music_talkback_go_back"
|
||||
android:layout_marginStart="8.0dip"
|
||||
style="@style/ActionButton.Gray" />
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
<com.vk.imageloader.view.VKImageView
|
||||
android:id="@id/iv_preview"
|
||||
android:background="@drawable/picker_bg_graffiti_preview_top"
|
||||
android:backgroundTint="?background_content"
|
||||
android:paddingLeft="32.0dip"
|
||||
android:paddingTop="32.0dip"
|
||||
android:paddingRight="32.0dip"
|
||||
@@ -35,11 +34,10 @@
|
||||
|
||||
<TextView
|
||||
android:textSize="14.0sp"
|
||||
android:textColor="?header_text"
|
||||
android:textColor="#ffffffff"
|
||||
android:gravity="center"
|
||||
android:id="@id/tv_send_button"
|
||||
android:background="@drawable/picker_bg_graffiti_preview_bottom"
|
||||
android:backgroundTint="?accent"
|
||||
android:paddingLeft="24.0dip"
|
||||
android:paddingRight="24.0dip"
|
||||
android:paddingBottom="24.0dip"
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
<TextView
|
||||
android:textSize="14.0dip"
|
||||
android:textColor="#ff8c8d8f"
|
||||
android:textColor="?text_secondary"
|
||||
android:ellipsize="marquee"
|
||||
android:id="@id/label"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
<TextView
|
||||
android:textSize="14.0dip"
|
||||
android:textColor="#ff8c8d8f"
|
||||
android:textColor="?text_secondary"
|
||||
android:ellipsize="marquee"
|
||||
android:id="@id/label"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
style="@style/VKUIText.Title1" />
|
||||
|
||||
<TextView
|
||||
android:textColor="@color/gray_400"
|
||||
android:textColor="?text_secondary"
|
||||
android:id="@id/label"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
android:singleLine="true" />
|
||||
|
||||
<TextView
|
||||
android:textColor="?text_secondary"
|
||||
android:textSize="14.0dip"
|
||||
android:ellipsize="marquee"
|
||||
android:id="@id/label"
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<EditText
|
||||
android:textSize="16.0dip"
|
||||
android:textColorHint="?header_text"
|
||||
android:textColorHint="?text_primary"
|
||||
android:id="@id/search_input"
|
||||
android:background="@null"
|
||||
android:paddingRight="16.0dip"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:id="@id/search_box"
|
||||
android:background="@drawable/bg_modern_search"
|
||||
android:background="@drawable/bg_modern_search_im_new"
|
||||
android:backgroundTint="?background_content"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
@@ -21,12 +21,12 @@
|
||||
android:layout_height="48.0dip"
|
||||
android:src="@drawable/ic_back_24"
|
||||
android:scaleType="centerInside"
|
||||
android:tint="?header_text" />
|
||||
android:tint="?text_primary" />
|
||||
|
||||
<com.vk.core.view.NoMenuEditText
|
||||
android:textSize="16.0dip"
|
||||
android:textColor="?header_text"
|
||||
android:textColorHint="?header_text_secondary"
|
||||
android:textColor="?text_primary"
|
||||
android:textColorHint="?text_secondary"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@id/query"
|
||||
android:background="@null"
|
||||
@@ -42,8 +42,8 @@
|
||||
|
||||
<TextView
|
||||
android:textSize="16.0dip"
|
||||
android:textColor="?header_text"
|
||||
android:textColorHint="?header_text_secondary"
|
||||
android:textColor="?text_primary"
|
||||
android:textColorHint="?text_secondary"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:id="@id/query_static"
|
||||
@@ -65,7 +65,7 @@
|
||||
android:layout_height="40.0dip"
|
||||
android:src="@drawable/ic_search_params_24"
|
||||
android:scaleType="centerInside"
|
||||
android:tint="?header_text" />
|
||||
android:tint="?text_primary" />
|
||||
|
||||
<ImageView
|
||||
android:layout_gravity="center_vertical"
|
||||
@@ -75,6 +75,6 @@
|
||||
android:layout_height="40.0dip"
|
||||
android:src="@drawable/ic_cancel_24"
|
||||
android:scaleType="centerInside"
|
||||
android:tint="?header_text" />
|
||||
android:tint="?text_primary" />
|
||||
</LinearLayout>
|
||||
</merge>
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
<com.vk.im.ui.views.FixTextView
|
||||
android:textSize="14.0sp"
|
||||
android:textColor="?text_primary"
|
||||
android:textColor="?text_secondary"
|
||||
android:ellipsize="end"
|
||||
android:id="@id/content_body"
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
@@ -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,10 @@
|
||||
<string name="proxysocks">Socks Прокси</string>
|
||||
<string name="proxystatic">Static Домен</string>
|
||||
<string name="reportbug">Сообщить о баге</string>
|
||||
<string name="autoclearcache">Автоочистка кэша</string>
|
||||
<string name="autoclearcachesumm">Размер кэша:</string>
|
||||
<string name="autoclearcachedisabled">Не очищать кэш</string>
|
||||
<string name="reportbugsumm">Репорты багов помогают нам их исправлять</string>
|
||||
<string name="restartapp">Перезапустите приложение</string>
|
||||
<string name="savedmsg">Сохраненные сообщения</string>
|
||||
<string name="selectacc">Выберите аккаунт</string>
|
||||
@@ -4290,7 +4295,7 @@
|
||||
<string name="appearance_other_color_webview_summary">Покраска страниц, таких как VKID, под тему приложения</string>
|
||||
|
||||
<string name="interface_global_old_icons">Старые иконки</string>
|
||||
<string name="interface_global_old_icons_summary">Использовать старые иконки в докбаре. Необходимо сбросить настройки докбара для применения изменений</string>
|
||||
<string name="interface_global_old_icons_summary">Необходимо сбросить настройки докбара для применения изменений</string>
|
||||
|
||||
<string name="activity_what_is_it">Что это за функция?</string>
|
||||
<string name="activity_dnr_summary">Функция позволяет вам не отправлять статус прочтения вами сообщения собеседника</string>
|
||||
@@ -4337,7 +4342,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 +4353,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 +4442,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 +4454,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>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<dimen name="notification_header_bottom_padding">4.0dip</dimen>
|
||||
<dimen name="notification_header_top_padding">17.0dip</dimen>
|
||||
<dimen name="picker_dimen">400.0dip</dimen>
|
||||
<dimen name="post_side_padding">32.0dip</dimen>
|
||||
<dimen name="post_side_padding">20.0dip</dimen>
|
||||
<dimen name="post_side_padding_btn">16.0dip</dimen>
|
||||
<dimen name="post_side_padding_info">56.0dip</dimen>
|
||||
<dimen name="post_side_padding_menu">20.0dip</dimen>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<resources>
|
||||
<dimen name="_post_side_padding">-32.0dip</dimen>
|
||||
<dimen name="gift_min_size">128.0dip</dimen>
|
||||
<dimen name="post_side_padding">32.0dip</dimen>
|
||||
<dimen name="post_side_padding">20.0dip</dimen>
|
||||
<dimen name="post_side_padding_btn">16.0dip</dimen>
|
||||
<dimen name="post_side_padding_info">56.0dip</dimen>
|
||||
<dimen name="post_side_padding_menu">20.0dip</dimen>
|
||||
|
||||
@@ -207,7 +207,13 @@
|
||||
|
||||
<style name="Base.Widget.AppCompat.ListView" parent="@android:style/Widget.Material.ListView" />
|
||||
|
||||
<style name="Base.Widget.AppCompat.ListView.DropDown" parent="@android:style/Widget.Material.ListView.DropDown" />
|
||||
<style name="Base.Widget.AppCompat.ListView.DropDown" parent="@android:style/Widget.Material.ListView.DropDown">
|
||||
<item name="android:background">?background_content</item>
|
||||
<item name="android:textColorPrimary">?text_primary</item>
|
||||
<item name="android:textColorSecondary">?text_secondary</item>
|
||||
<item name="android:titleTextAppearance">@style/ToolbarTitle</item>
|
||||
<item name="android:colorAccent">?accent</item>
|
||||
</style>
|
||||
|
||||
<style name="Base.Widget.AppCompat.ListView.Menu" parent="@style/Base.Widget.AppCompat.ListView" />
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<item name="accent">@android:color/system_accent1_100</item>
|
||||
<item name="text_primary">@android:color/system_accent1_50</item>
|
||||
<item name="text_secondary">@android:color/system_neutral2_200</item>
|
||||
<item name="android:textColorSecondary">?text_secondary</item>
|
||||
<item name="background_content">@android:color/system_neutral1_900</item>
|
||||
<item name="background_page">@android:color/system_neutral1_800</item>
|
||||
<item name="action_sheet_action_foreground">@color/white</item>
|
||||
@@ -116,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
|
||||
@@ -209,6 +210,7 @@
|
||||
<item name="accent">@android:color/system_accent1_500</item>
|
||||
<item name="text_primary">@android:color/system_accent1_900</item>
|
||||
<item name="text_secondary">@android:color/system_accent2_700</item>
|
||||
<item name="android:textColorSecondary">?text_secondary</item>
|
||||
<item name="background_content">@android:color/system_neutral1_10</item>
|
||||
<item name="background_page">@android:color/system_neutral1_50</item>
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
@@ -478,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>
|
||||
@@ -577,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>
|
||||
@@ -593,6 +595,7 @@
|
||||
<item name="toolbar_attach_background_to">@color/gray_600</item>
|
||||
<item name="writebar_icon">@color/gray_400</item>
|
||||
<item name="tabbar_fix">?tabbar_background</item>
|
||||
<item name="android:textColorSecondary">?text_secondary</item>
|
||||
</style>
|
||||
|
||||
<style name="VkIm.Theme.VkApp.Light" parent="@style/VkIm.Theme.VkApp">
|
||||
@@ -1241,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>
|
||||
@@ -1426,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>
|
||||
@@ -2082,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>
|
||||
@@ -2267,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>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<dimen name="picker_item_size_image">160.0dip</dimen>
|
||||
<dimen name="picker_item_size_image_small">140.0dip</dimen>
|
||||
<dimen name="picker_sticker_size">200.0dip</dimen>
|
||||
<dimen name="post_side_padding">32.0dip</dimen>
|
||||
<dimen name="post_side_padding">20.0dip</dimen>
|
||||
<dimen name="post_side_padding_btn">16.0dip</dimen>
|
||||
<dimen name="post_side_padding_info">56.0dip</dimen>
|
||||
<dimen name="post_side_padding_menu">20.0dip</dimen>
|
||||
|
||||
@@ -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,10 @@ 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="autoclearcache">Auto cleaning app cache</string>
|
||||
<string name="autoclearcachesumm">Cache size:</string>
|
||||
<string name="autoclearcachedisabled">"Don't clear cache"</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>
|
||||
@@ -4414,7 +4419,7 @@ May look like a fake leaving the online"</string>
|
||||
<string name="appearance_other_color_webview_summary">Color pages such as VKID in app theme</string>
|
||||
|
||||
<string name="interface_global_old_icons">Old icons</string>
|
||||
<string name="interface_global_old_icons_summary">Use old icons in dockbar. You should reset its setting to apply changes</string>
|
||||
<string name="interface_global_old_icons_summary">You should reset its setting to apply changes</string>
|
||||
|
||||
<string name="activity_what_is_it">What is it?</string>
|
||||
<string name="activity_dnr_summary">Function lets you don\'t send read message status</string>
|
||||
@@ -4463,7 +4468,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 +4479,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 +4585,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" />
|
||||
|
||||
@@ -38,14 +38,14 @@
|
||||
|
||||
<style name="ActionBarThemeFix" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
||||
<item name="android:textColorPrimary">@color/white</item>
|
||||
<item name="android:textColorSecondary">?header_tint</item>
|
||||
<item name="android:textColorSecondary">@color/white</item>
|
||||
<item name="android:selectableItemBackground">@drawable/highlight_toolbar</item>
|
||||
<item name="android:actionBarItemBackground">@drawable/highlight_icon_white_unbounded</item>
|
||||
<item name="colorAccent">@color/white</item>
|
||||
<item name="colorPrimary">@color/toolbar_blue_background</item>
|
||||
<item name="layout_scrollFlags">enterAlways|scroll|snap</item>
|
||||
<item name="titleTextAppearance">@style/ToolbarTitle</item>
|
||||
<item name="toolbarIconsColor">?header_text</item>
|
||||
<item name="toolbarIconsColor">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="ActionBarTheme.ItemsFull" parent="@style/ActionBarTheme" />
|
||||
@@ -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>
|
||||
@@ -2668,7 +2668,7 @@
|
||||
<item name="android:textSize">16.0dip</item>
|
||||
<item name="android:textStyle">normal</item>
|
||||
<item name="android:textColorHint">?header_text</item>
|
||||
<item name="android:background">@drawable/bg_modern_search</item>
|
||||
<item name="android:background">@drawable/bg_modern_search_im_new</item>
|
||||
<item name="android:backgroundTint">?background_content</item>
|
||||
<item name="android:maxLines">1</item>
|
||||
</style>
|
||||
@@ -3419,6 +3419,9 @@
|
||||
</style>
|
||||
|
||||
<style name="RtlOverlay.Widget.AppCompat.PopupMenuItem.Text" parent="@android:style/Widget">
|
||||
<item name="android:textColor">?text_primary</item>
|
||||
<item name="android:textColorPrimary">?text_primary</item>
|
||||
<item name="android:textColorSecondary">?text_secondary</item>
|
||||
<item name="android:textAlignment">viewStart</item>
|
||||
<item name="android:layout_alignParentStart">true</item>
|
||||
</style>
|
||||
@@ -4720,6 +4723,7 @@
|
||||
<item name="toolbar_attach_background_to">@color/steel_gray_250</item>
|
||||
<item name="writebar_icon">@color/azure_300</item>
|
||||
<item name="tabbar_fix">?accent</item>
|
||||
<item name="android:textColorSecondary">?text_secondary</item>
|
||||
</style>
|
||||
|
||||
<style name="Vk.Theme.client_amoled_generated" parent="@style/Vk.Theme.Dark">
|
||||
@@ -4799,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>
|
||||
@@ -4898,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>
|
||||
@@ -4914,6 +4918,7 @@
|
||||
<item name="toolbar_attach_background_to">@color/gray_600</item>
|
||||
<item name="writebar_icon">@color/gray_400</item>
|
||||
<item name="tabbar_fix">?tabbar_background</item>
|
||||
<item name="android:textColorSecondary">?text_secondary</item>
|
||||
</style>
|
||||
|
||||
<style name="Vk.Theme.client_dark_generated" parent="@style/Vk.Theme.Dark">
|
||||
@@ -5108,6 +5113,7 @@
|
||||
<item name="toolbar_attach_background_to">@color/gray_600</item>
|
||||
<item name="writebar_icon">@color/gray_400</item>
|
||||
<item name="tabbar_fix">?tabbar_background</item>
|
||||
<item name="android:textColorSecondary">?text_secondary</item>
|
||||
</style>
|
||||
|
||||
<style name="Vk.Theme.client_light_generated" parent="@style/Vk.Theme">
|
||||
@@ -5302,6 +5308,7 @@
|
||||
<item name="toolbar_attach_background_to">@color/steel_gray_250</item>
|
||||
<item name="writebar_icon">@color/steel_gray_300</item>
|
||||
<item name="tabbar_fix">?accent</item>
|
||||
<item name="android:textColorSecondary">?text_secondary</item>
|
||||
</style>
|
||||
|
||||
<style name="Vk.Theme.space_gray_generated" parent="@style/Vk.Theme">
|
||||
@@ -5495,6 +5502,7 @@
|
||||
<item name="toolbar_attach_background_from">@color/gray_500</item>
|
||||
<item name="toolbar_attach_background_to">@color/gray_600</item>
|
||||
<item name="writebar_icon">@color/gray_100</item>
|
||||
<item name="android:textColorSecondary">?text_secondary</item>
|
||||
</style>
|
||||
|
||||
<style name="VkAlertDialogTheme" parent="@style/Theme.AppCompat.Light.Dialog.Alert">
|
||||
@@ -6349,8 +6357,7 @@
|
||||
</style>
|
||||
|
||||
<style name="VkIm.Theme.Search.VkApp" parent="@style/VkIm.Theme.Search">
|
||||
<item name="search_bg">@drawable/bg_modern_search</item>
|
||||
<item name="android:tint">?background_content</item>
|
||||
<item name="search_bg">@drawable/bg_modern_search_im_new</item>
|
||||
</style>
|
||||
|
||||
<style name="VkIm.Theme.Search.VkMe" parent="@style/VkIm.Theme.Search">
|
||||
@@ -7493,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>
|
||||
@@ -7674,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,14 @@
|
||||
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" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="shakal"
|
||||
android:title="shakalish pikchi da" />
|
||||
</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"
|
||||
|
||||
@@ -39,11 +39,6 @@
|
||||
android:entryValues="@array/dateformat"
|
||||
android:key="dateformat"
|
||||
android:title="@string/interfaceglobaldates" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="olddock"
|
||||
android:summary="@string/interface_global_old_icons_summary"
|
||||
android:title="@string/interface_global_old_icons" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="shortinfo"
|
||||
@@ -80,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>
|
||||
@@ -20,10 +20,10 @@
|
||||
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" />
|
||||
android:defaultValue="false"
|
||||
android:key="oldicons"
|
||||
android:summary="@string/interface_global_old_icons_summary"
|
||||
android:title="@string/interface_global_old_icons" />
|
||||
<com.vtosters.lite.ui.MaterialSectionDividerPreference />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/vticon">
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -215,6 +215,10 @@
|
||||
|
||||
const/16 v6, 0x56
|
||||
|
||||
invoke-static {v6}, Lru/vtosters/lite/utils/Preferences;->compress(I)I
|
||||
|
||||
move-result v6
|
||||
|
||||
invoke-virtual {v4, v5, v6, v3}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z
|
||||
:try_end_1
|
||||
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
|
||||
|
||||
@@ -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;
|
||||
|
||||