Compare commits

..
Author SHA1 Message Date
gdlbo 9360ea4d85 Color article fixes 2022-06-02 19:45:49 +03:00
gdlbo c87d6581c8 Color fixes 2022-06-02 19:28:16 +03:00
gdlbo 7133fc6c03 Disabled discover ads 2022-06-02 19:04:24 +03:00
gdlbo 46af5af250 Fix https://github.com/vtosters/lite/issues/266 2022-06-02 17:38:28 +03:00
gdlbo 5b9cc6778c Fixes 2022-06-02 16:42:45 +03:00
gdlbo 5260ad8243 Fixed comments load 2022-06-02 14:25:32 +03:00
gdlbo 2996772020 Updated gitignore 2022-06-02 14:02:37 +03:00
gdlbo d37534cb6b Fixed icon changing 2022-06-02 13:25:19 +03:00
gdlbo 92eb48c21e Fixed crash + fixed msg cache 2022-06-02 13:06:55 +03:00
gdlbo d9e867cb6e Refactoring of some code that suggested what to fix in the comments in our vk group 2022-06-02 12:33:52 +03:00
gdlbo f200c6e59a Refactoring of some code that suggested what to fix in the comments in our vk group 2022-06-02 11:20:11 +03:00
gdlbo c668f3bf9a Refactoring 2022-05-31 16:55:19 +03:00
gdlbo bd7afee09b added more documentations 2022-05-31 16:43:58 +03:00
gdlbo ff09a4aec0 Added our git links 2022-05-26 20:25:51 +03:00
gdlbo 1e6c60f2ed Fixed statusbar and navbar light coloring 2022-05-17 23:08:12 +03:00
gdlbo beedb1538d Poll fix 2022-05-17 20:05:16 +03:00
gdlbo 8463f9e963 Fixes 2022-05-17 18:40:56 +03:00
gdlbo ce8f88b8d4 reworked statusbar coloring 2022-05-17 00:35:39 +03:00
gdlbo ff7d080b5a fix music tabs 2022-05-16 22:38:57 +03:00
gdlbo 12ad83c607 reworked do not read 2022-05-16 21:50:32 +03:00
gdlbo cdf5d2c37c fixes 2022-05-16 21:27:59 +03:00
gdlbo 9af8e1729e copyright posts detect 2022-05-16 21:21:39 +03:00
gdlbo d5219ed322 Fixes + some imp of custom msg loader 2022-05-16 00:11:00 +03:00
gdlbo 7af9a72e77 Fixes 2022-05-15 21:23:48 +03:00
gdlbo 08817bde7e Reworked some cringe code 2022-05-15 21:11:25 +03:00
gdlbo d1e9aadd71 fixed white screamers (maybe) 2022-05-13 20:28:20 +03:00
gdlbo b6307182cd fixes 2022-05-13 19:59:36 +03:00
gdlbo cc70e55b53 Fix summ 2022-05-13 15:36:42 +03:00
gdlbo ed08e97a50 Color fixes 2022-05-13 15:12:02 +03:00
gdlbo 44904786d9 Some corrections 2022-05-13 14:13:36 +03:00
gdlbo 12b67ce189 color fix header 2022-05-13 14:10:18 +03:00
gdlbo 21b0edf092 Fixes 2022-05-13 14:05:00 +03:00
gdlbo 2adb446d80 Fix open notifs 2022-05-13 12:40:42 +03:00
gdlbo 60738458bb Fixes 2022-05-13 11:59:15 +03:00
gdlbo a591026258 Fix article custom verifs 2022-05-12 18:47:42 +03:00
gdlbo 1bab7fa17c Monet dockbar icons coloring 2022-05-12 18:04:12 +03:00
gdlbo 2713216728 Added more summaries 2022-05-12 16:50:30 +03:00
gdlbo f9a529275a System theme at start 2022-05-11 20:59:37 +03:00
gdlbo e992203b7c Some color fixes + upped default app version 2022-05-10 22:34:56 +03:00
gdlbo 0ed057d705 Added another cringe feature 2022-05-10 22:12:40 +03:00
gdlbo 9b70ca6faf Fixed doc upload 2022-05-10 21:27:25 +03:00
gdlbo 422c3e4a6c Fixed stats crash 2022-05-10 21:07:29 +03:00
gdlbo 6dac880d61 Custom opus lib bridges 2022-05-10 20:22:39 +03:00
gdlbo c911b2d64e Custom opus lib bridges 2022-05-10 20:18:59 +03:00
gdlbo 39f72f9058 Crashreporter fix 2022-05-10 14:35:33 +03:00
gdlbo 2bff354ad0 Amoled monet accent + color fixes 2022-05-10 14:11:14 +03:00
gdlbo cb55e9b96f Disabled stats.track*** 2022-05-10 13:53:14 +03:00
gdlbo 33f551d464 Fixed vk cringe refl 2022-05-10 13:26:00 +03:00
gdlbo 282fa7bdda Beautify code 2022-05-07 18:31:07 +03:00
gdlbo 0abd97e8e1 Deleted unused code 2022-05-07 11:16:22 +03:00
gdlbo 5dd616685d Decrypt 2022-05-06 14:50:02 +03:00
gdlbo aff99be92d Fixes 2022-05-06 14:05:23 +03:00
gdlbo c255f1e498 Undelete feature + fixes 2022-05-06 13:43:42 +03:00
gdlbo 70342daf07 Merge branch 'master' of https://github.com/vtosters/lite 2022-05-06 01:58:35 +03:00
gdlbo f95672e57d Encryption + Undelete code base 2022-05-06 01:57:33 +03:00
gdlbo 8f5da42df4 color fixes 2022-05-04 16:41:59 +03:00
gdlbo 4022903069 Fixed crash 2022-05-04 14:23:25 +03:00
gdlbo 4600c185e4 Added proxy user/pass auth 2022-05-04 13:12:39 +03:00
gdlbo 30e8ec0038 Update README.md 2022-05-03 23:45:37 +03:00
gdlbo 367b212ca3 Updated build gradle 2022-05-03 22:19:23 +03:00
gdlbo 6533feb62b Merge remote-tracking branch 'origin/master' 2022-05-03 22:11:35 +03:00
gdlbo 95ef37f6a3 Fix 2022-05-03 22:11:19 +03:00
Vologhat 6216c66d95 fix #204 (null pointer while account deleting) 2022-05-02 18:07:04 +03:00
gdlbo 02b6e4a728 Fix dockbar issue 2022-05-02 13:30:51 +03:00
196 changed files with 2823 additions and 871 deletions
+1
View File
@@ -25,3 +25,4 @@ smali/assets/version.properties
app/src/main/assets/version.properties app/src/main/assets/version.properties
smali/build/resources.zip smali/build/resources.zip
*.idsig *.idsig
/smali/VTLite.apk.cache/
+8 -4
View File
@@ -8,14 +8,18 @@ VTosters Lite - это модифицированный клиент (деком
Стабильные сборки находятся в [Releases](https://github.com/vtosters/lite/releases) Стабильные сборки находятся в [Releases](https://github.com/vtosters/lite/releases)
## Откладка Зеркало на нашем [Git](https://git.devshelter.su/gdlbo/lite)
Для откладки с помощью Android Studio необходимо пройти в `/smali/AndroidManifest.xml` Зеркало на [Github](https://github.com/vtosters/lite)
## Отладка приложения
Для отладки с помощью Android Studio необходимо пройти в `/smali/AndroidManifest.xml`
``` ```
android:debuggable="false" -> android:debuggable="true" android:debuggable="false" -> android:debuggable="true"
``` ```
Для дополнительной откладки ответов, доп логов и подмены данных для дебаг приложения необходимо включить **Режим разработчика** Для дополнительной отладки ответов, доп логов и подмены данных для дебаг приложения необходимо включить **Режим разработчика**
``` ```
Настройки -> Для разработчиков -> Режим разработчика Настройки -> Для разработчиков -> Режим разработчика
``` ```
@@ -92,4 +96,4 @@ android:debuggable="false" -> android:debuggable="true"
build.bat build.bat
``` ```
![](https://cdn.discordapp.com/attachments/762063967979175946/961682299366309928/unknown.png) ![](https://cdn.discordapp.com/attachments/762063967979175946/961682299366309928/unknown.png)
+1
View File
@@ -86,6 +86,7 @@ android {
sourceCompatibility JavaVersion.VERSION_11 sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11 targetCompatibility JavaVersion.VERSION_11
} }
namespace 'ru.vtosters.lite'
} }
dependencies { dependencies {
+1 -2
View File
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="ru.vtosters.lite">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
@@ -1,7 +1,7 @@
package bruhcollective.itaysonlab.libvkx.client; package bruhcollective.itaysonlab.libvkx.client;
import static ru.vtosters.lite.utils.Globals.getContext; import static ru.vtosters.lite.utils.Globals.getContext;
import static ru.vtosters.lite.utils.Preferences.BooleanFalse; import static ru.vtosters.lite.utils.Preferences.getBoolValue;
import android.content.Context; import android.content.Context;
import android.os.RemoteException; import android.os.RemoteException;
@@ -36,7 +36,7 @@ public class LibVKXClient {
} }
public static boolean isIntegrationEnabled() { public static boolean isIntegrationEnabled() {
return BooleanFalse("libvkx_integration") && isVkxInstalled(); return getBoolValue("libvkx_integration", false) && isVkxInstalled();
} }
public static boolean play(MusicTrack musicTrack, List<MusicTrack> list, PlayerRefer playerRefer) { public static boolean play(MusicTrack musicTrack, List<MusicTrack> list, PlayerRefer playerRefer) {
@@ -27,11 +27,11 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import ru.f0x1d.net.NetCall; import ru.vtosters.lite.net.NetCall;
import ru.f0x1d.net.NetCallback; import ru.vtosters.lite.net.NetCallback;
import ru.f0x1d.net.NetClient; import ru.vtosters.lite.net.NetClient;
import ru.f0x1d.net.NetRequest; import ru.vtosters.lite.net.NetRequest;
import ru.f0x1d.net.NetResponse; import ru.vtosters.lite.net.NetResponse;
/** /**
* Created by Aefyr on 11.05.2018. * Created by Aefyr on 11.05.2018.
@@ -1,86 +0,0 @@
package ru.f0x1d.net;
import static ru.vtosters.lite.utils.Globals.getUserToken;
import android.os.AsyncTask;
import com.vk.core.network.Network;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class F0x1dRequest {
public static void makeRequest(byte[] bArr, F0x1dRequestCallback f0x1dRequestCallback) {
new MakeRequestTask(bArr, f0x1dRequestCallback).execute();
}
public static void makeRequest(String str, F0x1dRequestCallback f0x1dRequestCallback) {
new MakeRequestTask(str.getBytes(), f0x1dRequestCallback).execute();
}
public static void makeRequestToaster(String str, F0x1dRequestCallback f0x1dRequestCallback, boolean z) {
new MakeRequestTask(str.getBytes(), f0x1dRequestCallback, true, !z).execute();
}
public interface F0x1dRequestCallback {
void onResponse(String str);
}
private static class MakeRequestTask extends AsyncTask<Void, Void, String> {
private final F0x1dRequestCallback callback;
private boolean mIsPut;
private boolean mIsVkToasterRequest;
private final byte[] url;
public MakeRequestTask(byte[] bArr, F0x1dRequestCallback f0x1dRequestCallback) {
this.mIsVkToasterRequest = false;
this.mIsPut = false;
this.callback = f0x1dRequestCallback;
this.url = bArr;
}
public MakeRequestTask(byte[] bArr, F0x1dRequestCallback f0x1dRequestCallback, boolean z, boolean z2) {
this.mIsVkToasterRequest = false;
this.mIsPut = false;
this.callback = f0x1dRequestCallback;
this.url = bArr;
this.mIsVkToasterRequest = z;
this.mIsPut = z2;
}
public String doInBackground(Void... voidArr) {
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(new String(this.url)).openConnection();
httpURLConnection.setRequestMethod(this.mIsPut ? "PUT" : "GET");
if (this.mIsVkToasterRequest) {
httpURLConnection.setRequestProperty("Token", getUserToken());
}
if (!this.mIsVkToasterRequest) {
httpURLConnection.setRequestProperty("User-Agent", Network.a.a().a());
}
httpURLConnection.setRequestProperty("Content-Type", this.mIsVkToasterRequest ? "Content-Type" : "application/x-www-form-urlencoded");
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));
StringBuffer stringBuffer = new StringBuffer();
while (true) {
String readLine = bufferedReader.readLine();
if (readLine != null) {
stringBuffer.append(readLine);
} else {
bufferedReader.close();
return stringBuffer.toString();
}
}
} catch (Exception e) {
return e.getLocalizedMessage();
}
}
public void onPostExecute(String str) {
super.onPostExecute(str);
this.callback.onResponse(str);
}
}
}
@@ -1,5 +1,8 @@
package ru.vtosters.lite.audio.gcm; package ru.vtosters.lite.audio.gcm;
import static ru.vtosters.lite.utils.Preferences.VKVersion;
import static ru.vtosters.lite.utils.Preferences.VKVersionBuild;
import android.os.Build; import android.os.Build;
import android.util.Base64; import android.util.Base64;
@@ -108,7 +111,7 @@ public class GCMFix {
params.add("X-X-subscription=841415684880"); params.add("X-X-subscription=841415684880");
} }
params.add("X-X-subtype=841415684880"); params.add("X-X-subtype=841415684880");
params.add("X-app_ver=3439"); params.add("X-app_ver=" + VKVersionBuild());
params.add("X-kid=|ID|" + rid + "|"); params.add("X-kid=|ID|" + rid + "|");
params.add("X-osv=30"); params.add("X-osv=30");
params.add("X-sig=" + sig); params.add("X-sig=" + sig);
@@ -129,12 +132,12 @@ public class GCMFix {
if (!del) { if (!del) {
params.add("X-gmp_app_id=1:841415684880:android:632f429381141121"); params.add("X-gmp_app_id=1:841415684880:android:632f429381141121");
} }
params.add("X-app_ver_name=5.29"); params.add("X-app_ver_name=" + VKVersion());
params.add("app=com.vkontakte.android"); params.add("app=com.vkontakte.android");
params.add("sender=841415684880"); params.add("sender=841415684880");
params.add("device=" + androidId); params.add("device=" + androidId);
params.add("cert=48761eef50ee53afc4cc9c5f10e6bde7f8f5b82f"); params.add("cert=48761eef50ee53afc4cc9c5f10e6bde7f8f5b82f");
params.add("app_ver=3439"); params.add("app_ver=" + VKVersionBuild());
params.add("gcm_ver=11949470"); params.add("gcm_ver=11949470");
} }
@@ -1,4 +1,4 @@
package ru.vtosters.lite.badmanners; package ru.vtosters.lite.deviceinfo;
public class Device { public class Device {
private String androidId; private String androidId;
@@ -1,4 +1,4 @@
package ru.vtosters.lite.badmanners; package ru.vtosters.lite.deviceinfo;
import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothAdapter;
import android.content.Context; import android.content.Context;
@@ -1,6 +1,6 @@
package ru.vtosters.lite.dnr; package ru.vtosters.lite.dnr;
import static ru.f0x1d.net.F0x1dRequest.makeRequest; import static ru.vtosters.lite.net.Request.makeRequest;
import static ru.vtosters.lite.utils.Globals.getUserToken; import static ru.vtosters.lite.utils.Globals.getUserToken;
import static ru.vtosters.lite.utils.Proxy.getApiCom; import static ru.vtosters.lite.utils.Proxy.getApiCom;
@@ -1,10 +1,10 @@
package ru.vtosters.lite.dnr; package ru.vtosters.lite.dnr;
import static ru.vtosters.lite.utils.Preferences.BooleanFalse; import static ru.vtosters.lite.utils.Preferences.getBoolValue;
public class DNRPrefs { public class DNRPrefs {
public static boolean getStoriesRead() { public static boolean getStoriesRead() {
return BooleanFalse("read_s"); return getBoolValue("read_s", false);
} }
public static boolean getMarkAsReadWithoutExceptions(int peerId) { public static boolean getMarkAsReadWithoutExceptions(int peerId) {
@@ -28,27 +28,27 @@ public class DNRPrefs {
} }
public static boolean readPM(int peer) { public static boolean readPM(int peer) {
return (peer > 0 && peer < 2000000000) && BooleanFalse("read_pm"); return (peer > 0 && peer < 2000000000) && getBoolValue("read_pm", false);
} }
public static boolean readConversations(int peer) { public static boolean readConversations(int peer) {
return (peer > 2000000000) && BooleanFalse("read_conversations"); return (peer > 2000000000) && getBoolValue("read_conversations", false);
} }
public static boolean readBots(int peer) { public static boolean readBots(int peer) {
return (peer < 0) && BooleanFalse("read_bot"); return (peer < 0) && getBoolValue("read_bot", false);
} }
public static boolean writePM(int peer) { public static boolean writePM(int peer) {
return (peer > 0 && peer < 2000000000) && BooleanFalse("write_pm"); return (peer > 0 && peer < 2000000000) && getBoolValue("write_pm", false);
} }
public static boolean writeConversations(int peer) { public static boolean writeConversations(int peer) {
return (peer > 2000000000) && BooleanFalse("write_conversations"); return (peer > 2000000000) && getBoolValue("write_conversations", false);
} }
public static boolean writeBots(int peer) { public static boolean writeBots(int peer) {
return (peer < 0) && BooleanFalse("write_bot"); return (peer < 0) && getBoolValue("write_bot", false);
} }
public static boolean getActivityWithoutExceptions(int peerId) { public static boolean getActivityWithoutExceptions(int peerId) {
@@ -0,0 +1,116 @@
package ru.vtosters.lite.encryption;
import android.util.Log;
import android.util.Pair;
import com.vk.im.engine.models.messages.Msg;
import com.vk.im.engine.models.messages.MsgFromUser;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;
import ru.vtosters.lite.encryption.base.IMProcessor;
import ru.vtosters.lite.encryption.processors.BeeCryptProcessor;
import ru.vtosters.lite.encryption.processors.DefaultCoffeeProcessor;
import ru.vtosters.lite.encryption.processors.DonateCoffeeProcessor;
import ru.vtosters.lite.encryption.processors.MP3InvisibleProcessor;
import ru.vtosters.lite.encryption.processors.VTostersAESProcessor;
import ru.vtosters.lite.encryption.processors.VTostersProcessor;
public class EncryptProvider {
public static List<IMProcessor> processors = new ArrayList<>();
public static IMProcessor getProcessorFor(int peerId) {
IMProcessor enabled = null;
for (IMProcessor processor: EncryptProvider.processors) {
if (processor.isUsedToEncrypt(peerId)) {
enabled = processor;
}
}
return enabled;
}
public static String getBody(MsgFromUser msg) {
return msg.E();
}
public static int getPeerId(Msg msg) {
return msg.b();
}
// This will run through EVERY single processor available.
public static String decryptMessage(MsgFromUser msg) {
return decryptMessage(getBody(msg), getPeerId(msg));
}
public static String decryptMessage(String msgBody, int peer) {
try {
for (IMProcessor processor : processors) {
if ((processor.isUsed() || !processor.isPublic()) && processor.isEncrypted(msgBody) && (processor.isPublic() || getKeyForProcessor(processor, peer) != null))
return "\uD83D\uDD12 " + processor.decode(msgBody, getKeyForProcessor(processor, peer));
}
} catch (Exception e) {
e.printStackTrace();
}
return msgBody;
}
private static byte[] getKeyForProcessor(IMProcessor processor, int peer) {
if (processor.isPublic()) return null;
String keyString = processor.getEncryptionKeyFor(peer);
if (keyString == null) return null;
try {
MessageDigest digest = MessageDigest.getInstance("SHA-256");
byte[] hash = digest.digest(keyString.getBytes());
byte[] key = new byte[16];
System.arraycopy(hash, 0, key, 0, key.length);
return key;
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
return keyString.getBytes();
}
// This will use only the processor which was chosen in chat menu [that's why ID is needed, bruh]
public static String encryptMessage(MsgFromUser msg) {
String msgBody = getBody(msg);
Log.d("EncryptProvider", "encryptMessage: msg = " + msg.toString());
Log.d("EncryptProvider", "encryptMessage: body = " + msgBody);
Log.d("EncryptProvider", "encryptMessage: peerId = " + getPeerId(msg));
for (IMProcessor processor: processors) {
int peer = getPeerId(msg);
if (processor.isUsedToEncrypt(peer)) {
return processor.encode(msgBody, getKeyForProcessor(processor, peer));
}
}
return msgBody;
}
// For rendering UI
public static List<Pair<String, String>> getUserVisibleEncoders() {
List<Pair<String, String>> theList = new ArrayList<>();
for (IMProcessor processor: processors) {
if (processor.isPublic()) theList.add(new Pair<>("VT_IMDecode_"+processor.getPrefKey(), processor.getUIName()));
}
return theList;
}
static {
processors.add(new VTostersProcessor());
processors.add(new VTostersAESProcessor());
processors.add(new DefaultCoffeeProcessor());
processors.add(new DonateCoffeeProcessor());
processors.add(new BeeCryptProcessor());
processors.add(new MP3InvisibleProcessor());
}
}
@@ -0,0 +1,77 @@
package ru.vtosters.lite.encryption.base;
import static ru.vtosters.lite.utils.Preferences.getBoolValue;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import ru.vtosters.lite.utils.Globals;
public abstract class IMProcessor {
// By default it checks start and end tag.
public boolean isEncrypted(String source) {
//Log.d("IMProcessor", "Checking if encrypted: "+source+" / "+getUIName());
return source.startsWith(startTag()) && source.endsWith(endTag());
}
// Key can be null - if it's a public processor
@NonNull protected abstract String encodeInternal(@NonNull String source, @Nullable byte[] key);
@NonNull protected abstract String decodeInternal(@NonNull String source, @Nullable byte[] key);
// Automatically removes tags. Magic!
@NonNull
public String encode(@NonNull String source, @Nullable byte[] key) {
//Log.d("IMProcessor", "Encoding "+source);
return startTag() + encodeInternal(source, key) + endTag();
}
@NonNull
public String decode(@NonNull String source, @Nullable byte[] key) {
//Log.d("IMProcessor", "Decoding");
return decodeInternal(source.substring(startTag().length(), source.length() - endTag().length()), key);
}
// Public - no key required.
public boolean isPublic() {
return true;
}
// UI thing
@NonNull abstract public String getUIName();
@NonNull abstract public String getPrefKey();
@NonNull public String startTag() {
return "";
}
@NonNull public String endTag() {
return "";
}
public boolean isUsed() {
//Log.d("IMProcessor", "Checking if decoded with "+getUIName());
return getBoolValue("VT_IMDecode_"+getPrefKey(), true);
}
public boolean isUsedToEncrypt(int id) {
//Log.d("IMProcessor", "Checking if "+id+" is ready to be encrypted with "+getUIName());
return getBoolValue("VT_IMEncode_"+getPrefKey()+"_"+id, false);
}
public void enableEncryptFor(int id) {
Globals.getDefprefs().edit().putBoolean("VT_IMEncode_"+getPrefKey()+"_"+id, true).apply();
}
public void disableEncryptFor(int id) {
Globals.getDefprefs().edit().putBoolean("VT_IMEncode_"+getPrefKey()+"_"+id, false).apply();
}
public void setEncryptionKeyFor(int id, @Nullable String key) {
if (key == null || key.isEmpty()) key = "VTAesDefault";
Globals.getDefprefs().edit().putString("VT_IMEncodeKey_"+getPrefKey()+"_"+id, key).apply();
}
@Nullable
public String getEncryptionKeyFor(int id) {
return Globals.getDefprefs().getString("VT_IMEncodeKey_"+getPrefKey()+"_"+id, null);
}
}
@@ -0,0 +1,75 @@
package ru.vtosters.lite.encryption.processors;
import android.util.Base64;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.nio.charset.StandardCharsets;
import ru.vtosters.lite.encryption.base.IMProcessor;
public class BeeCryptProcessor extends IMProcessor {
private static final String BC_CHARSET = "жъЖЪ";
@NonNull
@Override
protected String encodeInternal(@NonNull String source, @Nullable byte[] key) {
try {
String a = Base64.encodeToString(source.getBytes(StandardCharsets.UTF_8), 2);
StringBuilder res = new StringBuilder();
for (int i = 0; i < a.length(); i++) {
StringBuilder bintxt = new StringBuilder();
int c = a.charAt(i);
for (int j = 0; j < 4; j++) {
bintxt.insert(0, BC_CHARSET.charAt(c % 4));
c /= 4;
}
res.append(bintxt);
}
return res.toString();
} catch (java.lang.Exception e) {
e.printStackTrace();
return source;
}
}
@Override
public boolean isEncrypted(String source) {
return source.matches("[жъЖЪ]{16,}");
}
@NonNull
@Override
protected String decodeInternal(@NonNull String source, @Nullable byte[] key) {
StringBuilder b64 = new StringBuilder();
int i = 0;
while (i < source.length() - 3) {
try {
String bintxt = source.substring(i, i + 4);
int c = 0;
for (int j = 0; j < 4; j++) {
c = (c * 4) + Math.max(0, BC_CHARSET.indexOf(bintxt.charAt(j)));
}
b64.append((char) c);
i += 4;
} catch (java.lang.Exception e) {
e.printStackTrace();
return source;
}
}
return new String(Base64.decode(b64.toString(), 2), StandardCharsets.UTF_8);
}
@NonNull
@Override
public String getUIName() {
return "MP3 [beecrypt]";
}
@NonNull
@Override
public String getPrefKey() {
return "mp3_bc";
}
}
@@ -0,0 +1,103 @@
package ru.vtosters.lite.encryption.processors;
import android.util.Base64;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import ru.vtosters.lite.encryption.base.IMProcessor;
public class DefaultCoffeeProcessor extends IMProcessor {
private final static String KEY = "stupidUsersMustD";
private static Cipher dCipher, eCipher;
static {
try {
SecretKeySpec key = new SecretKeySpec(KEY.getBytes(), "AES");
dCipher = Cipher.getInstance("AES");
dCipher.init(Cipher.DECRYPT_MODE, key);
eCipher = Cipher.getInstance("AES");
eCipher.init(Cipher.ENCRYPT_MODE, key);
} catch (Exception e) {
e.printStackTrace();
}
}
private String toHex(String text) {
char[] chars = text.toCharArray();
StringBuilder str = new StringBuilder();
for (char aChar : chars) {
String s = Integer.toHexString(aChar);
if (s.length() < 2) s = "0" + s;
str.append(s.toUpperCase()).append(" ");
}
String string = str.toString();
return string.substring(0, string.length()-1);
}
private String fromHex(String text) {
text = text.replace(" ", "");
char[] chars = text.toCharArray();
char[] chars2 = new char[chars.length/2];
for (int i = 0; i < chars.length; i+=2) {
String c = String.valueOf(chars[i]) + chars[i + 1];
chars2[i/2] = (char) Integer.parseInt(c, 16);
}
return new String(chars2);
}
@NonNull
@Override
protected String encodeInternal(@NonNull String source, @Nullable byte[] key) {
try {
return toHex(Base64.encodeToString(eCipher.doFinal(source.getBytes()), 0));
} catch (Exception e) {
e.printStackTrace();
}
return source;
}
@NonNull
@Override
protected String decodeInternal(@NonNull String source, @Nullable byte[] key) {
try {
return new String(dCipher.doFinal(Base64.decode(fromHex(source), 0)));
} catch (Exception e) {
e.printStackTrace();
}
return source;
}
@Override
@NonNull
public String startTag() {
return "VK CO FF EE ";
}
@Override
@NonNull
public String endTag() {
return " VK CO FF EE";
}
@NonNull
@Override
public String getUIName() {
return "VK Coffee [default]";
}
@NonNull
@Override
public String getPrefKey() {
return "coffee_default";
}
}
@@ -0,0 +1,29 @@
package ru.vtosters.lite.encryption.processors;
import androidx.annotation.NonNull;
public class DonateCoffeeProcessor extends DefaultCoffeeProcessor {
@Override
@NonNull
public String startTag() {
return "II ";
}
@Override
@NonNull
public String endTag() {
return " II";
}
@NonNull
@Override
public String getUIName() {
return "VK Coffee [hidden]";
}
@NonNull
@Override
public String getPrefKey() {
return "coffee_donate";
}
}
@@ -0,0 +1,79 @@
package ru.vtosters.lite.encryption.processors;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.nio.charset.StandardCharsets;
import ru.vtosters.lite.encryption.base.IMProcessor;
public class MP3InvisibleProcessor extends IMProcessor {
@NonNull
@Override
protected String encodeInternal(@NonNull String source, @Nullable byte[] key) {
try {
byte[] bytes = source.getBytes(StandardCharsets.UTF_8);
java.lang.String[] plainText = new String[bytes.length];
for (int i = 0; i < plainText.length; i++) {
plainText[i] = toStr(bytes[i] & 255, " ​‌‏ ");
}
return "  " + TextUtils.join(" ", plainText);
} catch (java.lang.Exception e) {
e.printStackTrace();
return source;
}
}
@NonNull
@Override
protected String decodeInternal(@NonNull String source, @Nullable byte[] key) {
try {
java.lang.String[] t = source.replaceAll("^" + "  ", "").split(" ");
byte[] plainText = new byte[t.length];
for (int i = 0; i < plainText.length; i++) {
plainText[i] = (byte) toNum(t[i], " ​‌‏ ");
}
return new String(plainText, StandardCharsets.UTF_8);
} catch (java.lang.Exception e) {
e.printStackTrace();
return source;
}
}
private static String toStr(int a, String cc) {
StringBuilder s = new StringBuilder();
while (a > 0) {
s.insert(0, cc.charAt(a % cc.length()));
a /= cc.length();
}
return s.toString();
}
private static int toNum(String a, String cc) {
int n = 0;
for (int i = 0; i < a.length(); i++) {
int start = (a.length() - i) - 1;
n = (int) (((double) n) + (((double) cc.indexOf(a.substring(start, start + 1))) * Math.pow(cc.length(), i)));
}
return n;
}
@Override
public boolean isEncrypted(String source) {
return source.matches("^" + "  " + "([" + " ​‌‏ " + "\\s]*)");
}
@NonNull
@Override
public String getUIName() {
return "MP3 [invisible]";
}
@NonNull
@Override
public String getPrefKey() {
return "mp3";
}
}
@@ -0,0 +1,130 @@
package ru.vtosters.lite.encryption.processors;
import android.util.Base64;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.nio.charset.StandardCharsets;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.HashMap;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import ru.vtosters.lite.encryption.base.IMProcessor;
import ru.vtosters.lite.utils.Globals;
public class VTostersAESProcessor extends IMProcessor {
private final static String CIPHER_INSTANCE = "AES/CBC/PKCS7Padding";
private final static String KEY_METHOD = "AES";
private HashMap<byte[], Cipher> decodeMap = new HashMap<>(), encodeMap = new HashMap<>();
public void free(byte[] key) {
decodeMap.remove(key);
encodeMap.remove(key);
}
@NonNull
private Cipher wrapEncoder(byte[] key) throws InvalidAlgorithmParameterException, InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException {
if (encodeMap.containsKey(key)) return encodeMap.get(key);
Triple<Cipher, SecretKeySpec, IvParameterSpec> encodeCipher = getBaseCipher(key);
encodeCipher.first.init(Cipher.ENCRYPT_MODE, encodeCipher.second, encodeCipher.third);
encodeMap.put(key, encodeCipher.first);
return encodeCipher.first;
}
@NonNull
private Cipher wrapDecoder(byte[] key) throws InvalidAlgorithmParameterException, InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException {
if (decodeMap.containsKey(key)) return decodeMap.get(key);
Triple<Cipher, SecretKeySpec, IvParameterSpec> decodeCipher = getBaseCipher(key);
decodeCipher.first.init(Cipher.DECRYPT_MODE, decodeCipher.second, decodeCipher.third);
decodeMap.put(key, decodeCipher.first);
return decodeCipher.first;
}
@NonNull
private Triple<Cipher, SecretKeySpec, IvParameterSpec> getBaseCipher(byte[] key) throws NoSuchPaddingException, NoSuchAlgorithmException {
byte[] off = new byte[16];
System.arraycopy(key, 0, off, 0, off.length);
return new Triple<>(Cipher.getInstance(CIPHER_INSTANCE), new SecretKeySpec(key, KEY_METHOD), new IvParameterSpec(off));
}
@NonNull
@Override
protected String encodeInternal(@NonNull String source, @Nullable byte[] key) {
try {
return Base64.encodeToString(wrapEncoder(key).doFinal(source.getBytes(StandardCharsets.UTF_8)), Base64.DEFAULT);
} catch (Exception e) {
e.printStackTrace();
return source;
}
}
@NonNull
@Override
protected String decodeInternal(@NonNull String source, @Nullable byte[] key) {
try {
return new String(wrapDecoder(key).doFinal(Base64.decode(source, Base64.DEFAULT)), StandardCharsets.UTF_8);
} catch (Exception e) {
e.printStackTrace();
return source;
}
}
@Override
public boolean isPublic() {
return false;
}
@NonNull
@Override
public String startTag() {
return "VT0ST3RS [AES] ";
}
@NonNull
@Override
public String endTag() {
return " VT0ST3RS [AES]";
}
@NonNull
@Override
public String getUIName() {
return "VTosters [AES]";
}
@NonNull
@Override
public String getPrefKey() {
return "vtaes";
}
@Nullable
@Override
public String getEncryptionKeyFor(int id) {
return Globals.getDefprefs().getString("VT_IMEncodeKey_"+getPrefKey()+"_"+id, "VTAesDefault");
}
public static class Triple<F, S, T> {
public final F first;
public final S second;
public final T third;
public Triple(F first, S second, T third) {
this.first = first;
this.second = second;
this.third = third;
}
}
}
@@ -0,0 +1,46 @@
package ru.vtosters.lite.encryption.processors;
import android.util.Base64;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import ru.vtosters.lite.encryption.base.IMProcessor;
public class VTostersProcessor extends IMProcessor {
@NonNull
@Override
protected String encodeInternal(@NonNull String source, @Nullable byte[] key) {
return Base64.encodeToString(source.getBytes(), Base64.DEFAULT);
}
@NonNull
@Override
protected String decodeInternal(@NonNull String source, @Nullable byte[] key) {
return new String(Base64.decode(source, Base64.DEFAULT));
}
@Override
@NonNull
public String startTag() {
return "VT0ST3RS ";
}
@Override
@NonNull
public String endTag() {
return " VT0ST3RS";
}
@NonNull
@Override
public String getUIName() {
return "VTosters Classique [Base64]";
}
@NonNull
@Override
public String getPrefKey() {
return "vt64";
}
}
@@ -1,8 +1,7 @@
package ru.vtosters.lite.f0x1d; package ru.vtosters.lite.f0x1d;
import static ru.vtosters.lite.utils.About.*; import static ru.vtosters.lite.utils.About.getBuildNumber;
import static ru.vtosters.lite.utils.Globals.*; import static ru.vtosters.lite.utils.Globals.getContext;
import static ru.vtosters.lite.utils.Preferences.*;
import android.app.Activity; import android.app.Activity;
import android.app.Notification; import android.app.Notification;
@@ -20,7 +19,7 @@ import com.vtosters.lite.R;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.StringWriter; import java.io.StringWriter;
import ru.vtosters.lite.badmanners.DeviceInfoCollector; import ru.vtosters.lite.deviceinfo.DeviceInfoCollector;
public class Crashreporter { public class Crashreporter {
protected static String logString; protected static String logString;
@@ -37,7 +36,7 @@ public class Crashreporter {
} }
static void start(Thread.UncaughtExceptionHandler uncaughtExceptionHandler, Thread thread, Throwable th, Activity activity) { static void start(Thread.UncaughtExceptionHandler uncaughtExceptionHandler, Thread thread, Throwable th, Activity activity) {
logString = getStackTrace(th) + "\n\n" + new DeviceInfoCollector().collect(getContext()).toDeviceName() + "\n VTL Version: " + VERSIONNAME + ", build: " + getBuildNumber(); logString = getStackTrace(th) + "\n\n" + new DeviceInfoCollector().collect(getContext()).toDeviceName() + ", commit: " + getBuildNumber();
if (Build.VERSION.SDK_INT >= 26) { if (Build.VERSION.SDK_INT >= 26) {
var notificationChannel = new NotificationChannel("crashes", "crash", NotificationManager.IMPORTANCE_DEFAULT); var notificationChannel = new NotificationChannel("crashes", "crash", NotificationManager.IMPORTANCE_DEFAULT);
notificationChannel.enableVibration(true); notificationChannel.enableVibration(true);
@@ -61,7 +60,7 @@ public class Crashreporter {
var builder = new Notification.Builder(getContext()); var builder = new Notification.Builder(getContext());
builder.setSmallIcon(R.drawable.ic_bug_24); builder.setSmallIcon(R.drawable.ic_bug_24);
builder.setContentTitle("VTL Крашнулся!"); builder.setContentTitle("Произошла ошибка в работе VTLite!");
builder.setContentText(logString); builder.setContentText(logString);
builder.setStyle(new Notification.BigTextStyle().bigText(logString)); builder.setStyle(new Notification.BigTextStyle().bigText(logString));
builder.setAutoCancel(true); builder.setAutoCancel(true);
@@ -1,6 +1,6 @@
package ru.vtosters.lite.f0x1d; package ru.vtosters.lite.f0x1d;
import static ru.vtosters.lite.utils.Preferences.BooleanTrue; import static ru.vtosters.lite.utils.Preferences.getBoolValue;
import android.content.Context; import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
@@ -42,6 +42,7 @@ public class VTVerifications {
public static void load(Context context) { public static void load(Context context) {
mVerificationsCache = context.getSharedPreferences("vt_another_data", 0); mVerificationsCache = context.getSharedPreferences("vt_another_data", 0);
try { try {
processArray(new JSONArray(getLoaded(VERIFICATIONS_KEY)), sVerificationsMap, null); processArray(new JSONArray(getLoaded(VERIFICATIONS_KEY)), sVerificationsMap, null);
processArray(new JSONArray(getLoaded(PROMETHEUS_KEY)), sPrometheusMap, null); processArray(new JSONArray(getLoaded(PROMETHEUS_KEY)), sPrometheusMap, null);
@@ -53,7 +54,7 @@ public class VTVerifications {
} }
Request request = new Request.Builder() Request request = new Request.Builder()
.url("https://gdlbo.net/vktoaster/getGalo4kiBatch") .url("https://vtosters.app/vktoaster/getGalo4kiBatch")
.a(RequestBody.a(MediaType.b("application/json; charset=UTF-8"), "{\"types\":[0,228,404,1337]}")) .a(RequestBody.a(MediaType.b("application/json; charset=UTF-8"), "{\"types\":[0,228,404,1337]}"))
.build(); .build();
@@ -102,9 +103,7 @@ public class VTVerifications {
} }
public static boolean hasPrometheus(int i) { public static boolean hasPrometheus(int i) {
return sPrometheusMap.get(i) != null ? sPrometheusMap.get(i) : false; return sPrometheusMap.get(i) != null ? sPrometheusMap.get(i) : false;
} }
public static boolean isDeveloper(int i) { public static boolean isDeveloper(int i) {
@@ -132,13 +131,20 @@ public class VTVerifications {
return Base64.encodeToString(str.getBytes(), 1); return Base64.encodeToString(str.getBytes(), 1);
} }
public static boolean vtverif() {
return getBoolValue("VT_Verification", true);
}
public static boolean isVerified(JSONObject jSONObject) { public static boolean isVerified(JSONObject jSONObject) {
if (jSONObject.optInt("verified", 0) == 1) { if (jSONObject.optInt("verified", 0) == 1) {
return true; return true;
} }
if (!BooleanTrue("VT_Verification")) {
if (!getBoolValue("VT_Verification", true)) {
return false; return false;
} }
return isVerified((jSONObject.optString(NavigatorKeys.j) == null || (!jSONObject.optString(NavigatorKeys.j).equals("group") && !jSONObject.optString(NavigatorKeys.j).equals("page"))) ? jSONObject.optInt("id", 0) : -jSONObject.optInt("id", 0)); return isVerified((jSONObject.optString(NavigatorKeys.j) == null || (!jSONObject.optString(NavigatorKeys.j).equals("group") && !jSONObject.optString(NavigatorKeys.j).equals("page"))) ? jSONObject.optInt("id", 0) : -jSONObject.optInt("id", 0));
} }
@@ -146,16 +152,19 @@ public class VTVerifications {
if (jSONObject.optInt("trending", 0) == 1) { if (jSONObject.optInt("trending", 0) == 1) {
return true; return true;
} }
if (!BooleanTrue("VT_Fire")) {
if (!getBoolValue("VT_Fire", true)) {
return false; return false;
} }
return hasPrometheus((jSONObject.optString(NavigatorKeys.j) == null || (!jSONObject.optString(NavigatorKeys.j).equals("group") && !jSONObject.optString(NavigatorKeys.j).equals("page"))) ? jSONObject.optInt("id", 0) : -jSONObject.optInt("id", 0)); return hasPrometheus((jSONObject.optString(NavigatorKeys.j) == null || (!jSONObject.optString(NavigatorKeys.j).equals("group") && !jSONObject.optString(NavigatorKeys.j).equals("page"))) ? jSONObject.optInt("id", 0) : -jSONObject.optInt("id", 0));
} }
public static boolean hasDeveloper(JSONObject jSONObject) { public static boolean hasDeveloper(JSONObject jSONObject) {
if (!BooleanTrue("VT_Dev")) { if (!getBoolValue("VT_Dev", true)) {
return false; return false;
} }
return isDeveloper((jSONObject.optString(NavigatorKeys.j) == null || (!jSONObject.optString(NavigatorKeys.j).equals("group") && !jSONObject.optString(NavigatorKeys.j).equals("page"))) ? jSONObject.optInt("id", 0) : -jSONObject.optInt("id", 0)); return isDeveloper((jSONObject.optString(NavigatorKeys.j) == null || (!jSONObject.optString(NavigatorKeys.j).equals("group") && !jSONObject.optString(NavigatorKeys.j).equals("page"))) ? jSONObject.optInt("id", 0) : -jSONObject.optInt("id", 0));
} }
@@ -25,9 +25,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import okhttp3.OkHttpClient; import okhttp3.OkHttpClient;
import okhttp3.Request; import ru.vtosters.lite.net.Request;
import ru.f0x1d.net.F0x1dRequest;
import ru.vtosters.lite.utils.Preferences;
public class FoafBase { public class FoafBase {
private static final Pattern FOAF_REGEX = Pattern.compile("<ya:created dc:date=\"(.+?)\"\\/>"); private static final Pattern FOAF_REGEX = Pattern.compile("<ya:created dc:date=\"(.+?)\"\\/>");
@@ -36,7 +34,7 @@ public class FoafBase {
private static final OkHttpClient client = new OkHttpClient(); private static final OkHttpClient client = new OkHttpClient();
public static int GetLastSeenInt(int i) throws ParseException, IOException { public static int GetLastSeenInt(int i) throws ParseException, IOException {
Matcher matcher = FOAF_REGEX_LAST_SEEN.matcher(client.newCall(new Request.Builder().url(getLink(i)).build()).b().body().string()); Matcher matcher = FOAF_REGEX_LAST_SEEN.matcher(client.newCall(new okhttp3.Request.Builder().url(getLink(i)).build()).b().body().string());
if (!matcher.find()) { if (!matcher.find()) {
return 0; return 0;
} }
@@ -68,8 +66,8 @@ public class FoafBase {
progressDialog.setCancelable(false); progressDialog.setCancelable(false);
progressDialog.show(); progressDialog.show();
F0x1dRequest.F0x1dRequestCallback callback = str -> FoafBase.lambdaLoadAndShow(progressDialog, context, i, str); Request.RequestCallback callback =str -> FoafBase.lambdaLoadAndShow(progressDialog, context, i, str);
F0x1dRequest.makeRequest(getLink(i), callback); Request.makeRequest(getLink(i), callback);
} }
static void lambdaLoadAndShow(ProgressDialog progressDialog, Context context, int i, String str) { static void lambdaLoadAndShow(ProgressDialog progressDialog, Context context, int i, String str) {
@@ -1,4 +1,4 @@
package ru.f0x1d.net; package ru.vtosters.lite.net;
import android.util.Base64; import android.util.Base64;
@@ -1,4 +1,4 @@
package ru.f0x1d.net; package ru.vtosters.lite.net;
import java.io.IOException; import java.io.IOException;
@@ -1,4 +1,4 @@
package ru.f0x1d.net; package ru.vtosters.lite.net;
import java.net.PasswordAuthentication; import java.net.PasswordAuthentication;
import java.net.Proxy; import java.net.Proxy;
@@ -1,4 +1,4 @@
package ru.f0x1d.net; package ru.vtosters.lite.net;
import java.util.Map; import java.util.Map;
import java.util.TreeMap; import java.util.TreeMap;
@@ -1,4 +1,4 @@
package ru.f0x1d.net; package ru.vtosters.lite.net;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.InputStream; import java.io.InputStream;
@@ -0,0 +1,76 @@
package ru.vtosters.lite.net;
import static ru.vtosters.lite.utils.Globals.getUserToken;
import android.os.AsyncTask;
import com.vk.core.network.Network;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class Request {
public static void makeRequest(byte[] bArr, RequestCallback RequestCallback) {
new MakeRequestTask(bArr, RequestCallback).execute();
}
public static void makeRequest(String str, RequestCallback RequestCallback) {
new MakeRequestTask(str.getBytes(), RequestCallback).execute();
}
public interface RequestCallback {
void onResponse(String str);
}
private static class MakeRequestTask extends AsyncTask<Void, Void, String> {
private final RequestCallback callback;
private boolean mIsPut;
private boolean mIsVTostersRequest;
private final byte[] url;
public MakeRequestTask(byte[] bArr, RequestCallback RequestCallback) {
mIsVTostersRequest = false;
mIsPut = false;
callback = RequestCallback;
url = bArr;
}
public String doInBackground(Void... voidArr) {
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(new String(url)).openConnection();
httpURLConnection.setRequestMethod(mIsPut ? "PUT" : "GET");
if (mIsVTostersRequest) {
httpURLConnection.setRequestProperty("Token", getUserToken());
}
if (!mIsVTostersRequest) {
httpURLConnection.setRequestProperty("User-Agent", Network.a.a().a());
}
httpURLConnection.setRequestProperty("Content-Type", mIsVTostersRequest ? "Content-Type" : "application/x-www-form-urlencoded");
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));
StringBuffer stringBuffer = new StringBuffer();
while (true) {
String readLine = bufferedReader.readLine();
if (readLine != null) {
stringBuffer.append(readLine);
} else {
bufferedReader.close();
return stringBuffer.toString();
}
}
} catch (Exception e) {
return e.getLocalizedMessage();
}
}
public void onPostExecute(String str) {
super.onPostExecute(str);
callback.onResponse(str);
}
}
}
@@ -2,7 +2,7 @@ package ru.vtosters.lite.ui.dialogs;
import static ru.vtosters.lite.utils.Globals.edit; import static ru.vtosters.lite.utils.Globals.edit;
import static ru.vtosters.lite.utils.Globals.getContext; import static ru.vtosters.lite.utils.Globals.getContext;
import static ru.vtosters.lite.utils.Preferences.BooleanTrue; import static ru.vtosters.lite.utils.Preferences.getBoolValue;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
@@ -17,7 +17,7 @@ import ru.vtosters.lite.utils.OEMDetector;
public class DisableBattery { public class DisableBattery {
public static void alert(Activity activity) { public static void alert(Activity activity) {
if (OEMDetector.isOEM() && Build.VERSION.SDK_INT >= 23 && BooleanTrue("showDoze")) { if (OEMDetector.isOEM() && Build.VERSION.SDK_INT >= 23 && getBoolValue("showDoze", true)) {
final Context context = getContext(); final Context context = getContext();
if (!((PowerManager) context.getSystemService(Context.POWER_SERVICE)).isIgnoringBatteryOptimizations(context.getPackageName())) { if (!((PowerManager) context.getSystemService(Context.POWER_SERVICE)).isIgnoringBatteryOptimizations(context.getPackageName())) {
AlertDialog.Builder builder = new AlertDialog.Builder(activity); AlertDialog.Builder builder = new AlertDialog.Builder(activity);
@@ -3,7 +3,7 @@ package ru.vtosters.lite.ui.dialogs;
import static ru.vtosters.lite.utils.Globals.edit; import static ru.vtosters.lite.utils.Globals.edit;
import static ru.vtosters.lite.utils.Globals.getContext; import static ru.vtosters.lite.utils.Globals.getContext;
import static ru.vtosters.lite.utils.Globals.isGmsInstalled; import static ru.vtosters.lite.utils.Globals.isGmsInstalled;
import static ru.vtosters.lite.utils.Preferences.BooleanTrue; import static ru.vtosters.lite.utils.Preferences.getBoolValue;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
@@ -39,7 +39,7 @@ public class InstallGMS {
context.startActivity(a2); context.startActivity(a2);
} }
}); });
if (BooleanTrue("showAlertGms")) { if (getBoolValue("showAlertGms", true)) {
builder.show(); builder.show();
} }
} }
@@ -1,7 +1,7 @@
package ru.vtosters.lite.ui.dialogs; package ru.vtosters.lite.ui.dialogs;
import static ru.vtosters.lite.utils.Globals.edit; import static ru.vtosters.lite.utils.Globals.edit;
import static ru.vtosters.lite.utils.Preferences.BooleanTrue; import static ru.vtosters.lite.utils.Preferences.getBoolValue;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
@@ -36,7 +36,7 @@ public class Start {
activity.startActivity(new Intent("android.intent.action.VIEW").setData(Uri.parse("https://t.me/vtosters"))); activity.startActivity(new Intent("android.intent.action.VIEW").setData(Uri.parse("https://t.me/vtosters")));
} }
}); });
if (BooleanTrue("showAlert")) { if (getBoolValue("showAlert", true)) {
builder.show(); builder.show();
} }
} }
@@ -74,6 +74,8 @@ public class OtherFragment extends MaterialPreferenceToolbarFragment {
@Override // android.support.v7.preference.Preference.c @Override // android.support.v7.preference.Preference.c
public boolean a(Preference preference) { public boolean a(Preference preference) {
SharedPreferences prefs = getContext().getSharedPreferences("stickers", Context.MODE_PRIVATE);
prefs.edit().clear().commit();
VKImageLoader.b(); VKImageLoader.b();
ImEngineProvider.a().h(); ImEngineProvider.a().h();
AudioMessageUtils.j(); AudioMessageUtils.j();
@@ -1,8 +1,7 @@
package ru.vtosters.lite.ui.fragments; 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.getString;
import static ru.vtosters.lite.utils.IconHelper.switchToDefault;
import static ru.vtosters.lite.utils.IconHelper.switchToVK;
import android.os.Bundle; import android.os.Bundle;
import android.support.v7.preference.Preference; import android.support.v7.preference.Preference;
@@ -22,10 +21,13 @@ public class ThemesFragment extends MaterialPreferenceToolbarFragment {
public boolean apply(Preference preference, Object obj) { public boolean apply(Preference preference, Object obj) {
if (((Boolean) obj).booleanValue()) { if (((Boolean) obj).booleanValue()) {
switchToVK(); componentSwitcher("VTIconDefault", false);
componentSwitcher("VTIconVK", true);
} else { } else {
switchToDefault(); componentSwitcher("VTIconDefault", true);
componentSwitcher("VTIconVK", false);
} }
ToastUtils.a(getString("iconapplying")); ToastUtils.a(getString("iconapplying"));
return true; return true;
} }
@@ -1,8 +1,10 @@
package ru.vtosters.lite.ui.fragments.dockbar; package ru.vtosters.lite.ui.fragments.dockbar;
import static ru.vtosters.lite.utils.Globals.getContext; import static ru.vtosters.lite.utils.Globals.getContext;
import static ru.vtosters.lite.utils.Themes.getAccentColor;
import android.content.res.ColorStateList; import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
@@ -62,11 +64,17 @@ public class DockBarInjector {
for (DockBarTab tab : sManager.getSelectedTabs()) { for (DockBarTab tab : sManager.getSelectedTabs()) {
MenuItem add = menu.add(0, tab.id, 0, tab.titleID); MenuItem add = menu.add(0, tab.id, 0, tab.titleID);
Drawable drawable = getContext().getResources().getDrawable(tab.iconID); Drawable drawable = getContext().getResources().getDrawable(tab.iconID);
ColorStateList colorStateList = getContext().getResources().getColorStateList(com.vtosters.lite.R.color.bottom_navigation_item); ColorStateList dockcolors = new ColorStateList(
// if (isAndroidMonet()) { new int[][]{
// colorStateList = ColorStateList.valueOf(Themes.getAccentColor()); new int[]{android.R.attr.state_checked},
// } new int[]{-android.R.attr.state_checked}
add.setIcon(new RecoloredDrawable(drawable, colorStateList)); },
new int[] {
getAccentColor(),
Color.parseColor("#ffaaaeb3")
}
);
add.setIcon(new RecoloredDrawable(drawable, dockcolors));
add.setShowAsAction(1); add.setShowAsAction(1);
add.setCheckable(true); add.setCheckable(true);
} }
@@ -5,7 +5,6 @@ import static ru.vtosters.lite.utils.Preferences.newfeed;
import static ru.vtosters.lite.utils.Preferences.olddock; import static ru.vtosters.lite.utils.Preferences.olddock;
import com.vk.apps.AppsFragment; import com.vk.apps.AppsFragment;
import com.vk.discover.DiscoverFeedFragment;
import com.vk.discover.DiscoverFragment; import com.vk.discover.DiscoverFragment;
import com.vk.fave.fragments.FaveTabFragment; import com.vk.fave.fragments.FaveTabFragment;
import com.vk.feedlikes.fragments.FeedLikesFragment; import com.vk.feedlikes.fragments.FeedLikesFragment;
@@ -80,7 +79,7 @@ public class DockBarManager {
if (!dockbar.exists()) { 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_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, newfeed() ? DiscoverFragment.class : DiscoverFeedFragment.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_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_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)); 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));
@@ -118,14 +117,14 @@ public class DockBarManager {
if (newfeed()) { if (newfeed()) {
if (tab.fragmentClass == NewsfeedFragment.class) { if (tab.fragmentClass == NewsfeedFragment.class) {
tab.fragmentClass = HomeFragment.class; tab.fragmentClass = HomeFragment.class;
} else if (tab.fragmentClass == DiscoverFeedFragment.class) { } else if (tab.fragmentClass == DiscoverFragment.class) {
tab.fragmentClass = DiscoverFragment.class; tab.fragmentClass = DiscoverFragment.class;
} }
} else { } else {
if (tab.fragmentClass == HomeFragment.class) { if (tab.fragmentClass == HomeFragment.class) {
tab.fragmentClass = NewsfeedFragment.class; tab.fragmentClass = NewsfeedFragment.class;
} else if (tab.fragmentClass == DiscoverFragment.class) { } else if (tab.fragmentClass == DiscoverFragment.class) {
tab.fragmentClass = DiscoverFeedFragment.class; tab.fragmentClass = DiscoverFragment.class;
} }
} }
mSelectedTabs.add(tab); mSelectedTabs.add(tab);
@@ -144,14 +143,14 @@ public class DockBarManager {
if (newfeed()) { if (newfeed()) {
if (tab.fragmentClass == NewsfeedFragment.class) { if (tab.fragmentClass == NewsfeedFragment.class) {
tab.fragmentClass = HomeFragment.class; tab.fragmentClass = HomeFragment.class;
} else if (tab.fragmentClass == DiscoverFeedFragment.class) { } else if (tab.fragmentClass == DiscoverFragment.class) {
tab.fragmentClass = DiscoverFragment.class; tab.fragmentClass = DiscoverFragment.class;
} }
} else { } else {
if (tab.fragmentClass == HomeFragment.class) { if (tab.fragmentClass == HomeFragment.class) {
tab.fragmentClass = NewsfeedFragment.class; tab.fragmentClass = NewsfeedFragment.class;
} else if (tab.fragmentClass == DiscoverFragment.class) { } else if (tab.fragmentClass == DiscoverFragment.class) {
tab.fragmentClass = DiscoverFeedFragment.class; tab.fragmentClass = DiscoverFragment.class;
} }
} }
mDisabledTabs.add(tab); mDisabledTabs.add(tab);
@@ -1,12 +1,15 @@
package ru.vtosters.lite.ui.fragments.multiaccount; package ru.vtosters.lite.ui.fragments.multiaccount;
import static ru.vtosters.lite.utils.Globals.convertDpToPixel; import static ru.vtosters.lite.utils.Globals.convertDpToPixel;
import static ru.vtosters.lite.utils.Globals.getContext;
import static ru.vtosters.lite.utils.Globals.getResources; import static ru.vtosters.lite.utils.Globals.getResources;
import static ru.vtosters.lite.utils.Globals.isNetworkConnected; import static ru.vtosters.lite.utils.Globals.isNetworkConnected;
import static ru.vtosters.lite.utils.Globals.restartApplication; import static ru.vtosters.lite.utils.Globals.restartApplication;
import static ru.vtosters.lite.utils.Themes.getTextAttr; import static ru.vtosters.lite.utils.Themes.getTextAttr;
import static ru.vtosters.lite.utils.Themes.recolorDrawable; import static ru.vtosters.lite.utils.Themes.recolorDrawable;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView;
@@ -127,6 +130,8 @@ public class MultiAccountAdapter extends RecyclerView.a<MultiAccountAdapter.Mult
VKAccount b = VKAccountManager.b(); VKAccount b = VKAccountManager.b();
PushSubscriber.a.a(b.b(), b.c()); PushSubscriber.a.a(b.b(), b.c());
AppContextHolder.a.getSharedPreferences("gcm", 0).edit().clear().apply(); AppContextHolder.a.getSharedPreferences("gcm", 0).edit().clear().apply();
SharedPreferences prefs = getContext().getSharedPreferences("stickers", Context.MODE_PRIVATE);
prefs.edit().clear().commit();
restartApplication(); restartApplication();
}); });
Drawable drawable = recolorDrawable(getResources().getDrawable(R.drawable.ic_list_add)); Drawable drawable = recolorDrawable(getResources().getDrawable(R.drawable.ic_list_add));
@@ -143,6 +148,8 @@ public class MultiAccountAdapter extends RecyclerView.a<MultiAccountAdapter.Mult
VKAccount b = VKAccountManager.b(); VKAccount b = VKAccountManager.b();
PushSubscriber.a.a(b.b(), b.c()); PushSubscriber.a.a(b.b(), b.c());
AppContextHolder.a.getSharedPreferences("gcm", 0).edit().clear().apply(); AppContextHolder.a.getSharedPreferences("gcm", 0).edit().clear().apply();
SharedPreferences prefs = getContext().getSharedPreferences("stickers", Context.MODE_PRIVATE);
prefs.edit().clear().commit();
restartApplication(); restartApplication();
}); });
@@ -164,6 +171,8 @@ public class MultiAccountAdapter extends RecyclerView.a<MultiAccountAdapter.Mult
VKAccount b = VKAccountManager.b(); VKAccount b = VKAccountManager.b();
PushSubscriber.a.a(b.b(), b.c()); PushSubscriber.a.a(b.b(), b.c());
AppContextHolder.a.getSharedPreferences("gcm", 0).edit().clear().apply(); AppContextHolder.a.getSharedPreferences("gcm", 0).edit().clear().apply();
SharedPreferences prefs = getContext().getSharedPreferences("stickers", Context.MODE_PRIVATE);
prefs.edit().clear().commit();
restartApplication(); restartApplication();
}); });
} }
@@ -12,6 +12,8 @@ import java.util.List;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import ru.vtosters.lite.utils.Globals;
public class MultiAccountManager { public class MultiAccountManager {
public static void migrate() { public static void migrate() {
@@ -20,7 +22,15 @@ public class MultiAccountManager {
SharedPreferences NewPrefs = getContext().getSharedPreferences("pref_account_manager0", Context.MODE_PRIVATE); SharedPreferences NewPrefs = getContext().getSharedPreferences("pref_account_manager0", Context.MODE_PRIVATE);
SharedPreferences.Editor editor = NewPrefs.edit(); SharedPreferences.Editor editor = NewPrefs.edit();
editor.putString("key_vk_account", OldPrefsValue); editor.putString("key_vk_account", OldPrefsValue);
editor.apply(); editor.commit();
}
public static void migrationRestart() {
SharedPreferences prefs = getPreferences();
if (prefs.getBoolean("multiaccount_restart", true)) {
prefs.edit().putBoolean("multiaccount_restart", false).commit();
Globals.restartApplication();
}
} }
public static SharedPreferences getCurrentAccount() { public static SharedPreferences getCurrentAccount() {
@@ -80,7 +90,15 @@ public class MultiAccountManager {
prefs.edit().clear().commit(); prefs.edit().clear().commit();
File file = new File(new File(getContext().getFilesDir().getParent(), "shared_prefs"), "pref_account_manager" + i); File file = new File(new File(getContext().getFilesDir().getParent(), "shared_prefs"), "pref_account_manager" + i);
if (file.exists()) file.delete(); if (file.exists()) file.delete();
if (account == i && getAccountPrefsCount() > 0) if (account == i && getAccountPrefsCount() > 0) {
switchAccount(buildList().get(0).index); List<MultiAccountItem> accounts = buildList();
if (accounts.size() > 0)
switchAccount(buildList().get(0).index);
else {
getContext().getSharedPreferences("pref_account_manager", Context.MODE_PRIVATE)
.edit().clear().commit();
Globals.getPreferences().edit().putBoolean("multiaccount_restart", true).commit();
}
}
} }
} }
@@ -8,8 +8,8 @@ import static ru.vtosters.lite.utils.Globals.getIdentifier;
import static ru.vtosters.lite.utils.Globals.getResources; import static ru.vtosters.lite.utils.Globals.getResources;
import static ru.vtosters.lite.utils.Globals.getString; import static ru.vtosters.lite.utils.Globals.getString;
import static ru.vtosters.lite.utils.Themes.getAccentColor; import static ru.vtosters.lite.utils.Themes.getAccentColor;
import static ru.vtosters.lite.utils.Themes.getNavbarColor;
import static ru.vtosters.lite.utils.Themes.getSTextAttr; import static ru.vtosters.lite.utils.Themes.getSTextAttr;
import static ru.vtosters.lite.utils.Themes.getTabbarBackground;
import static ru.vtosters.lite.utils.Themes.getTextAttr; import static ru.vtosters.lite.utils.Themes.getTextAttr;
import static ru.vtosters.lite.utils.Themes.recolorDrawable; import static ru.vtosters.lite.utils.Themes.recolorDrawable;
@@ -60,7 +60,7 @@ public class StickersFragment extends ToolbarFragment {
public final static String ACTION_RELOAD = "com.vtosters.lite.action.RELOAD_TGS_LIST"; public final static String ACTION_RELOAD = "com.vtosters.lite.action.RELOAD_TGS_LIST";
private final static int TYPE_DIRECT = 0, TYPE_SOCKS = 2, TYPE_TOASTER_SERVER = 3; private final static int TYPE_DIRECT = 0, TYPE_SOCKS = 2;
private static final String TAG = "StickersFragment"; private static final String TAG = "StickersFragment";
public int from; public int from;
public int to; public int to;
@@ -97,7 +97,6 @@ public class StickersFragment extends ToolbarFragment {
private void initGrabber() { private void initGrabber() {
int method = TGPref.getTGConnectMethod(); int method = TGPref.getTGConnectMethod();
switch (method) { switch (method) {
case TYPE_TOASTER_SERVER:
case TYPE_DIRECT: case TYPE_DIRECT:
TelegramStickersGrabber.USE_PROXY = false; TelegramStickersGrabber.USE_PROXY = false;
grabber.resetProxy(); grabber.resetProxy();
@@ -251,7 +250,6 @@ public class StickersFragment extends ToolbarFragment {
openMenu(getString("stickersproxy1")); openMenu(getString("stickersproxy1"));
return; return;
} }
case TYPE_TOASTER_SERVER:
case TYPE_DIRECT: case TYPE_DIRECT:
final Runnable work = () -> { final Runnable work = () -> {
LinearLayout linearLayout = new LinearLayout(super.n()); LinearLayout linearLayout = new LinearLayout(super.n());
@@ -372,7 +370,7 @@ public class StickersFragment extends ToolbarFragment {
holder.switchCompat.setOnCheckedChangeListener((buttonView, isChecked) -> stickersService.setPackEnabled(pack, isChecked, false)); holder.switchCompat.setOnCheckedChangeListener((buttonView, isChecked) -> stickersService.setPackEnabled(pack, isChecked, false));
holder.count.setText(pack.stickersCount + " " + getString("stickerscount")); holder.count.setText(pack.stickersCount + " " + getString("stickerscount"));
holder.layout.setBackgroundColor(getNavbarColor()); holder.layout.setBackgroundColor(getTabbarBackground());
// Color костыль // Color костыль
int color = getTextAttr(); int color = getTextAttr();
@@ -1,7 +1,9 @@
package ru.vtosters.lite.utils; package ru.vtosters.lite.utils;
import static ru.vtosters.lite.utils.Globals.*; import static ru.vtosters.lite.utils.Globals.getApplicationName;
import static ru.vtosters.lite.utils.Preferences.*; import static ru.vtosters.lite.utils.Globals.getContext;
import static ru.vtosters.lite.utils.Preferences.VERSIONNAME;
import static ru.vtosters.lite.utils.Preferences.oldabout;
import android.content.Context; import android.content.Context;
@@ -42,7 +44,7 @@ public class About {
} }
public static String getCommitLink() { public static String getCommitLink() {
return "https://github.com/vtosters/lite/commit/" + getBuild(getContext(), "version.properties"); return "https://git.devshelter.su/gdlbo/lite/commit/" + getBuild(getContext(), "version.properties"); // https://github.com/vtosters/lite/commit/ github repo
} }
public static String getBuild(Context context, String name) { public static String getBuild(Context context, String name) {
@@ -0,0 +1,160 @@
package ru.vtosters.lite.utils;
import static ru.vtosters.lite.utils.Globals.getContext;
import static ru.vtosters.lite.utils.Globals.getPrefsValue;
import static ru.vtosters.lite.utils.Preferences.getBoolValue;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteOpenHelper;
import android.text.TextUtils;
import com.vk.im.engine.events.OnMsgUpdateEvent;
import com.vk.im.engine.internal.longpoll.a.MsgDeleteLpTask;
import com.vk.im.engine.internal.storage.CacheEnvironment;
import com.vk.im.engine.models.messages.Msg;
import com.vk.im.engine.models.messages.MsgFromUser;
import com.vk.im.engine.models.messages.NestedMsg;
import com.vk.libsqliteext.CustomSqliteExtensions;
import org.sqlite.database.sqlite.SQLiteDatabase;
import java.util.ArrayList;
import java.util.List;
import ru.vtosters.lite.encryption.EncryptProvider;
public class DeletedMessagesHandler {
private static List<Integer> sDeletedMessagesList = new ArrayList<>();
private static SQLiteDatabase sVKSQLiteDatabase;
private static int sBodyIndex = -1;
private static DeletedMessagesDBHelper sVTDatabase;
public static void reloadMessagesList() {
if (sVTDatabase == null) {
sVTDatabase = new DeletedMessagesDBHelper();
}
sDeletedMessagesList = new ArrayList<>(sVTDatabase.loadAllMessages());
}
public static void grabVKDatabase(CacheEnvironment storageEnvironment) {
sVKSQLiteDatabase = storageEnvironment.b();
}
public static boolean hook() {
return getBoolValue("undeletemsg", false);
}
public static void setBodyDBParser(Msg msg) {
if (!(msg instanceof MsgFromUser)) return;
for (Integer integer : sDeletedMessagesList) {
MsgFromUser msgFromUser = (MsgFromUser) msg;
checkForNestedMsg(msgFromUser.g);
if (integer == msg.d) {
editTextOfMsg((MsgFromUser) msg);
break;
}
}
}
private static void checkForNestedMsg(List<NestedMsg> nestedMsgs) {
for (NestedMsg nestedMsg : nestedMsgs) {
if (!nestedMsg.i.isEmpty()) checkForNestedMsg(nestedMsg.i);
nestedMsg.b(EncryptProvider.decryptMessage(nestedMsg.E(), nestedMsg.h().c));
}
}
private static void editTextOfMsg(MsgFromUser msgFromUser) {
if (!msgFromUser.e.startsWith(getPreifxUndelete())) {
msgFromUser.e = getPreifxUndelete() + EncryptProvider.decryptMessage(msgFromUser);
}
}
private static String getPreifxUndelete() {
return getPrefsValue("undeletemsg_prefix") + " ";
}
public static void updateDialog(MsgDeleteLpTask msgDeleteLpTask) {
Cursor c = getMessageFromDatabaseById(msgDeleteLpTask.c);
if (c == null) return;
int localId = c.getInt(c.getColumnIndex("local_id"));
String str = DeletedMessagesHandler.class.getSimpleName();
msgDeleteLpTask.a.a(str, new OnMsgUpdateEvent(str, msgDeleteLpTask.b, localId));
}
public static void hookDeletedMessageId(MsgDeleteLpTask msgDeleteLpTask) {
if (!hook()) return;
int messageId = msgDeleteLpTask.c;
Cursor c = getMessageFromDatabaseById(messageId);
if (c == null) return;
if (sBodyIndex == -1) sBodyIndex = c.getColumnIndex("body");
if (TextUtils.isEmpty(c.getString(sBodyIndex))) {
deleteMessageFromDB(messageId);
return;
}
sDeletedMessagesList.add(messageId);
sVTDatabase.saveDeletedMessage(messageId);
}
public static Cursor getMessageFromDatabaseById(int messageId) {
String query = "SELECT * FROM messages WHERE vk_id = " + messageId;
Cursor c = CustomSqliteExtensions.a(sVKSQLiteDatabase, query);
if (!c.moveToFirst()) return null;
return c;
}
public static void deleteMessageFromDB(int messageId) {
sVKSQLiteDatabase.execSQL("DELETE FROM messages WHERE vk_id = " + messageId);
}
public static class DeletedMessagesDBHelper extends SQLiteOpenHelper {
public DeletedMessagesDBHelper() {
super(getContext(), "deleted_msgs", null, 1);
}
@Override
public void onCreate(android.database.sqlite.SQLiteDatabase db) {
db.execSQL("create table deleted_msgs (id integer primary key, msgId integer)");
}
@Override
public void onUpgrade(android.database.sqlite.SQLiteDatabase db, int oldVersion, int newVersion) {
}
public void saveDeletedMessage(int msgId) {
android.database.sqlite.SQLiteDatabase sqLiteDatabase = getWritableDatabase();
ContentValues contentValues = new ContentValues();
contentValues.put("msgId", msgId);
sqLiteDatabase.insert("deleted_msgs", null, contentValues);
sqLiteDatabase.close();
}
public List<Integer> loadAllMessages() {
List<Integer> msgIdsList = new ArrayList<>();
Cursor cursor = getReadableDatabase().query("deleted_msgs", null, null, null, null, null, null);
if (cursor.moveToFirst()) {
int msgIdIndex = cursor.getColumnIndex("msgId");
do {
msgIdsList.add(cursor.getInt(msgIdIndex));
} while (cursor.moveToNext());
cursor.close();
}
return msgIdsList;
}
}
}
@@ -2,7 +2,7 @@ package ru.vtosters.lite.utils;
import static ru.vtosters.lite.utils.Globals.getContext; import static ru.vtosters.lite.utils.Globals.getContext;
import static ru.vtosters.lite.utils.Globals.isEmpty; import static ru.vtosters.lite.utils.Globals.isEmpty;
import static ru.vtosters.lite.utils.Preferences.*; import static ru.vtosters.lite.utils.Preferences.isEnableExternalOpening;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.Context; import android.content.Context;
@@ -1,11 +1,13 @@
package ru.vtosters.lite.utils; package ru.vtosters.lite.utils;
import static ru.vtosters.lite.utils.Preferences.getLocale; import static ru.vtosters.lite.utils.Preferences.getLocale;
import static ru.vtosters.lite.utils.Preferences.preferences;
import android.app.Activity; import android.app.Activity;
import android.app.Application; import android.app.Application;
import android.app.NotificationChannel; import android.app.NotificationChannel;
import android.app.NotificationManager; import android.app.NotificationManager;
import android.content.ComponentName;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
@@ -16,10 +18,10 @@ import android.net.NetworkInfo;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import com.vk.core.util.ToastUtils;
import com.vtosters.lite.UserProfile; import com.vtosters.lite.UserProfile;
import com.vtosters.lite.VKActivity; import com.vtosters.lite.VKActivity;
import com.vtosters.lite.api.ExtendedUserProfile; import com.vtosters.lite.api.ExtendedUserProfile;
@@ -34,10 +36,23 @@ import java.util.Locale;
public class Globals { public class Globals {
private static final List<Activity> activities = new ArrayList<>(); private static final List<Activity> activities = new ArrayList<>();
// Current UserId public static SharedPreferences getDefprefs() {
if (preferences == null) preferences = PreferenceManager.getDefaultSharedPreferences(getContext());
return preferences;
}
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);
} // Component switcher for changing app icon
public static String getPrefsValue(String pref) {
return getPreferences().getString(pref, "");
} // Get pref value as string
public static int getUserId() { public static int getUserId() {
return VKAccountManager.b().a(); return VKAccountManager.b().a();
} } // Current UserId
public static String getUserSecret() { public static String getUserSecret() {
return VKAccountManager.b().c(); return VKAccountManager.b().c();
@@ -49,17 +64,15 @@ public class Globals {
public static SharedPreferences.Editor edit() { public static SharedPreferences.Editor edit() {
return PreferenceManager.getDefaultSharedPreferences(getContext()).edit(); return PreferenceManager.getDefaultSharedPreferences(getContext()).edit();
} } // Edit SharedPreferences
// Delete and reload msg cache
public static void reloadMSG() { public static void reloadMSG() {
ImEngineProvider.a().h(); ImEngineProvider.a().h();
} } // Delete and reload msg cache
// UserId Profile via userProfile
public static int getUserID(UserProfile userProfile) { public static int getUserID(UserProfile userProfile) {
return userProfile.n; return userProfile.n;
} } // UserId Profile via userProfile
public static String getUserFirstName(UserProfile userProfile) { public static String getUserFirstName(UserProfile userProfile) {
return userProfile.p; return userProfile.p;
@@ -69,26 +82,25 @@ public class Globals {
return userProfile.o; return userProfile.o;
} }
// UserId Profile via extendedUserProfile
public static int getUserID(ExtendedUserProfile extendedUserProfile) { public static int getUserID(ExtendedUserProfile extendedUserProfile) {
return getUserID(fromEup(extendedUserProfile)); return getUserID(fromEup(extendedUserProfile));
} } // UserId Profile via extendedUserProfile
public static UserProfile fromEup(ExtendedUserProfile extendedUserProfile) { public static UserProfile fromEup(ExtendedUserProfile extendedUserProfile) {
return extendedUserProfile.a; return extendedUserProfile.a;
} }
// Application restart (works on sdk 29+ too)
public static void restartApplication() { public static void restartApplication() {
Context ctx = getContext(); Context ctx = getContext();
PackageManager pm = ctx.getPackageManager(); PackageManager pm = ctx.getPackageManager();
Intent intent = pm.getLaunchIntentForPackage(ctx.getPackageName()); Intent intent = pm.getLaunchIntentForPackage(ctx.getPackageName());
Intent mainIntent = Intent.makeRestartActivityTask(intent.getComponent()); Intent mainIntent = Intent.makeRestartActivityTask(intent.getComponent());
ctx.startActivity(mainIntent); ctx.startActivity(mainIntent);
Runtime.getRuntime().exit(0);
}
// Global Context Runtime.getRuntime().exit(0);
} // Application restart (works on sdk 29+ too)
@NonNull @NonNull
public static Context getContext() { public static Context getContext() {
try { try {
@@ -100,9 +112,9 @@ public class Globals {
e.printStackTrace(); e.printStackTrace();
} }
return null; return null;
} } // Getting the global context through reflection to use context on application initialization
// Google Market Services check
public static boolean isGmsInstalled() { public static boolean isGmsInstalled() {
try { try {
getContext().getPackageManager().getPackageInfo("com.google.android.gms", 0); getContext().getPackageManager().getPackageInfo("com.google.android.gms", 0);
@@ -110,19 +122,19 @@ public class Globals {
} catch (Exception unused) { } catch (Exception unused) {
return false; return false;
} }
} } // Google Market Services check
public static Resources getResources() { public static Resources getResources() {
return getContext().getResources(); return getContext().getResources();
} }
public static int getIdentifier(String str, String str2) { public static int getIdentifier(String name, String type) {
return getResources().getIdentifier(str, str2, getContext().getPackageName()); return getResources().getIdentifier(name, type, getContext().getPackageName());
} } // Get res id
public static String getString(String str) { public static String getString(String resourcename) {
return getContext().getString(Integer.parseInt(String.valueOf(getContext().getResources().getIdentifier(str, "string", getContext().getPackageName())))); return getContext().getString(Integer.parseInt(String.valueOf(getContext().getResources().getIdentifier(resourcename, "string", getContext().getPackageName()))));
} } // Get string via getIdentifier
public static String getPackageName() { public static String getPackageName() {
return getContext().getPackageName(); return getContext().getPackageName();
@@ -137,7 +149,7 @@ public class Globals {
} }
public static void sendToast(String text) { public static void sendToast(String text) {
ToastUtils.a(text); Toast.makeText(getContext(), text, Toast.LENGTH_SHORT).show();
} }
public static boolean isEmpty(String str) { public static boolean isEmpty(String str) {
@@ -148,28 +160,25 @@ public class Globals {
ConnectivityManager cm = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE); ConnectivityManager cm = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
return activeNetwork != null && activeNetwork.isConnectedOrConnecting(); return activeNetwork != null && activeNetwork.isConnectedOrConnecting();
} } // Network check
// Music channels fix
public static void fixGapps() { public static void fixGapps() {
try { try {
if (Build.VERSION.SDK_INT >= 26) { if (Build.VERSION.SDK_INT >= 26) {
NotificationManager notificationManager = (NotificationManager) getContext().getSystemService(Context.NOTIFICATION_SERVICE); NotificationManager notificationManager = (NotificationManager) getContext().getSystemService(Context.NOTIFICATION_SERVICE);
boolean z = false; boolean hasMusicChannel = false;
try { try {
if (notificationManager.getNotificationChannel("audio_playback_channel") != null) { if (notificationManager.getNotificationChannel("audio_playback_channel") != null) {
z = true; hasMusicChannel = true;
} }
} catch (Exception ignored) { } catch (Exception ignored) {}
} if (!hasMusicChannel) {
if (!z) {
notificationManager.createNotificationChannel(new NotificationChannel("audio_playback_channel", getResources().getString(com.vtosters.lite.R.string.audio_message_play_error), NotificationManager.IMPORTANCE_LOW)); notificationManager.createNotificationChannel(new NotificationChannel("audio_playback_channel", getResources().getString(com.vtosters.lite.R.string.audio_message_play_error), NotificationManager.IMPORTANCE_LOW));
} }
} }
} catch (Exception ignored) { } catch (Exception ignored) {}
} } // Music channels fix
}
public static void registerActivities(Application application) { public static void registerActivities(Application application) {
application.registerActivityLifecycleCallbacks(new Application.ActivityLifecycleCallbacks() { application.registerActivityLifecycleCallbacks(new Application.ActivityLifecycleCallbacks() {
@@ -207,24 +216,41 @@ public class Globals {
}); });
} }
public static Activity getCurrentActivity() {
if (activities.size() == 0) return null;
else return activities.get(0);
}
public static String getApplicationName() { public static String getApplicationName() {
return getContext().getApplicationInfo().loadLabel(getContext().getPackageManager()).toString(); return getContext().getApplicationInfo().loadLabel(getContext().getPackageManager()).toString();
} }
// Language changer and BaseContext inject
public static Context BaseContextLocale(Context context) { public static Context BaseContextLocale(Context context) {
Locale locale = new Locale(getLocale()); Locale locale = new Locale(getLocale());
Locale.setDefault(locale); Locale.setDefault(locale);
var resources = context.getResources(); var resources = context.getResources();
var configuration = resources.getConfiguration(); var configuration = resources.getConfiguration();
if (Build.VERSION.SDK_INT >= 24) { if (Build.VERSION.SDK_INT >= 24) {
configuration.setLocale(locale); configuration.setLocale(locale);
configuration.setLayoutDirection(locale); configuration.setLayoutDirection(locale);
return context.createConfigurationContext(configuration); return context.createConfigurationContext(configuration);
} }
configuration.locale = locale; configuration.locale = locale;
configuration.setLayoutDirection(locale); configuration.setLayoutDirection(locale);
resources.updateConfiguration(configuration, resources.getDisplayMetrics()); resources.updateConfiguration(configuration, resources.getDisplayMetrics());
return context; return context;
} // Language changer and BaseContext injector
public static float[] getCenterScreenCoords() {
int width = getResources().getDisplayMetrics().widthPixels;
int height = getResources().getDisplayMetrics().heightPixels;
int centerWidth = width/2;
int centerHeight = height/2;
return new float[] {centerWidth, centerHeight};
} }
} }
@@ -1,23 +0,0 @@
package ru.vtosters.lite.utils;
import static ru.vtosters.lite.utils.Globals.getContext;
import static ru.vtosters.lite.utils.Globals.getPackageName;
import android.content.ComponentName;
import android.content.pm.PackageManager;
public class IconHelper {
public static void switchToVK() {
var packageManager = getContext().getPackageManager();
var packageName = getPackageName();
packageManager.setComponentEnabledSetting(new ComponentName(packageName, getPackageName() + ".VTIconDefault"), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
packageManager.setComponentEnabledSetting(new ComponentName(packageName, getPackageName() + ".VTIconVK"), PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
}
public static void switchToDefault() {
var packageManager = getContext().getPackageManager();
var packageName = getPackageName();
packageManager.setComponentEnabledSetting(new ComponentName(packageName, getPackageName() + ".VTIconDefault"), PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
packageManager.setComponentEnabledSetting(new ComponentName(packageName, getPackageName() + ".VTIconVK"), PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
}
}
@@ -3,19 +3,19 @@ package ru.vtosters.lite.utils;
import static java.lang.Long.MAX_VALUE; import static java.lang.Long.MAX_VALUE;
import static ru.vtosters.lite.ui.fragments.dockbar.DockBarManager.getInstance; import static ru.vtosters.lite.ui.fragments.dockbar.DockBarManager.getInstance;
import static ru.vtosters.lite.utils.Globals.getContext; import static ru.vtosters.lite.utils.Globals.getContext;
import static ru.vtosters.lite.utils.Globals.getPreferences; import static ru.vtosters.lite.utils.Globals.getPrefsValue;
import static ru.vtosters.lite.utils.Preferences.BooleanTrue; import static ru.vtosters.lite.utils.Preferences.CommentsSort;
import static ru.vtosters.lite.utils.Preferences.adsgroup; import static ru.vtosters.lite.utils.Preferences.adsgroup;
import static ru.vtosters.lite.utils.Preferences.adsstories; import static ru.vtosters.lite.utils.Preferences.adsstories;
import static ru.vtosters.lite.utils.Preferences.authorsrecomm; import static ru.vtosters.lite.utils.Preferences.authorsrecomm;
import static ru.vtosters.lite.utils.Preferences.copyright_post; import static ru.vtosters.lite.utils.Preferences.copyright_post;
import static ru.vtosters.lite.utils.Preferences.friendsrecomm; 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.newfeed;
import static ru.vtosters.lite.utils.Preferences.postsrecomm; import static ru.vtosters.lite.utils.Preferences.postsrecomm;
import com.vk.apps.AppsFragment; import com.vk.apps.AppsFragment;
import com.vk.core.preference.Preference; import com.vk.core.preference.Preference;
import com.vk.discover.DiscoverFeedFragment;
import com.vk.discover.DiscoverFragment; import com.vk.discover.DiscoverFragment;
import com.vk.fave.fragments.FaveTabFragment; import com.vk.fave.fragments.FaveTabFragment;
import com.vk.menu.MenuFragment; import com.vk.menu.MenuFragment;
@@ -52,9 +52,7 @@ public class Newsfeed {
public static boolean isBlockedByFilter(String str) { public static boolean isBlockedByFilter(String str) {
for (String str2 : mFilters) { for (String str2 : mFilters) {
if (str.toLowerCase().contains(str2.toLowerCase())) { if (str.toLowerCase().contains(str2.toLowerCase())) return true;
return true;
}
} }
return false; return false;
} }
@@ -67,16 +65,16 @@ public class Newsfeed {
getFilter("default_ad_list", "StandartFilter.txt"); getFilter("default_ad_list", "StandartFilter.txt");
getFilter("shitposting", "IDontWantToReadIt.txt"); getFilter("shitposting", "IDontWantToReadIt.txt");
String string = getPreferences().getString("spamfilters", ""); String customfilters = getPrefsValue("spamfilters");
if (!string.isEmpty()) { if (!customfilters.isEmpty()) {
mFilters.addAll(Arrays.asList(string.split(", "))); mFilters.addAll(Arrays.asList(customfilters.split(", ")));
} }
} }
public static void getFilter(String boolname, String filename) { public static void getFilter(String boolname, String filename) {
if (BooleanTrue(boolname)) { if (getBoolValue(boolname, true)) {
try { try {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(getContext().getAssets().open(filename))); BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(getContext().getAssets().open(filename)));
while (true) { while (true) {
@@ -92,22 +90,22 @@ public class Newsfeed {
e.printStackTrace(); e.printStackTrace();
} }
} }
} } // Get needed filter list from assets
public static boolean injectFilters(JSONObject jSONObject) { public static boolean injectFilters(JSONObject jSONObject) {
String optString = jSONObject.optString(NavigatorKeys.j, ""); String optString = jSONObject.optString(NavigatorKeys.j, "");
if (!ads(optString) && !authors_rec(optString) && !recomm(optString) && !friendrecomm(optString)) { if (!ads(optString) && !checkCopyright(optString) && !authors_rec(optString) && !recomm(optString) && !friendrecomm(optString)) {
String optString2 = jSONObject.optString("post_type", ""); String optString2 = jSONObject.optString("post_type", "");
if (!ads(optString2) && !authors_rec(optString2) && !recomm(optString2) && !friendrecomm(optString2)) { if (!ads(optString2) && !authors_rec(optString2) && !recomm(optString2) && !friendrecomm(optString2)) {
String optString3 = jSONObject.optString("filters", ""); String optString3 = jSONObject.optString("filters", "");
if (ads(optString3) || authors_rec(optString3) || recomm(optString3) || friendrecomm(optString3) || isBlockedByFilter(jSONObject.optString(NavigatorKeys.x, "")) || checkCopyright(jSONObject) || captions(jSONObject)) { if (ads(optString3) || authors_rec(optString3) || recomm(optString3) || friendrecomm(optString3) || isBlockedByFilter(jSONObject.optString(NavigatorKeys.x, "")) || captions(jSONObject)) {
return false; return false;
} }
return !AD(jSONObject); return !AD(jSONObject);
} }
} }
return false; return false;
} } // json newsfeed/posts injector to detect and delete posts
public static boolean authors_rec(String str) { public static boolean authors_rec(String str) {
return str.equals("authors_rec") && !authorsrecomm(); return str.equals("authors_rec") && !authorsrecomm();
@@ -119,8 +117,7 @@ public class Newsfeed {
if (!Preferences.captions()) { if (!Preferences.captions()) {
return true; return true;
} }
boolean postsrecomm = postsrecomm(); return (jSONObject2.getString(NavigatorKeys.j).equals("explorebait") && !postsrecomm()) || ((jSONObject2.getString(NavigatorKeys.j).equals("shared") && postsrecomm()) || ((jSONObject.getString(NavigatorKeys.j).equals("digest") && postsrecomm()) || ((jSONObject2.getString(NavigatorKeys.j).equals("commented") && postsrecomm()) || (jSONObject2.getString(NavigatorKeys.j).equals("voted") && postsrecomm()))));
return (jSONObject2.getString(NavigatorKeys.j).equals("explorebait") && !postsrecomm) || ((jSONObject2.getString(NavigatorKeys.j).equals("shared") && postsrecomm) || ((jSONObject.getString(NavigatorKeys.j).equals("digest") && postsrecomm) || ((jSONObject2.getString(NavigatorKeys.j).equals("commented") && postsrecomm) || (jSONObject2.getString(NavigatorKeys.j).equals("voted") && postsrecomm))));
} catch (JSONException unused) { } catch (JSONException unused) {
return false; return false;
} }
@@ -145,8 +142,8 @@ public class Newsfeed {
return jSONObject.optInt("marked_as_ads", 0) == 1 && adsgroup(); return jSONObject.optInt("marked_as_ads", 0) == 1 && adsgroup();
} }
public static boolean checkCopyright(JSONObject jSONObject) { public static boolean checkCopyright(String str) {
return jSONObject.optInt("copyright", 0) == 1 && copyright_post(); return str.equals("copyright") && copyright_post();
} }
public static String friendsads() { public static String friendsads() {
@@ -173,93 +170,63 @@ public class Newsfeed {
return adsstories() ? "null" : "ads"; return adsstories() ? "null" : "ads";
} }
public static String getCommentsSort(String def) { public static String getCommentsSort(int value) {
String string = getPreferences().getString("commentssort", ""); return !CommentsSort() && value == 2 || value == 1 ? "desc" : "asc";
if (string.isEmpty()) {
return def;
}
if (string.equals("new")) {
return "desc";
}
if (string.equals("old")) {
return "asc";
}
return def;
} }
public static long getUpdateNewsfeed(boolean refresh_timeout) { public static long getUpdateNewsfeed(boolean refresh_timeout) {
String string = getPreferences().getString("newsupdate", ""); switch (getPrefsValue("newsupdate")) {
if (string.isEmpty()) { case "no_update":
return Preference.b().getLong(refresh_timeout ? "refresh_timeout_top" : "refresh_timeout_recent", 600000L); return MAX_VALUE;
case "imd_update":
return 10000L;
default:
return Preference.b().getLong(refresh_timeout ? "refresh_timeout_top" : "refresh_timeout_recent", 600000L);
} }
if (string.equals("no_update")) {
return MAX_VALUE;
}
if (string.equals("imd_update")) {
return 10000L;
}
return Preference.b().getLong(refresh_timeout ? "refresh_timeout_top" : "refresh_timeout_recent", 600000L);
} }
public static Class getStartFragment() { public static Class getStartFragment() {
String string = getPreferences().getString("start_values", ""); switch (getPrefsValue("start_values")) {
if (string.equals("default")) { case "newsfeed":
return getInstance().getSelectedTabs().get(0).fragmentClass; return newfeed() ? HomeFragment.class : NewsfeedFragment.class;
case "messenger":
return DialogsFragment.class;
case "groups":
return GroupsFragment.class;
case "music":
return MusicFragment.class;
case "friends":
return FriendsFragment.class;
case "photos":
return PhotosFragment.class;
case "videos":
return VideosFragment.class;
case "settings":
return SettingsListFragment.class;
case "apps":
return AppsFragment.class;
case "discover":
return DiscoverFragment.class;
case "notifications":
return NotificationsContainerFragment.class;
case "money":
return MoneyTransfersFragment.class;
case "games":
return GamesFragment.class;
case "liked":
return FaveTabFragment.class;
case "menu":
return MenuFragment.class;
case "profile":
return ProfileFragment.class;
case "lives":
return LivesTabsFragment.class;
case "docs":
return DocumentsViewFragment.class;
case "brtd":
return BirthdaysFragment.class;
default:
return getInstance().getSelectedTabs().get(0).fragmentClass;
} }
if (string.equals("newsfeed")) {
return newfeed() ? HomeFragment.class : NewsfeedFragment.class;
}
if (string.equals("messenger")) {
return DialogsFragment.class;
}
if (string.equals("groups")) {
return GroupsFragment.class;
}
if (string.equals("music")) {
return MusicFragment.class;
}
if (string.equals("friends")) {
return FriendsFragment.class;
}
if (string.equals("photos")) {
return PhotosFragment.class;
}
if (string.equals("videos")) {
return VideosFragment.class;
}
if (string.equals("settings")) {
return SettingsListFragment.class;
}
if (string.equals("apps")) {
return AppsFragment.class;
}
if (string.equals("discover")) {
return newfeed() ? DiscoverFragment.class : DiscoverFeedFragment.class;
}
if (string.equals("notifications")) {
return NotificationsContainerFragment.class;
}
if (string.equals("money")) {
return MoneyTransfersFragment.class;
}
if (string.equals("games")) {
return GamesFragment.class;
}
if (string.equals("liked")) {
return FaveTabFragment.class;
}
if (string.equals("menu")) {
return MenuFragment.class;
}
if (string.equals("profile")) {
return ProfileFragment.class;
}
if (string.equals("lives")) {
return LivesTabsFragment.class;
}
if (string.equals("docs")) {
return DocumentsViewFragment.class;
}
return string.equals("brtd") ? BirthdaysFragment.class : getInstance().getSelectedTabs().get(0).fragmentClass;
} }
} }
@@ -37,18 +37,15 @@ public class OEMDetector {
private static String getSystemProperty(String str) { private static String getSystemProperty(String str) {
BufferedReader bufferedReader; BufferedReader bufferedReader;
Throwable th;
BufferedReader bufferedReader2 = null;
try { try {
bufferedReader = new BufferedReader(new InputStreamReader(Runtime.getRuntime().exec("getprop " + str).getInputStream()), 1024); bufferedReader = new BufferedReader(new InputStreamReader(Runtime.getRuntime().exec("getprop " + str).getInputStream()), 1024);
try { try {
String readLine = bufferedReader.readLine();
try { try {
bufferedReader.close(); bufferedReader.close();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
return readLine; return bufferedReader.readLine();
} catch (IOException ignored) { } catch (IOException ignored) {
} }
} catch (Throwable ignored) { } catch (Throwable ignored) {
@@ -0,0 +1,61 @@
package ru.vtosters.lite.utils;
import static ru.vtosters.lite.utils.Preferences.dev;
import static ru.vtosters.lite.utils.Preferences.opusmodule;
import android.util.Log;
import com.vk.medianative.MediaNative;
import java.nio.ByteBuffer;
public class OpusLoader {
private static long timetracker;
private static boolean inited;
public static void LoadLibrary(String libname){
try {
System.loadLibrary(libname);
inited = true;
} catch (UnsatisfiedLinkError unused2) {
if(dev()) Log.d("VTLite", "Failed to load " + libname);
inited = false;
}
}
public static long getLength() {
if (isReadyToUse()) {
long length = System.currentTimeMillis() - timetracker;
timetracker = System.currentTimeMillis();
return length;
}
return 0L;
}
public static int AudioStartRecordBridge(String str) {
if (isReadyToUse()) {
// Init custom AudioStartRecord
timetracker = System.currentTimeMillis();
return 1;
}
return MediaNative.nativeAudioStartRecord(str);
}
public static int AudioWriteFrameBridge(ByteBuffer buffer, int length) {
if (isReadyToUse()) {
// Init custom AudioWriteFrame
}
return MediaNative.nativeAudioWriteFrame(buffer, length);
}
public static void AudioStopRecordBridge() {
if (isReadyToUse()) {
// Init custom AudioStopRecord
}
MediaNative.nativeAudioStopRecord();
}
private static boolean isReadyToUse() {
return opusmodule() && inited;
}
}
@@ -1,9 +1,15 @@
package ru.vtosters.lite.utils; package ru.vtosters.lite.utils;
import static ru.vtosters.lite.ui.fragments.multiaccount.MultiAccountManager.migrate; import static ru.vtosters.lite.ui.fragments.multiaccount.MultiAccountManager.migrate;
import static ru.vtosters.lite.utils.Globals.*; import static ru.vtosters.lite.utils.DeletedMessagesHandler.reloadMessagesList;
import static ru.vtosters.lite.utils.Newsfeed.*; import static ru.vtosters.lite.utils.Globals.fixGapps;
import static ru.vtosters.lite.utils.Proxy.*; import static ru.vtosters.lite.utils.Globals.getContext;
import static ru.vtosters.lite.utils.Globals.getPrefsValue;
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.Themes.systemThemeChanger;
import android.app.Application; import android.app.Application;
import android.content.Context; import android.content.Context;
@@ -17,72 +23,85 @@ import com.vtosters.lite.data.Users;
import java.util.Locale; import java.util.Locale;
public class Preferences { public class Preferences {
public static SharedPreferences preferences = getContext().getSharedPreferences("com.vtosters.lite_preferences", Context.MODE_PRIVATE);
public static String VERSIONNAME = "Beta"; public static String VERSIONNAME = "Beta";
public static Integer VKBUILD = 12116; // 3439 orig
public static String VKVER = "7.24"; // 5.29 orig
public static void init(Application application) { public static void init(Application application) {
setupFilters(); setupFilters();
fixGapps(); fixGapps();
setProxy(); setProxy();
migrate(); migrate();
reloadMessagesList();
registerActivities(application); registerActivities(application);
LoadLibrary("vkopustest");
systemThemeChanger();
} // VK Init
public static boolean getBoolValue(String key, Boolean value) {
if (preferences == null) {
preferences = PreferenceManager.getDefaultSharedPreferences(getContext());
}
return preferences.getBoolean(key, value);
} // Set bool by default and get value
public static boolean opusmodule() {
return getBoolValue("opusmodule", true);
} }
public static boolean BooleanFalse(String key) { public static boolean systemtheme() {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); return getBoolValue("systemtheme", true);
return prefs.getBoolean(key, false);
}
public static boolean BooleanTrue(String key) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
return prefs.getBoolean(key, true);
} }
public static boolean authorsrecomm() { public static boolean authorsrecomm() {
return BooleanTrue("authorsrecomm"); return getBoolValue("authorsrecomm", true);
} }
public static boolean captions() { public static boolean captions() {
return BooleanTrue("captions"); return getBoolValue("captions", true);
} }
public static boolean copyright_post() { public static boolean copyright_post() {
return BooleanFalse("copyright_post"); return getBoolValue("copyright_post", false);
} }
public static boolean default_ad_list() { public static boolean default_ad_list() {
return BooleanFalse("default_ad_list"); return getBoolValue("default_ad_list", false);
} }
public static boolean shitposting() { public static boolean shitposting() {
return BooleanFalse("shitposting"); return getBoolValue("shitposting", false);
} }
public static boolean friendsrecomm() { public static boolean friendsrecomm() {
return BooleanTrue("friendsrecomm"); return getBoolValue("friendsrecomm", true);
} }
public static boolean isBGStickersEnabled() { public static boolean isBGStickersEnabled() {
return BooleanTrue("isBGStickersEnabled"); return getBoolValue("isBGStickersEnabled", true);
} }
public static boolean ads() { public static boolean ads() {
return BooleanFalse("__dbg_no_ads"); return getBoolValue("__dbg_no_ads", false);
} }
public static boolean adsgroup() { public static boolean adsgroup() {
return BooleanFalse("adsgroup"); return getBoolValue("adsgroup", false);
} }
public static boolean olddock() { public static boolean olddock() {
return BooleanFalse("olddock"); return getBoolValue("olddock", false);
} }
public static boolean adsslider() { public static boolean adsslider() {
return BooleanFalse("__dbg_no_slider_ads"); return getBoolValue("__dbg_no_slider_ads", false);
} }
public static boolean adsstories() { public static boolean adsstories() {
return BooleanFalse("adsstories"); return getBoolValue("adsstories", false);
} }
public static boolean alteremoji(Context context) { public static boolean alteremoji(Context context) {
@@ -90,63 +109,67 @@ public class Preferences {
} }
public static boolean alteremojipref() { public static boolean alteremojipref() {
return BooleanFalse("alteremoji"); return getBoolValue("alteremoji", false);
} }
public static boolean awayphp() { public static boolean awayphp() {
return BooleanTrue("awayphp"); return getBoolValue("awayphp", true);
} }
public static boolean VKUI_INJ() { public static boolean VKUI_INJ() {
return BooleanTrue("VKUI_INJ"); return getBoolValue("VKUI_INJ", true);
} }
public static boolean benchmark() { public static boolean benchmark() {
return BooleanFalse("benchmark"); return getBoolValue("benchmark", false);
} }
public static boolean calls() { public static boolean calls() {
return BooleanTrue("calls"); return getBoolValue("calls", true);
} }
public static boolean convUsersOnline() { public static boolean convUsersOnline() {
return BooleanFalse("convUsersOnline"); return getBoolValue("convUsersOnline", false);
} }
public static boolean darkmode() { public static boolean darkmode() {
return BooleanTrue("darkmode"); return getBoolValue("darkmode", true);
} }
public static boolean dev() { public static boolean dev() {
return BooleanFalse("dev"); return getBoolValue("dev", false);
} }
public static boolean devmenu() { public static boolean devmenu() {
return BooleanFalse("devmenu"); return getBoolValue("devmenu", false);
} }
public static boolean dnr() { public static boolean dnr() {
return BooleanTrue("dnr"); return getBoolValue("dnr", true);
} }
public static boolean dns() { public static boolean dns() {
return BooleanTrue("dns"); return getBoolValue("dns", true);
} }
public static boolean libverify() { public static boolean libverify() {
return BooleanFalse("libverify"); return getBoolValue("libverify", false);
} }
public static boolean dnt() { public static boolean dnt() {
return BooleanTrue("dnt"); return getBoolValue("dnt", true);
} }
public static boolean dockcounter() { public static boolean dockcounter() {
return BooleanTrue("dockcounter"); return getBoolValue("dockcounter", true);
} }
public static boolean feedcache() { public static boolean feedcache() {
return BooleanTrue("feedcache"); return getBoolValue("feedcache", true);
}
public static boolean CommentsSort() {
return getBoolValue("commentssorting", false);
} }
public static void forceOffline() { public static void forceOffline() {
@@ -157,119 +180,123 @@ public class Preferences {
} }
public static boolean fulltime() { public static boolean fulltime() {
return BooleanTrue("fulltime"); return getBoolValue("fulltime", true);
} }
public static boolean gcmfix() { public static boolean gcmfix() {
return BooleanTrue("gcmfix"); return getBoolValue("gcmfix", true);
} }
public static boolean hasMusicSubscription() { public static boolean hasMusicSubscription() {
return BooleanTrue("hasMusicSubscription"); return getBoolValue("hasMusicSubscription", true);
} }
public static boolean isEnableExternalOpening() { public static boolean isEnableExternalOpening() {
return BooleanFalse("isEnableExternalOpening"); return getBoolValue("isEnableExternalOpening", false);
} }
public static boolean iconvk() { public static boolean iconvk() {
return BooleanFalse("iconvk"); return getBoolValue("iconvk", false);
} }
public static boolean iconvkru() { public static boolean iconvkru() {
return BooleanFalse("iconvkru"); return getBoolValue("iconvkru", false);
} }
public static boolean isMusicRestricted() { public static boolean isMusicRestricted() {
return BooleanTrue("isMusicRestricted"); return getBoolValue("isMusicRestricted", true);
} }
public static boolean msgflat() { public static boolean msgflat() {
return BooleanFalse("msgflat"); return getBoolValue("msgflat", false);
} }
public static boolean msgtails() { public static boolean msgtails() {
return BooleanTrue("msgtails"); return getBoolValue("msgtails", true);
} }
public static boolean navbar() { public static boolean navbar() {
return BooleanTrue("navbar"); return getBoolValue("navbar", true);
} }
public static boolean newfeed() { public static boolean newfeed() {
return BooleanTrue("newfeed"); return getBoolValue("newfeed", true);
} }
public static boolean offline() { public static boolean offline() {
return BooleanTrue("offline"); return getBoolValue("offline", true);
} }
public static boolean oldabout() { public static boolean oldabout() {
return BooleanFalse("oldabout"); return getBoolValue("oldabout", false);
} }
public static boolean postsrecomm() { public static boolean postsrecomm() {
return BooleanTrue("postsrecomm"); return getBoolValue("postsrecomm", true);
} }
public static String readstatus() { public static String readstatus() {
return dnr() ? "messages.markAsRead" : "null"; return dnr() ? "messages.markAsRead" : "null";
} }
public static String copyrightfix() {
return copyright_post() ? "copyright" : "ads_easy_promote";
}
public static boolean refsfilter() { public static boolean refsfilter() {
return BooleanFalse("refsfilter"); return getBoolValue("refsfilter", false);
} }
public static boolean setoffline() { public static boolean setoffline() {
return BooleanFalse("setoffline"); return getBoolValue("setoffline", false);
} }
public static boolean shortinfo() { public static boolean shortinfo() {
return BooleanTrue("shortinfo"); return getBoolValue("shortinfo", true);
} }
public static boolean shortlinkfilter() { public static boolean shortlinkfilter() {
return BooleanFalse("shortlinkfilter"); return getBoolValue("shortlinkfilter", false);
} }
public static boolean shortpost() { public static boolean shortpost() {
return BooleanTrue("shortpost"); return getBoolValue("shortpost", true);
} }
public static boolean showmenu() { public static boolean showmenu() {
return BooleanFalse("showmenu"); return getBoolValue("showmenu", false);
} }
public static boolean ssl() { public static boolean ssl() {
return BooleanTrue("ssl"); return getBoolValue("ssl", true);
} }
public static boolean stories() { public static boolean stories() {
return BooleanTrue("stories"); return getBoolValue("stories", true);
} }
public static boolean swipe() { public static boolean swipe() {
return BooleanTrue("swipe"); return getBoolValue("swipe", true);
} }
public static boolean systememoji() { public static boolean systememoji() {
return BooleanFalse("systememoji"); return getBoolValue("systememoji", false);
} }
public static boolean unlockstats() { public static boolean unlockstats() {
return BooleanFalse("unlockstats"); return getBoolValue("unlockstats", false);
} }
public static boolean usevkui() { public static boolean usevkui() {
return BooleanTrue("usevkui"); return getBoolValue("usevkui", true);
} }
public static boolean vksans() { public static boolean vksans() {
return BooleanFalse("vksans"); return getBoolValue("vksans", false);
} }
public static boolean voice() { public static boolean voice() {
return BooleanTrue("voice"); return getBoolValue("voice", true);
} }
public static boolean newvideo() { public static boolean newvideo() {
@@ -277,40 +304,44 @@ public class Preferences {
} }
public static int getMsgCount() { public static int getMsgCount() {
String customvalue = getPreferences().getString("msgcount", ""); String customvalue = getPrefsValue("msgcount");
return customvalue.isEmpty() ? 30 : Integer.parseInt(customvalue); return customvalue.isEmpty() ? 30 : Integer.parseInt(customvalue);
} }
public static String MediacontentFix() { public static String MediacontentFix() {
return Build.VERSION.SDK_INT >= 29 ? "date_modified DESC" : "datetaken DESC"; return Build.VERSION.SDK_INT >= 29 ? "date_modified DESC" : "datetaken DESC";
} } // Fix photo picker for sdk 29+
public static String MediacontentFix2() { public static String MediacontentFix2() {
return Build.VERSION.SDK_INT >= 29 ? "date_modified" : "datetaken"; return Build.VERSION.SDK_INT >= 29 ? "date_modified" : "datetaken";
} } // Fix photo picker for sdk 29+
public static String MediacontentFix3() { public static String MediacontentFix3() {
return Build.VERSION.SDK_INT >= 29 ? ", date_modified=" : ", dateTaken="; return Build.VERSION.SDK_INT >= 29 ? ", date_modified=" : ", dateTaken=";
} } // Fix photo picker for sdk 29+
public static boolean color_grishka() { public static boolean color_grishka() {
return BooleanTrue("color_grishka"); return getBoolValue("color_grishka", true);
} }
public static boolean vkme_msg() { public static boolean vkme_msg() {
return BooleanFalse("vkme_msg"); return getBoolValue("vkme_msg", false);
} }
public static String VKVersion() { public static String VKVersion() {
String string = getPreferences().getString("vkversion", ""); return VKVER;
if (!string.isEmpty()) { }
return string;
} public static int VKVersionBuild() {
return "5.29"; return VKBUILD;
}
public static long VKVersionBuildLong() {
return VKVersionBuild();
} }
public static String getLocale() { public static String getLocale() {
String string = getPreferences().getString("lang_value", ""); String string = getPrefsValue("lang_value");
if (string.equals("system")) { if (string.equals("system")) {
return Locale.getDefault().getLanguage(); return Locale.getDefault().getLanguage();
} }
@@ -1,24 +1,23 @@
package ru.vtosters.lite.utils; package ru.vtosters.lite.utils;
import static ru.vtosters.lite.utils.Globals.*; import static java.lang.System.clearProperty;
import static ru.vtosters.lite.utils.Preferences.*; import static java.lang.System.getProperties;
import static ru.vtosters.lite.utils.Globals.getPrefsValue;
import static ru.vtosters.lite.utils.Preferences.getBoolValue;
import java.util.Properties; import java.util.Properties;
public class Proxy { public class Proxy {
public static String getOauthComAuth() { public static String getOauthComAuth() {
String oauthComHttps = getOauthComHttps(); return getOauthComHttps() + "/authorize";
return oauthComHttps + "/authorize";
} }
public static String getOauthComAuthClient() { public static String getOauthComAuthClient() {
String oauthComAuth = getOauthComAuth(); return getOauthComAuth() + "?client_id=";
return oauthComAuth + "?client_id=";
} }
public static String getOauthComBlank() { public static String getOauthComBlank() {
String oauthComHttps = getOauthComHttps(); return getOauthComHttps() + "/blank.html";
return oauthComHttps + "/blank.html";
} }
public static String getOauthComBlankRedirect() { public static String getOauthComBlankRedirect() {
@@ -30,8 +29,7 @@ public class Proxy {
} }
public static String getStaticComSupport() { public static String getStaticComSupport() {
String staticCom = getStaticCom(); return getStaticCom() + "/support";
return staticCom + "/support";
} }
public static String oauthFix() { public static String oauthFix() {
@@ -39,7 +37,7 @@ public class Proxy {
} }
public static String getApiCom() { public static String getApiCom() {
String string = getPreferences().getString("proxyapi", ""); String string = getPrefsValue("proxyapi");
if (!proxy() & string.isEmpty()) { if (!proxy() & string.isEmpty()) {
return "api.vk.com"; return "api.vk.com";
} }
@@ -47,7 +45,7 @@ public class Proxy {
} }
public static String getAwayPhpCom() { public static String getAwayPhpCom() {
String string = getPreferences().getString("proxyapi", ""); String string = getPrefsValue("proxyapi");
if (!proxy() & string.isEmpty()) { if (!proxy() & string.isEmpty()) {
return "m.vk.com"; return "m.vk.com";
} }
@@ -55,7 +53,7 @@ public class Proxy {
} }
public static String getOauthCom() { public static String getOauthCom() {
String string = getPreferences().getString("proxyoauth", ""); String string = getPrefsValue("proxyoauth");
if (!proxy() & string.isEmpty()) { if (!proxy() & string.isEmpty()) {
return "oauth.vk.com"; return "oauth.vk.com";
} }
@@ -63,7 +61,7 @@ public class Proxy {
} }
public static String getStaticCom() { public static String getStaticCom() {
String string = getPreferences().getString("proxystatic", ""); String string = getPrefsValue("proxystatic");
if (!proxy() & string.isEmpty()) { if (!proxy() & string.isEmpty()) {
return "static.vk.com"; return "static.vk.com";
} }
@@ -72,7 +70,7 @@ public class Proxy {
public static String staticFix(String str) { public static String staticFix(String str) {
String str2; String str2;
String string = getPreferences().getString("proxystatic", ""); String string = getPrefsValue("proxystatic");
if (!proxy() & string.isEmpty()) { if (!proxy() & string.isEmpty()) {
return str; return str;
} }
@@ -81,90 +79,136 @@ public class Proxy {
} }
public static void setProxy() { public static void setProxy() {
switch (getPreferences().getString("proxy", "")) { Properties properties = getProperties();
switch (getPrefsValue("proxy")) {
case "zaborona": case "zaborona":
Properties properties = System.getProperties();
properties.setProperty("socksProxyHost", "socks.zaboronahelp.pp.ua"); properties.setProperty("socksProxyHost", "socks.zaboronahelp.pp.ua");
properties.setProperty("socksProxyPort", "1488"); properties.setProperty("socksProxyPort", "1488");
System.clearProperty("https.proxyHost"); resetProxySocks();
System.clearProperty("https.proxyPort");
System.clearProperty("http.proxyHost");
System.clearProperty("http.proxyPort");
break; break;
case "socks": case "socks":
Properties properties2 = System.getProperties(); properties.setProperty("socksProxyHost", proxyHostSocks());
properties2.setProperty("socksProxyHost", proxyHostSocks()); properties.setProperty("socksProxyPort", proxyPortSocks());
properties2.setProperty("socksProxyPort", proxyPortSocks()); resetProxySocks();
System.clearProperty("https.proxyHost");
System.clearProperty("https.proxyPort");
System.clearProperty("http.proxyHost");
System.clearProperty("http.proxyPort");
break; break;
case "http": case "http":
Properties properties3 = System.getProperties(); properties.setProperty("http.proxyHost", proxyHostHTTP());
properties3.setProperty("http.proxyHost", proxyHostHTTP()); properties.setProperty("http.proxyPort", proxyPortHTTP());
properties3.setProperty("http.proxyPort", proxyPortHTTP()); properties.setProperty("http.proxyUser", proxyUserHTTP());
System.clearProperty("socksProxyHost"); properties.setProperty("http.proxyPassword", proxyPassHTTP());
System.clearProperty("socksPortHost"); resetProxyHttp();
System.clearProperty("https.proxyHost");
System.clearProperty("https.proxyPort");
break; break;
case "https": case "https":
Properties properties4 = System.getProperties(); properties.setProperty("https.proxyHost", proxyHostHTTPS());
properties4.setProperty("https.proxyHost", proxyHostHTTPS()); properties.setProperty("https.proxyPort", proxyPortHTTPS());
properties4.setProperty("https.proxyPort", proxyPortHTTPS()); properties.setProperty("https.proxyUser", proxyUserHTTPS());
System.clearProperty("socksProxyHost"); properties.setProperty("https.proxyPassword", proxyPassHTTPS());
System.clearProperty("socksPortHost"); resetProxyHttps();
System.clearProperty("http.proxyHost");
System.clearProperty("http.proxyPort");
break; break;
default: default:
System.clearProperty("socksProxyHost"); resetProxy();
System.clearProperty("socksPortHost");
System.clearProperty("https.proxyHost");
System.clearProperty("https.proxyPort");
System.clearProperty("http.proxyHost");
System.clearProperty("http.proxyPort");
break; break;
} }
} }
public static void resetProxy() {
clearProperty("https.proxyHost");
clearProperty("https.proxyPort");
clearProperty("https.proxyUser");
clearProperty("https.proxyPassword");
clearProperty("http.proxyHost");
clearProperty("http.proxyPort");
clearProperty("http.proxyUser");
clearProperty("http.proxyPassword");
clearProperty("socksProxyHost");
clearProperty("socksPortHost");
} // Reset all proxies
public static void resetProxySocks() {
clearProperty("https.proxyHost");
clearProperty("https.proxyPort");
clearProperty("https.proxyUser");
clearProperty("https.proxyPassword");
clearProperty("http.proxyHost");
clearProperty("http.proxyPort");
clearProperty("http.proxyUser");
clearProperty("http.proxyPassword");
} // Reset all except socks
public static void resetProxyHttp() {
clearProperty("https.proxyHost");
clearProperty("https.proxyPort");
clearProperty("https.proxyUser");
clearProperty("https.proxyPassword");
clearProperty("socksProxyHost");
clearProperty("socksPortHost");
} // Reset all except http
public static void resetProxyHttps() {
clearProperty("http.proxyHost");
clearProperty("http.proxyPort");
clearProperty("http.proxyUser");
clearProperty("http.proxyPassword");
clearProperty("socksProxyHost");
clearProperty("socksPortHost");
} // Reset all except https
public static String proxyHostHTTP() { public static String proxyHostHTTP() {
String string = getPreferences().getString("proxyHostHTTP", ""); String string = getPrefsValue("proxyHostHTTP");
return string.isEmpty() ? "192.168.0.1" : string; return string.isEmpty() ? "192.168.0.1" : string;
} }
public static String proxyHostHTTPS() { public static String proxyHostHTTPS() {
String string = getPreferences().getString("proxyHostHTTPS", ""); String string = getPrefsValue("proxyHostHTTPS");
return string.isEmpty() ? "192.168.0.1" : string; return string.isEmpty() ? "192.168.0.1" : string;
} }
public static String proxyHostSocks() { public static String proxyHostSocks() {
String string = getPreferences().getString("proxyHostSocks", ""); String string = getPrefsValue("proxyHostSocks");
return string.isEmpty() ? "192.168.0.1" : string; return string.isEmpty() ? "192.168.0.1" : string;
} }
public static String proxyPortHTTP() { public static String proxyPortHTTP() {
String string = getPreferences().getString("proxyPortHTTP", ""); String string = getPrefsValue("proxyPortHTTP");
return string.isEmpty() ? "8888" : string; return string.isEmpty() ? "8888" : string;
} }
public static String proxyPortHTTPS() { public static String proxyPortHTTPS() {
String string = getPreferences().getString("proxyPortHTTPS", ""); String string = getPrefsValue("proxyPortHTTPS");
return string.isEmpty() ? "8888" : string; return string.isEmpty() ? "8888" : string;
} }
public static String proxyPortSocks() { public static String proxyPortSocks() {
String string = getPreferences().getString("proxyPortSocks", ""); String string = getPrefsValue("proxyPortSocks");
return string.isEmpty() ? "8888" : string; return string.isEmpty() ? "8888" : string;
} }
public static boolean proxy() { public static String proxyUserHTTP() {
return getPreferences().getString("proxy", "").equals("apiproxy"); String string = getPrefsValue("proxyUserHTTP");
return string.isEmpty() ? "" : string;
} }
// Official vk proxy enforcer public static String proxyUserHTTPS() {
public static boolean proxyvk() { String string = getPrefsValue("proxyUserHTTPS");
return BooleanFalse("proxyvk"); return string.isEmpty() ? "" : string;
} }
public static String proxyPassHTTP() {
String string = getPrefsValue("proxyPassHTTP");
return string.isEmpty() ? "" : string;
}
public static String proxyPassHTTPS() {
String string = getPrefsValue("proxyPassHTTPS");
return string.isEmpty() ? "" : string;
}
public static boolean proxy() {
return getPrefsValue("proxy").equals("apiproxy");
}
public static boolean proxyvk() {
return getBoolValue("proxyvk", false);
} // Official vk proxy enforcer
} }
@@ -1,9 +1,13 @@
package ru.vtosters.lite.utils; package ru.vtosters.lite.utils;
import static ru.vtosters.lite.utils.About.*; import static ru.vtosters.lite.utils.About.getBuildNumber;
import static ru.vtosters.lite.utils.Globals.*; import static ru.vtosters.lite.utils.Globals.getPrefsValue;
import static ru.vtosters.lite.utils.Preferences.*; import static ru.vtosters.lite.utils.Globals.getUserSecret;
import static ru.vtosters.lite.utils.Proxy.*; import static ru.vtosters.lite.utils.Globals.getUserToken;
import static ru.vtosters.lite.utils.Preferences.dev;
import static ru.vtosters.lite.utils.Preferences.getLocale;
import static ru.vtosters.lite.utils.Preferences.vksans;
import static ru.vtosters.lite.utils.Proxy.proxy;
import com.vk.core.ui.themes.VKThemeHelper; import com.vk.core.ui.themes.VKThemeHelper;
@@ -13,7 +17,7 @@ public class SSFS {
} }
public static String SSFSDomain() { public static String SSFSDomain() {
String string = getPreferences().getString("ssfscustom", ""); String string = getPrefsValue("ssfscustom");
if (!string.isEmpty()) { if (!string.isEmpty()) {
return string; return string;
} }
@@ -25,8 +29,7 @@ public class SSFS {
} }
public static String getAmoledVKUI() { public static String getAmoledVKUI() {
String string = getPreferences().getString("darktheme", ""); return getPrefsValue("darktheme").equals("amoled") ? "1" : "0";
return string.equals("amoled") ? "1" : "0";
} }
public static String getUserProxy() { public static String getUserProxy() {
@@ -8,7 +8,6 @@ import static android.widget.Toast.makeText;
import static ru.vtosters.lite.utils.Globals.getContext; import static ru.vtosters.lite.utils.Globals.getContext;
import android.content.Context; import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.util.Base64; import android.util.Base64;
@@ -32,7 +31,7 @@ public class SettBackup {
public static void backupSettings() { public static void backupSettings() {
SimpleDateFormat date = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()); SimpleDateFormat date = new SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault());
String currentDateandTime = date.format(new Date()); String currentDateandTime = date.format(new Date());
var directory = getExternalStoragePublicDirectory(DIRECTORY_DOWNLOADS) + "/VTLBackup_" + currentDateandTime + ".txt"; var directory = getExternalStoragePublicDirectory(DIRECTORY_DOWNLOADS + "/VTLBackups/") + "/Backup_" + currentDateandTime + ".txt";
var file = new File(directory); var file = new File(directory);
try { try {
var exists = file.createNewFile(); var exists = file.createNewFile();
@@ -63,9 +62,7 @@ public class SettBackup {
} }
public static void restoreBackup() { public static void restoreBackup() {
Intent intent = new Intent(); File dir = new File(getExternalStoragePublicDirectory(DIRECTORY_DOWNLOADS + "/VTLBackups/").getPath());;
intent.setAction(Intent.ACTION_GET_CONTENT); // TODO Make restore backup from file list
intent.setType("text/plain");
getContext().startActivity(intent);
} }
} }
@@ -1,112 +1,152 @@
package ru.vtosters.lite.utils; package ru.vtosters.lite.utils;
import static ru.vtosters.lite.utils.Globals.*; import static android.view.View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR;
import static ru.vtosters.lite.utils.Preferences.*; import static ru.vtosters.lite.utils.Globals.getContext;
import static ru.vtosters.lite.utils.Globals.getPrefsValue;
import static ru.vtosters.lite.utils.Preferences.color_grishka;
import static ru.vtosters.lite.utils.Preferences.isBGStickersEnabled;
import static ru.vtosters.lite.utils.Preferences.navbar;
import static ru.vtosters.lite.utils.Preferences.systemtheme;
import static ru.vtosters.lite.utils.Preferences.vksans;
import android.content.Context; import android.content.Context;
import android.content.res.ColorStateList; import android.content.res.ColorStateList;
import android.content.res.Configuration;
import android.graphics.Color;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Build; import android.os.Build;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Window; import android.view.Window;
import android.widget.ImageButton; import android.widget.ImageButton;
import androidx.core.graphics.ColorUtils;
import com.vk.core.d.RecoloredDrawable; import com.vk.core.d.RecoloredDrawable;
import com.vk.core.ui.themes.VKTheme; import com.vk.core.ui.themes.VKTheme;
import com.vk.core.ui.themes.VKThemeHelper; import com.vk.core.ui.themes.VKThemeHelper;
import com.vk.im.ui.themes.ImTheme; import com.vk.im.ui.themes.ImTheme;
import com.vk.im.ui.themes.ImThemeHelper;
import com.vtosters.lite.R; import com.vtosters.lite.R;
import java.util.Arrays;
import java.util.List;
public class Themes { public class Themes {
public static List<String> accentColors = Arrays.asList(
"71AAEB", "3F8AE0", "528BCC", "4986CC", "5181B8", "74A2D6", "518BCC"
);
public static void applyTheme(VKTheme theme, ImTheme imtheme) {
VKThemeHelper.b.a(theme); // VKThemeHelper.b.a(VKTheme value) VK Theme apply
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 int getAccentColor() { public static int getAccentColor() {
return VKThemeHelper.a(R.attr.accent); return VKThemeHelper.a(R.attr.accent);
} } // Color accent
public static int getTextAttr() { public static int getTextAttr() {
return VKThemeHelper.a(R.attr.text_primary); return VKThemeHelper.a(R.attr.text_primary);
} } // Text Primary color
public static int getSTextAttr() { public static int getSTextAttr() {
return VKThemeHelper.a(R.attr.text_secondary); return VKThemeHelper.a(R.attr.text_secondary);
} } // Text Secondary color
public static int getTabbarBackground() { public static int getTabbarBackground() {
return VKThemeHelper.a(R.attr.tabbar_background); return VKThemeHelper.a(R.attr.tabbar_background);
} } // Tabbar/Navbar background
public static int getBackgroundContent() {
return VKThemeHelper.a(R.attr.background_content);
} // Background color in app
public static int getHeaderBackground() { public static int getHeaderBackground() {
return VKThemeHelper.a(R.attr.header_background); return VKThemeHelper.a(R.attr.header_background);
} } // Toolbar/Header background
public static int getAmoledTheme() {
return getContext().getResources().getIdentifier("BaseAmoledStyle", "style", getContext().getPackageName());
}
public static int picFix() {
return getContext().getResources().getIdentifier("ActionBarThemeFix", "style", getContext().getPackageName());
}
public static int getAmoledImTheme() {
return getContext().getResources().getIdentifier("VkIm.Theme.VkApp.Amoled", "style", getContext().getPackageName());
}
public static VKTheme getDarkTheme() {
String string = getPreferences().getString("darktheme", "");
if (string.isEmpty()) {
return VKTheme.DARK;
}
if (string.equals("amoled")) {
return VKTheme.AMOLED;
}
return VKTheme.DARK;
}
public static ImTheme getImDarkTheme() {
String string = getPreferences().getString("darktheme", "");
if (string.isEmpty()) {
return ImTheme.VKAPP_DARK;
}
if (string.equals("amoled")) {
return ImTheme.VKAPP_AMOLED;
}
return ImTheme.VKAPP_DARK;
}
public static VKTheme getLightTheme() {
String string = getPreferences().getString("lighttheme", "");
if (string.isEmpty()) {
return VKTheme.DEFAULT_LIGHT;
}
return VKTheme.DEFAULT_LIGHT;
}
public static ImTheme getImLightTheme() {
String string = getPreferences().getString("lighttheme", "");
if (string.isEmpty()) {
return ImTheme.VKAPP_LIGHT;
}
return ImTheme.VKAPP_LIGHT;
}
public static int getColorFromAttr(int attr) {
return VKThemeHelper.a(attr);
}
public static int getHeaderText() { public static int getHeaderText() {
return VKThemeHelper.a(R.attr.header_text); return VKThemeHelper.a(R.attr.header_text);
} // Header/Toolbar color text
public static int getAmoledTheme() {
return getContext().getResources().getIdentifier("BaseAmoledStyle", "style", getContext().getPackageName());
} // Get Amoled theme id
public static int picFix() {
return getContext().getResources().getIdentifier("ActionBarThemeFix", "style", getContext().getPackageName());
} // Fix tabbar color in photo viewer
public static int getAmoledImTheme() {
return getContext().getResources().getIdentifier("VkIm.Theme.VkApp.Amoled", "style", getContext().getPackageName());
} // Get Amoled theme id for messages
public static int getAttrId(String attr) {
return getContext().getResources().getIdentifier(attr, "attr", getContext().getPackageName());
} }
public static boolean isAndroidMonet() { public static void setBarTheme(View getview) {
if (color_grishka()) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
return Build.VERSION.SDK_INT >= 31; getview.setSystemUiVisibility(getNeededColorNavbar() | getNeededColorStatusbar());
} else {
return false;
} }
} // Set white/dark statusbar/navbar icons
public static int getNeededColorStatusbar() {
return VKThemeHelper.d() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S ? 8192 : 0;
}
public static int getNeededColorNavbar() {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O ? VKThemeHelper.d() ? SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR : 0 : 0;
}
public static int getNeededColorStatusbarFix() {
return VKThemeHelper.d() ? 8192 : 0;
}
public static VKTheme getDarkTheme() {
switch (getPrefsValue("darktheme")) {
case "amoled":
return VKTheme.AMOLED;
default:
return VKTheme.DARK;
}
} // Return needed theme for theme changer
public static ImTheme getImDarkTheme() {
switch (getPrefsValue("darktheme")) {
case "amoled":
return ImTheme.VKAPP_AMOLED;
default:
return ImTheme.VKAPP_DARK;
}
} // Return needed theme for theme changer
public static VKTheme getLightTheme() {
switch (getPrefsValue("lighttheme")) {
default:
return VKTheme.DEFAULT_LIGHT;
}
} // Return needed theme for theme changer
public static ImTheme getImLightTheme() {
switch (getPrefsValue("lighttheme")) {
default:
return ImTheme.VKAPP_LIGHT;
}
} // Return needed theme for theme changer
public static int getColorFromAttr(int attr) {
return VKThemeHelper.a(attr);
} // Get needed attr color
public static boolean isAndroidMonet() {
return color_grishka() && Build.VERSION.SDK_INT >= 31;
} }
public static boolean isColorRefAccented(int i) { 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.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; return i == R.color.cornflower_blue || i == R.color.cornflower_blue_two || i == R.color.dot_unread || 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;
} } // Accent colors
public static void themeMonetToolbar(ImageButton imageButton, Toolbar toolbar) { public static void themeMonetToolbar(ImageButton imageButton, Toolbar toolbar) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
@@ -120,20 +160,69 @@ public class Themes {
return null; return null;
} }
return new RecoloredDrawable(drawable, getAccentColor()); return new RecoloredDrawable(drawable, getAccentColor());
} } // Recolor drawable to accent color
public static Drawable recolorDrawableToolbar(Drawable drawable) { public static Drawable recolorDrawableToolbar(Drawable drawable) {
if (drawable == null) { if (drawable == null) {
return null; return null;
} }
return new RecoloredDrawable(drawable, getHeaderText()); return new RecoloredDrawable(drawable, getHeaderText());
} } // Recolor toolbar drawable to accent color
public static ColorStateList recolorCSL(ColorStateList colorStateList) { public static ColorStateList recolorCSL(ColorStateList colorStateList) {
if (colorStateList == null) { if (colorStateList == null) {
return null; return null;
} }
return ColorStateList.valueOf(getAccentColor()); return ColorStateList.valueOf(getAccentColor());
} // Recolor ColorStateList to accent color
public static ColorStateList themeCSL(ColorStateList csl) {
int color = csl.getDefaultColor();
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);
boolean isUnselAccent = isAccentedColor(unsel);
boolean isSelAccent = isAccentedColor(sel);
if (isUnselAccent || isSelAccent) {
return new ColorStateList(new int[][] {
new int[]{android.R.attr.state_selected}, new int[]{-android.R.attr.state_selected}
}, new int[] {isSelAccent ? getAccentColor() : sel, isUnselAccent ? getAccentColor() : unsel});
}
return csl;
} catch (Exception e) {
e.printStackTrace();
return null;
}
} // Recolor ColorStateList
public static int darken(int color, float by) {
float[] hsl = new float[3];
ColorUtils.colorToHSL(color, hsl);
hsl[2] -= by;
hsl[2] = Math.max(0f, Math.min(hsl[2], 1f));
return ColorUtils.HSLToColor(hsl);
}
public static int lighten(int color, float factor) {
int red = (int) ((Color.red(color) * (1 - factor) / 255 + factor) * 255);
int green = (int) ((Color.green(color) * (1 - factor) / 255 + factor) * 255);
int blue = (int) ((Color.blue(color) * (1 - factor) / 255 + factor) * 255);
return Color.argb(Color.alpha(color), red, green, blue);
}
public static int halfAlpha(int src) {
return ColorUtils.setAlphaComponent(src, 169);
}
public static boolean isAccentedColor(ColorStateList target) {
return target != null && isAccentedColor(target.getDefaultColor());
}
public static boolean isAccentedColor(int target) {
return accentColors.contains(hex(target).toUpperCase());
} }
public static int getColor(Context context, int i) { public static int getColor(Context context, int i) {
@@ -144,24 +233,26 @@ public class Themes {
return context.getColor(i); return context.getColor(i);
} }
return context.getResources().getColor(i); return context.getResources().getColor(i);
} } // Android Support color injector + accent color checker
public static int getColor2(int i) { public static int getColor2(int i) {
if (isColorRefAccented(i) && isAndroidMonet()) { if (isColorRefAccented(i) && isAndroidMonet()) {
return getAccentColor(); return getAccentColor();
} }
return getContext().getResources().getColor(i); return getContext().getResources().getColor(i);
} } // Android Support color injector + accent color checker
public static void setNavbarColor(Window window, int i) { public static void setNavbarColor(Window window, int i) {
if (navbar() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (navbar() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
window.setNavigationBarColor(getNavbarColor()); window.setNavigationBarColor(getTabbarBackground());
window.getDecorView().setSystemUiVisibility(getNeededColorNavbar());
} }
} }
public static String hex(int i) { public static String hex(int i) {
return String.format("#%06X", Integer.valueOf(i & 16777215)); return String.format("#%06X", Integer.valueOf(i & 16777215));
} } // Get color as hex string
public static int vk_sans_display_demibold() { public static int vk_sans_display_demibold() {
return vksans() ? R.font.vk_sans_display_demibold : R.font.tt_commons_demi_bold; return vksans() ? R.font.vk_sans_display_demibold : R.font.tt_commons_demi_bold;
} }
@@ -190,14 +281,27 @@ public class Themes {
return vksans() ? R.font.vk_sans_text_regular : R.font.roboto_regular; return vksans() ? R.font.vk_sans_text_regular : R.font.roboto_regular;
} }
public static int getNavbarColor() {
return VKThemeHelper.a(R.attr.tabbar_background);
}
public static String getBackgroundStickers() { public static String getBackgroundStickers() {
if (isBGStickersEnabled()) { if (isBGStickersEnabled()) {
return "images_with_background"; return "images_with_background";
} }
return "images"; return "images";
} }
public static void systemThemeChanger() {
if (!systemtheme())
return;
int currentNightMode = getContext().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:
applyTheme(getLightTheme(), getImLightTheme());
break;
case Configuration.UI_MODE_NIGHT_YES:
applyTheme(getDarkTheme(), getImDarkTheme());
break;
}
}
} }
@@ -1,7 +1,8 @@
package ru.vtosters.lite.utils; package ru.vtosters.lite.utils;
import static ru.vtosters.lite.utils.Globals.getContext; import static ru.vtosters.lite.utils.Globals.getContext;
import static ru.vtosters.lite.utils.Globals.getPreferences; import static ru.vtosters.lite.utils.Globals.getPrefsValue;
import static ru.vtosters.lite.utils.Preferences.getBoolValue;
import static ru.vtosters.lite.utils.Themes.getColorFromAttr; import static ru.vtosters.lite.utils.Themes.getColorFromAttr;
import static ru.vtosters.lite.utils.Themes.hex; import static ru.vtosters.lite.utils.Themes.hex;
@@ -66,8 +67,8 @@ public class VKUIInjector {
} }
public static void inject(WebView webView) { public static void inject(WebView webView) {
String string = getPreferences().getString("darktheme", ""); String string = getPrefsValue("darktheme");
if (Preferences.BooleanTrue("VKUI_INJ")) { if (getBoolValue("VKUI_INJ", true)) {
if (!isLoaded) { if (!isLoaded) {
load(); load();
} }
+1 -1
View File
@@ -1,3 +1,3 @@
<resources> <resources>
<string name="app_name">Vtoasters Shit</string> <string name="app_name">VTosters Lite</string>
</resources> </resources>
+1 -1
View File
@@ -5,7 +5,7 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.2.0-rc01' classpath 'com.android.tools.build:gradle:7.2.1'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
+1 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ripple android:color="@color/picker_blue_pressed" <ripple android:color="?accent"
xmlns:android="http://schemas.android.com/apk/res/android"> xmlns:android="http://schemas.android.com/apk/res/android">
<item> <item>
<shape android:shape="rectangle"> <shape android:shape="rectangle">
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ripple android:color="@color/picker_blue_pressed" <ripple android:color="?accent"
xmlns:android="http://schemas.android.com/apk/res/android"> xmlns:android="http://schemas.android.com/apk/res/android">
<item> <item>
<selector> <selector>
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<ripple android:color="@color/picker_blue_pressed" <ripple android:color="?accent"
xmlns:android="http://schemas.android.com/apk/res/android"> xmlns:android="http://schemas.android.com/apk/res/android">
<item> <item>
<shape android:shape="rectangle"> <shape android:shape="rectangle">
@@ -4,7 +4,7 @@
<ripple android:color="@color/overlay"> <ripple android:color="@color/overlay">
<item> <item>
<shape> <shape>
<solid android:color="?header_text" /> <solid android:color="?header_background" />
<corners android:radius="@dimen/vkui_button_corner_big_radius" /> <corners android:radius="@dimen/vkui_button_corner_big_radius" />
</shape> </shape>
</item> </item>
@@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<shape> <shape>
<solid android:color="?header_text" /> <solid android:color="?header_background" />
<corners android:radius="@dimen/vkui_button_corner_big_radius" /> <corners android:radius="@dimen/vkui_button_corner_big_radius" />
</shape> </shape>
</item> </item>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"> <shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient <gradient
android:startColor="#fff8f8f8" android:startColor="?background_content"
android:endColor="#ffffffff" android:endColor="?background_content"
android:angle="90.0" /> android:angle="90.0" />
</shape> </shape>
+1 -1
View File
@@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"> <item android:state_pressed="true">
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<solid android:color="@color/picker_blue_pressed" /> <solid android:color="?accent" />
</shape> </shape>
</item> </item>
<item> <item>
@@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"> <item android:state_pressed="true">
<shape android:shape="oval"> <shape android:shape="oval">
<solid android:color="@color/picker_blue_pressed" /> <solid android:color="?accent" />
</shape> </shape>
</item> </item>
<item> <item>
+1 -1
View File
@@ -3,7 +3,7 @@
<item android:state_pressed="true"> <item android:state_pressed="true">
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<corners android:radius="10000.0dip" /> <corners android:radius="10000.0dip" />
<solid android:color="@color/picker_blue_pressed" /> <solid android:color="?accent" />
</shape> </shape>
</item> </item>
<item> <item>
@@ -5,5 +5,5 @@
android:topRightRadius="12.0dip" android:topRightRadius="12.0dip"
android:bottomLeftRadius="12.0dip" android:bottomLeftRadius="12.0dip"
android:bottomRightRadius="12.0dip" /> android:bottomRightRadius="12.0dip" />
<solid android:color="@color/blue_300" /> <solid android:color="?accent" />
</shape> </shape>
+1 -1
View File
@@ -7,7 +7,7 @@
<solid android:color="@android:color/transparent" /> <solid android:color="@android:color/transparent" />
<stroke <stroke
android:width="0.5dip" android:width="0.5dip"
android:color="@color/blue_300" /> android:color="?accent" />
<padding <padding
android:left="0.0dip" android:left="0.0dip"
android:top="0.0dip" android:top="0.0dip"
@@ -2,7 +2,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false"> <item android:state_enabled="false">
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<solid android:color="@color/blue_200_muted" /> <solid android:color="?accent" />
</shape> </shape>
</item> </item>
<item android:state_pressed="true"> <item android:state_pressed="true">
@@ -12,7 +12,7 @@
</item> </item>
<item> <item>
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<solid android:color="@color/blue_300" /> <solid android:color="?accent" />
</shape> </shape>
</item> </item>
</selector> </selector>
+1 -1
View File
@@ -14,7 +14,7 @@
</item> </item>
<item> <item>
<shape> <shape>
<solid android:color="?header_text" /> <solid android:color="?header_background" />
<corners android:radius="@dimen/vkui_button_corner_big_radius" /> <corners android:radius="@dimen/vkui_button_corner_big_radius" />
</shape> </shape>
</item> </item>
@@ -41,7 +41,7 @@
android:layout_height="48.0dip" android:layout_height="48.0dip"
app:tabBackground="@drawable/music_tab_bg" app:tabBackground="@drawable/music_tab_bg"
app:tabGravity="center" app:tabGravity="center"
app:tabIndicatorColor="@color/white" /> app:tabIndicatorColor="?header_tab_active_indicator" />
</android.support.design.widget.AppBarLayout> </android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager <android.support.v4.view.ViewPager
+5 -5
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:background="#fffafbfc" <FrameLayout android:background="?tabbar_background"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
@@ -27,7 +27,7 @@
<com.vk.im.ui.views.span.SpanPressableTextView <com.vk.im.ui.views.span.SpanPressableTextView
android:textSize="14.0sp" android:textSize="14.0sp"
android:textColor="#ff71757a" android:textColor="?text_primary"
android:ellipsize="end" android:ellipsize="end"
android:gravity="center_vertical" android:gravity="center_vertical"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
@@ -56,13 +56,13 @@
android:layout_height="48.0dip" android:layout_height="48.0dip"
android:src="@drawable/ic_cancel_24" android:src="@drawable/ic_cancel_24"
android:scaleType="centerInside" android:scaleType="centerInside"
android:tint="@color/light_gray" android:tint="?text_primary"
android:contentDescription="@null" /> android:contentDescription="@null" />
</LinearLayout> </LinearLayout>
<TextView <TextView
android:textSize="14.0sp" android:textSize="14.0sp"
android:textColor="#ff71757a" android:textColor="?text_primary"
android:ellipsize="end" android:ellipsize="end"
android:layout_gravity="start|center" android:layout_gravity="start|center"
android:id="@id/loading" android:id="@id/loading"
@@ -77,7 +77,7 @@
<TextView <TextView
android:textSize="14.0sp" android:textSize="14.0sp"
android:textColor="#ff71757a" android:textColor="?text_primary"
android:ellipsize="end" android:ellipsize="end"
android:layout_gravity="start|center" android:layout_gravity="start|center"
android:id="@id/error" android:id="@id/error"
@@ -9,7 +9,7 @@
<FrameLayout <FrameLayout
android:id="@id/appkit_loader_content" android:id="@id/appkit_loader_content"
android:background="#ffffffff" android:background="?background_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent"> android:layout_height="fill_parent">
-1
View File
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center" <LinearLayout android:gravity="center"
android:orientation="vertical" android:orientation="vertical"
android:background="?background_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"> xmlns:android="http://schemas.android.com/apk/res/android">
+1
View File
@@ -6,6 +6,7 @@
<LinearLayout <LinearLayout
android:gravity="center" android:gravity="center"
android:background="?background_content"
android:layout_gravity="center" android:layout_gravity="center"
android:orientation="vertical" android:orientation="vertical"
android:padding="16.0dip" android:padding="16.0dip"
+1
View File
@@ -14,6 +14,7 @@
android:orientation="horizontal" android:orientation="horizontal"
android:id="@id/load_more_error" android:id="@id/load_more_error"
android:padding="16.0dip" android:padding="16.0dip"
android:background="?background_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="76.0dip"> android:layout_height="76.0dip">
+1
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_width="fill_parent" <FrameLayout android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:background="?background_content"
xmlns:android="http://schemas.android.com/apk/res/android"> xmlns:android="http://schemas.android.com/apk/res/android">
<ProgressBar <ProgressBar
+1 -1
View File
@@ -42,7 +42,7 @@
android:layout_width="16.0dip" android:layout_width="16.0dip"
android:layout_height="16.0dip" android:layout_height="16.0dip"
android:src="@drawable/ic_favorite_16" android:src="@drawable/ic_favorite_16"
android:tint="@color/blue_200_muted" android:tint="?accent"
android:layout_marginEnd="4.0dip" android:layout_marginEnd="4.0dip"
app:layout_constraintBottom_toBottomOf="@id/game_title" app:layout_constraintBottom_toBottomOf="@id/game_title"
app:layout_constraintEnd_toStartOf="@id/game_menu" app:layout_constraintEnd_toStartOf="@id/game_menu"
@@ -24,7 +24,7 @@
android:layout_height="238.0dip" android:layout_height="238.0dip"
app:contentScrim="?text_primary" app:contentScrim="?text_primary"
app:layout_scrollFlags="exitUntilCollapsed|scroll" app:layout_scrollFlags="exitUntilCollapsed|scroll"
app:statusBarScrim="?tabbar_background" app:statusBarScrim="?header_background"
app:titleEnabled="false"> app:titleEnabled="false">
<LinearLayout <LinearLayout
+2 -2
View File
@@ -117,12 +117,12 @@
android:layout_width="16.0dip" android:layout_width="16.0dip"
android:layout_height="16.0dip" android:layout_height="16.0dip"
android:src="@drawable/ic_longreads_black_16" android:src="@drawable/ic_longreads_black_16"
android:tint="@color/black" /> android:tint="?header_text" />
<TextView <TextView
android:textSize="12.0sp" android:textSize="12.0sp"
android:textStyle="normal" android:textStyle="normal"
android:textColor="@color/black" android:textColor="?header_text"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
+2 -2
View File
@@ -100,12 +100,12 @@
android:layout_width="16.0dip" android:layout_width="16.0dip"
android:layout_height="16.0dip" android:layout_height="16.0dip"
android:src="@drawable/ic_longreads_black_16" android:src="@drawable/ic_longreads_black_16"
android:tint="@color/black" /> android:tint="?header_text" />
<TextView <TextView
android:textSize="12.0sp" android:textSize="12.0sp"
android:textStyle="normal" android:textStyle="normal"
android:textColor="@color/black" android:textColor="?header_text"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -72,12 +72,12 @@
android:layout_width="16.0dip" android:layout_width="16.0dip"
android:layout_height="16.0dip" android:layout_height="16.0dip"
android:src="@drawable/ic_longreads_black_16" android:src="@drawable/ic_longreads_black_16"
android:tint="@color/black" /> android:tint="?header_text" />
<TextView <TextView
android:textSize="12.0sp" android:textSize="12.0sp"
android:textStyle="normal" android:textStyle="normal"
android:textColor="@color/black" android:textColor="?header_text"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
+1 -1
View File
@@ -10,7 +10,7 @@
<android.support.design.widget.CoordinatorLayout <android.support.design.widget.CoordinatorLayout
android:id="@id/appkit_loader_content" android:id="@id/appkit_loader_content"
android:background="#ffffffff" android:background="?background_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent"> android:layout_height="fill_parent">
+1 -1
View File
@@ -6,7 +6,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<android.support.design.widget.AppBarLayout <android.support.design.widget.AppBarLayout
android:background="?header_alternate_background" android:background="?background_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="?actionBarSize" android:layout_height="?actionBarSize"
style="@style/VKAppBar"> style="@style/VKAppBar">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<com.vk.sharing.view.SharingActionsView android:orientation="horizontal" <com.vk.sharing.view.SharingActionsView android:orientation="horizontal"
android:id="@id/sharing_actions_container" android:id="@id/sharing_actions_container"
android:background="@color/pale_grey" android:background="?tabbar_background"
android:paddingLeft="4.0dip" android:paddingLeft="4.0dip"
android:paddingTop="8.0dip" android:paddingTop="8.0dip"
android:paddingRight="4.0dip" android:paddingRight="4.0dip"
+1 -1
View File
@@ -55,7 +55,7 @@
<TextView <TextView
android:textSize="17.0dip" android:textSize="17.0dip"
android:textColor="?text_primary" android:textColor="?header_text"
android:ellipsize="end" android:ellipsize="end"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:id="@id/playlist_title" android:id="@id/playlist_title"
+1 -1
View File
@@ -21,7 +21,7 @@
<TextView <TextView
android:textSize="14.0dip" android:textSize="14.0dip"
android:textStyle="normal" android:textStyle="normal"
android:textColor="?text_primary" android:textColor="?header_text"
android:ellipsize="end" android:ellipsize="end"
android:gravity="center_vertical" android:gravity="center_vertical"
android:id="@id/playlist_title" android:id="@id/playlist_title"
@@ -36,7 +36,7 @@
<TextView <TextView
android:textSize="17.0dip" android:textSize="17.0dip"
android:textColor="?text_primary" android:textColor="?header_text"
android:ellipsize="end" android:ellipsize="end"
android:id="@id/playlist_title" android:id="@id/playlist_title"
android:layout_width="0.0dip" android:layout_width="0.0dip"
+1 -1
View File
@@ -45,7 +45,7 @@
android:minHeight="48.0dip" android:minHeight="48.0dip"
app:tabBackground="@drawable/music_tab_bg" app:tabBackground="@drawable/music_tab_bg"
app:tabGravity="fill" app:tabGravity="fill"
app:tabIndicatorColor="@color/white" app:tabIndicatorColor="?header_tab_active_indicator"
app:tabMaxWidth="0.0dip" app:tabMaxWidth="0.0dip"
app:tabMode="fixed" /> app:tabMode="fixed" />
</android.support.design.widget.AppBarLayout> </android.support.design.widget.AppBarLayout>
@@ -9,7 +9,7 @@
<FrameLayout <FrameLayout
android:id="@id/appkit_loader_content" android:id="@id/appkit_loader_content"
android:background="#ffffffff" android:background="?background_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent"> android:layout_height="fill_parent">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="horizontal" <LinearLayout android:orientation="horizontal"
android:id="@id/picker_attach_gallery_camera_layout" android:id="@id/picker_attach_gallery_camera_layout"
android:background="?tabbar_background" android:background="#ffffffff"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="56.0dip" android:layout_height="56.0dip"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
+4 -2
View File
@@ -3,11 +3,13 @@
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<ScrollView <ScrollView
android:background="?background_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:fillViewport="true"> android:fillViewport="true">
<com.vtosters.lite.ui.ConstrainedLinearLayout <com.vtosters.lite.ui.ConstrainedLinearLayout
android:background="?background_content"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:layout_gravity="center_horizontal" android:layout_gravity="center_horizontal"
android:orientation="vertical" android:orientation="vertical"
@@ -103,11 +105,11 @@
<TextView <TextView
android:textSize="16.0sp" android:textSize="16.0sp"
android:textColor="#ffffffff" android:textColor="?header_text"
android:gravity="center" android:gravity="center"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:id="@id/tv_apply_params" android:id="@id/tv_apply_params"
android:background="@drawable/picker_btn_blue" android:background="?tabbar_background"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="48.0dip" android:layout_height="48.0dip"
android:text="@string/discover_search_show_result" android:text="@string/discover_search_show_result"
+4 -2
View File
@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<ScrollView <ScrollView
android:background="?background_content"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_height="fill_parent"
android:fillViewport="true"> android:fillViewport="true">
@@ -15,6 +16,7 @@
android:paddingRight="@dimen/standard_list_item_padding" android:paddingRight="@dimen/standard_list_item_padding"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?background_content"
app:max_width="400.0dip"> app:max_width="400.0dip">
<include layout="@layout/discover_search_header" /> <include layout="@layout/discover_search_header" />
@@ -147,11 +149,11 @@
<TextView <TextView
android:textSize="16.0sp" android:textSize="16.0sp"
android:textColor="#ffffffff" android:textColor="?header_text"
android:gravity="center" android:gravity="center"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:id="@id/tv_apply_params" android:id="@id/tv_apply_params"
android:background="@drawable/picker_btn_blue" android:background="?tabbar_background"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="48.0dip" android:layout_height="48.0dip"
android:text="@string/discover_search_show_result" android:text="@string/discover_search_show_result"
+1 -1
View File
@@ -18,7 +18,7 @@
android:layout_height="24.0dip" android:layout_height="24.0dip"
android:layout_marginTop="12.0dip" android:layout_marginTop="12.0dip"
android:src="@drawable/ic_tag_24" android:src="@drawable/ic_tag_24"
android:tint="@color/blue_200_muted" android:tint="?accent"
android:layout_marginStart="16.0dip" /> android:layout_marginStart="16.0dip" />
<com.vk.fave.views.FaveTagViewGroup <com.vk.fave.views.FaveTagViewGroup
+2 -2
View File
@@ -33,7 +33,7 @@
<ImageView <ImageView
android:id="@id/search_voice" android:id="@id/search_voice"
android:background="?accent" android:background="?header_background"
android:layout_width="48.0dip" android:layout_width="48.0dip"
android:layout_height="48.0dip" android:layout_height="48.0dip"
android:src="@drawable/ic_voice_24" android:src="@drawable/ic_voice_24"
@@ -42,7 +42,7 @@
<ImageView <ImageView
android:id="@id/search_done" android:id="@id/search_done"
android:background="?accent" android:background="?header_background"
android:layout_width="48.0dip" android:layout_width="48.0dip"
android:layout_height="48.0dip" android:layout_height="48.0dip"
android:src="@drawable/ic_check_24" android:src="@drawable/ic_check_24"
+2 -2
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:background="#fffafbfc" <FrameLayout android:background="?tabbar_background"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
@@ -64,7 +64,7 @@
android:layout_marginTop="4.0dip" android:layout_marginTop="4.0dip"
android:src="@drawable/ic_cancel_24" android:src="@drawable/ic_cancel_24"
android:scaleType="centerInside" android:scaleType="centerInside"
android:tint="@color/light_gray" android:tint="?text_primary"
android:contentDescription="@null" /> android:contentDescription="@null" />
</LinearLayout> </LinearLayout>
+1
View File
@@ -4,6 +4,7 @@
<item <item
android:icon="@drawable/ic_settings_24" android:icon="@drawable/ic_settings_24"
android:id="@id/settings" android:id="@id/settings"
app:menuTint="?header_text"
android:title="@string/menu_settings" android:title="@string/menu_settings"
android:showAsAction="always" android:showAsAction="always"
app:showAsAction="always" /> app:showAsAction="always" />
+6 -1
View File
@@ -445,7 +445,7 @@
<item>Украинский</item> <item>Украинский</item>
</string-array> </string-array>
<string-array name="start"> <string-array name="start">
<item>Стандартное</item> <item>По умолчанию</item>
<item>Новости</item> <item>Новости</item>
<item>Диалоги</item> <item>Диалоги</item>
<item>Меню</item> <item>Меню</item>
@@ -500,4 +500,9 @@
<item>Не обновлять</item> <item>Не обновлять</item>
<item>Обновлять мгновенно</item> <item>Обновлять мгновенно</item>
</string-array> </string-array>
<string-array name="undel_value">
<item>[Удалено]</item>
<item>🗑</item>
<item>❌</item>
</string-array>
</resources> </resources>
+6 -6
View File
@@ -1773,7 +1773,7 @@
без ограничений"</string> без ограничений"</string>
<string name="music_subs_try_free">Попробовать</string> <string name="music_subs_try_free">Попробовать</string>
<string name="music_subscription_agreement">Условия использования</string> <string name="music_subscription_agreement">Условия использования</string>
<string name="music_subscription_exist">У Вас уже оформлена подписка на Музыку</string> <string name="music_subscription_exist">Данный трэк нельзя воспроизвести без настоящей подписки на музыку</string>
<string name="music_subscription_label_payment_type">Cпособ оплаты</string> <string name="music_subscription_label_payment_type">Cпособ оплаты</string>
<string name="music_subscription_label_status">Статус подписки</string> <string name="music_subscription_label_status">Статус подписки</string>
<string name="music_subscription_purchase_btn_title">Оформить за %1$s в месяц</string> <string name="music_subscription_purchase_btn_title">Оформить за %1$s в месяц</string>
@@ -4118,7 +4118,7 @@
<string name="ctypedisabled">Не установлено</string> <string name="ctypedisabled">Не установлено</string>
<string name="ctypesocks">Socks</string> <string name="ctypesocks">Socks</string>
<string name="dnr">Нечиталка</string> <string name="dnr">Нечиталка</string>
<string name="dns">Отправка статуса просмотра истории</string> <string name="dns">Статус просмотра/прочтения историй</string>
<string name="dnw">Неписалка</string> <string name="dnw">Неписалка</string>
<string name="docknumbers">Счётчики в докбаре</string> <string name="docknumbers">Счётчики в докбаре</string>
<string name="docknumberssum">Отключение не работает в интерфейсе для планшетов</string> <string name="docknumberssum">Отключение не работает в интерфейсе для планшетов</string>
@@ -4151,7 +4151,7 @@
Показать полностью..."</string> Показать полностью..."</string>
<string name="interfacenewsfeed">Лента</string> <string name="interfacenewsfeed">Лента</string>
<string name="interfacenewsfeedswipe">Боковая камера в новостях</string> <string name="interfacenewsfeedswipe">Боковая камера в новостях</string>
<string name="interfacenewsfeedswipesum">Работает только со стандартным дизайном новостей</string> <string name="interfacenewsfeedswipesum">Работает только с классическим дизайном новостей</string>
<string name="interfacestartfr">Стандартный стартовый фрагмент</string> <string name="interfacestartfr">Стандартный стартовый фрагмент</string>
<string name="interfacestartfrsum">Выберите стартовый фрагмент</string> <string name="interfacestartfrsum">Выберите стартовый фрагмент</string>
<string name="interfacevideo">Видео</string> <string name="interfacevideo">Видео</string>
@@ -4204,7 +4204,7 @@
<string name="shitposting">Однотипные новости</string> <string name="shitposting">Однотипные новости</string>
<string name="shitpostingsummary">Фильтр очистки постов с РФ и действиями связанными на Украине</string> <string name="shitpostingsummary">Фильтр очистки постов с РФ и действиями связанными на Украине</string>
<string name="showstories">Показывать истории</string> <string name="showstories">Показывать истории</string>
<string name="showstoriessum">Показывать истории в верхней части ленты</string> <string name="showstoriessum">Блок истории в верхней части ленты</string>
<string name="showvtfire">Показывать специальные верификации</string> <string name="showvtfire">Показывать специальные верификации</string>
<string name="showvtverify">Показывать верификации</string> <string name="showvtverify">Показывать верификации</string>
<string name="sprefsctype">Тип подключения</string> <string name="sprefsctype">Тип подключения</string>
@@ -4242,10 +4242,10 @@
<string name="useproxy">Вариант прокси</string> <string name="useproxy">Вариант прокси</string>
<string name="useproxyinfo">Информация об использовании прокси</string> <string name="useproxyinfo">Информация об использовании прокси</string>
<string name="useproxysum">Выберите вариант прокси</string> <string name="useproxysum">Выберите вариант прокси</string>
<string name="vkuiinj">Покраска VKUI</string> <string name="vkuiinj">Покраска веб страниц</string>
<string name="vtlawayphpsummary">Слежка за пользователем для персонализации рекламы. Также проверка ссылок на блэклист от ВКонтакте и антивирус</string> <string name="vtlawayphpsummary">Слежка за пользователем для персонализации рекламы. Также проверка ссылок на блэклист от ВКонтакте и антивирус</string>
<string name="vtloffline">Отправка статуса онлайн</string> <string name="vtloffline">Отправка статуса онлайн</string>
<string name="vtloffline2">Принудительно отправлять офлайн запросы</string> <string name="vtloffline2">Принудительный офлайн</string>
<string name="vtloffline2summary">"Работает только при отключении отправки статуса онлайн <string name="vtloffline2summary">"Работает только при отключении отправки статуса онлайн
Отправляет мгновенно в офлайн после отправки сообщений и прочих методов апи которые отправляют в онлайн Отправляет мгновенно в офлайн после отправки сообщений и прочих методов апи которые отправляют в онлайн
+1 -1
View File
@@ -1638,7 +1638,7 @@
без обмежень"</string> без обмежень"</string>
<string name="music_subs_try_free">Спробувати</string> <string name="music_subs_try_free">Спробувати</string>
<string name="music_subscription_agreement">Умови використання</string> <string name="music_subscription_agreement">Умови використання</string>
<string name="music_subscription_exist">У Вас уже оформлена підписка на Музику</string> <string name="music_subscription_exist">Данный трэк нельзя воспроизвести без настоящей подписки на музыку</string>
<string name="music_subscription_label_payment_type">Спосіб оплати</string> <string name="music_subscription_label_payment_type">Спосіб оплати</string>
<string name="music_subscription_label_status">Статус підписки</string> <string name="music_subscription_label_status">Статус підписки</string>
<string name="music_subscription_purchase_btn_title">Оформити за %1$s в місяць</string> <string name="music_subscription_purchase_btn_title">Оформити за %1$s в місяць</string>
+500 -28
View File
@@ -147,7 +147,7 @@
<item name="landing_text_secondary">@color/white_alpha60</item> <item name="landing_text_secondary">@color/white_alpha60</item>
<item name="landing_text_title">@color/white</item> <item name="landing_text_title">@color/white</item>
<item name="like_text_tint">@color/red_light</item> <item name="like_text_tint">@color/red_light</item>
<item name="link_alternate">@android:color/system_neutral1_50</item> <item name="link_alternate">?accent</item>
<item name="loader_background">@android:color/system_neutral1_900</item> <item name="loader_background">@android:color/system_neutral1_900</item>
<item name="loader_tint">@android:color/system_neutral2_200</item> <item name="loader_tint">@android:color/system_neutral2_200</item>
<item name="loader_track_fill">@color/gray_700</item> <item name="loader_track_fill">@color/gray_700</item>
@@ -287,7 +287,7 @@
<item name="header_alternate_tab_active_text">@android:color/system_accent1_600</item> <item name="header_alternate_tab_active_text">@android:color/system_accent1_600</item>
<item name="header_alternate_tab_inactive_text">@color/gray_400</item> <item name="header_alternate_tab_inactive_text">@color/gray_400</item>
<item name="header_background">?background_page</item> <item name="header_background">?background_page</item>
<item name="header_background_before_blur">@color/blue_A400</item> <item name="header_background_before_blur">?accent</item>
<item name="header_background_before_blur_alternate">@color/white</item> <item name="header_background_before_blur_alternate">@color/white</item>
<item name="header_search_field_background">@android:color/system_accent1_400</item> <item name="header_search_field_background">@android:color/system_accent1_400</item>
<item name="header_search_field_tint">@android:color/system_accent1_700</item> <item name="header_search_field_tint">@android:color/system_accent1_700</item>
@@ -343,7 +343,7 @@
<item name="landing_text_secondary">@color/white_alpha60</item> <item name="landing_text_secondary">@color/white_alpha60</item>
<item name="landing_text_title">@color/white</item> <item name="landing_text_title">@color/white</item>
<item name="like_text_tint">@color/red_nice</item> <item name="like_text_tint">@color/red_nice</item>
<item name="link_alternate">@android:color/system_accent1_900</item> <item name="link_alternate">?accent</item>
<item name="loader_background">@color/gray_50</item> <item name="loader_background">@color/gray_50</item>
<item name="loader_tint">@color/gray_500</item> <item name="loader_tint">@color/gray_500</item>
<item name="loader_track_fill">@color/gray_100</item> <item name="loader_track_fill">@color/gray_100</item>
@@ -441,7 +441,7 @@
<item name="button_primary_foreground_disabled">#66ffffff</item> <item name="button_primary_foreground_disabled">#66ffffff</item>
<item name="button_secondary_background">@color/black_blue45_alpha10</item> <item name="button_secondary_background">@color/black_blue45_alpha10</item>
<item name="button_secondary_background_disabled">#0a003973</item> <item name="button_secondary_background_disabled">#0a003973</item>
<item name="button_secondary_foreground">@color/blue_600</item> <item name="button_secondary_foreground">?accent</item>
<item name="button_secondary_foreground_disabled">#6645678f</item> <item name="button_secondary_foreground_disabled">#6645678f</item>
<item name="button_tertiary_background">@color/clear</item> <item name="button_tertiary_background">@color/clear</item>
<item name="button_tertiary_background_disabled">#66000000</item> <item name="button_tertiary_background_disabled">#66000000</item>
@@ -482,7 +482,7 @@
<item name="header_alternate_tab_active_text">?accent</item> <item name="header_alternate_tab_active_text">?accent</item>
<item name="header_alternate_tab_inactive_text">@color/gray_400</item> <item name="header_alternate_tab_inactive_text">@color/gray_400</item>
<item name="header_background">?background_page</item> <item name="header_background">?background_page</item>
<item name="header_background_before_blur">@color/blue_A400</item> <item name="header_background_before_blur">?accent</item>
<item name="header_background_before_blur_alternate">@color/white</item> <item name="header_background_before_blur_alternate">@color/white</item>
<item name="header_search_field_background">@android:color/system_accent1_400</item> <item name="header_search_field_background">@android:color/system_accent1_400</item>
<item name="header_search_field_tint">@android:color/system_accent1_700</item> <item name="header_search_field_tint">@android:color/system_accent1_700</item>
@@ -539,7 +539,7 @@
<item name="im_bubble_border_alternate_highlighted">@color/gray_A150</item> <item name="im_bubble_border_alternate_highlighted">@color/gray_A150</item>
<item name="im_bubble_button_background">@color/black_blue45_alpha10</item> <item name="im_bubble_button_background">@color/black_blue45_alpha10</item>
<item name="im_bubble_button_background_disabled">#0a003973</item> <item name="im_bubble_button_background_disabled">#0a003973</item>
<item name="im_bubble_button_foreground">@color/blue_600</item> <item name="im_bubble_button_foreground">?accent</item>
<item name="im_bubble_button_foreground_disabled">#6645678f</item> <item name="im_bubble_button_foreground_disabled">#6645678f</item>
<item name="im_bubble_gift_background">@color/gold_200</item> <item name="im_bubble_gift_background">@color/gold_200</item>
<item name="im_bubble_gift_text">@color/gold_500</item> <item name="im_bubble_gift_text">@color/gold_500</item>
@@ -560,7 +560,7 @@
<item name="im_conversation_unread_counter_foreground">@color/white</item> <item name="im_conversation_unread_counter_foreground">@color/white</item>
<item name="im_conversation_unread_counter_muted_background">#ffa9b0b8</item> <item name="im_conversation_unread_counter_muted_background">#ffa9b0b8</item>
<item name="im_conversation_verified_icon">#ff67a5eb</item> <item name="im_conversation_verified_icon">#ff67a5eb</item>
<item name="im_forward_line_tint">@color/blue_600</item> <item name="im_forward_line_tint">?accent</item>
<item name="im_history_common_badge_background">#66000000</item> <item name="im_history_common_badge_background">#66000000</item>
<item name="im_history_common_badge_foreground">@color/white</item> <item name="im_history_common_badge_foreground">@color/white</item>
<item name="im_history_divider_background">@color/white</item> <item name="im_history_divider_background">@color/white</item>
@@ -651,7 +651,7 @@
<item name="placeholder_icon_foreground_primary">@color/steel_gray_300</item> <item name="placeholder_icon_foreground_primary">@color/steel_gray_300</item>
<item name="placeholder_icon_foreground_secondary">@color/steel_gray_200</item> <item name="placeholder_icon_foreground_secondary">@color/steel_gray_200</item>
<item name="placeholder_icon_tint">@color/black_blue24</item> <item name="placeholder_icon_tint">@color/black_blue24</item>
<item name="poll_option_background">@color/blue_600</item> <item name="poll_option_background">?accent</item>
<item name="search_bar_background">?text_secondary</item> <item name="search_bar_background">?text_secondary</item>
<item name="search_bar_field_background">?background_page</item> <item name="search_bar_field_background">?background_page</item>
<item name="search_bar_field_tint">@color/steel_gray_300</item> <item name="search_bar_field_tint">@color/steel_gray_300</item>
@@ -673,7 +673,7 @@
<item name="tabbar_background">?background_page</item> <item name="tabbar_background">?background_page</item>
<item name="tabbar_inactive_icon">@color/steel_gray_300</item> <item name="tabbar_inactive_icon">@color/steel_gray_300</item>
<item name="text_action_counter">@color/steel_gray_400</item> <item name="text_action_counter">@color/steel_gray_400</item>
<item name="text_link">@color/blue_A500</item> <item name="text_link">?accent</item>
<item name="text_link_hightlighted_background">@color/black</item> <item name="text_link_hightlighted_background">@color/black</item>
<item name="text_muted">?text_secondary</item> <item name="text_muted">?text_secondary</item>
<item name="text_name">?text_primary</item> <item name="text_name">?text_primary</item>
@@ -792,10 +792,10 @@
<item name="im_app_background_navbar">@color/black</item> <item name="im_app_background_navbar">@color/black</item>
<item name="im_app_background_navbar_light">false</item> <item name="im_app_background_navbar_light">false</item>
<item name="im_app_background_secondary">#ffebedf0</item> <item name="im_app_background_secondary">#ffebedf0</item>
<item name="im_app_background_statusbar">@color/muted_blue</item> <item name="im_app_background_statusbar">?accent</item>
<item name="im_app_background_statusbar_light">false</item> <item name="im_app_background_statusbar_light">false</item>
<item name="im_app_background_tabbar">#fffafafa</item> <item name="im_app_background_tabbar">#fffafafa</item>
<item name="im_app_icon">@color/im_old_accent</item> <item name="im_app_icon">?accent</item>
<item name="im_app_icon_destructive">@color/red</item> <item name="im_app_icon_destructive">@color/red</item>
<item name="im_app_icon_inv">@color/white</item> <item name="im_app_icon_inv">@color/white</item>
<item name="im_app_icon_secondary">@color/im_old_blue_gray_light</item> <item name="im_app_icon_secondary">@color/im_old_blue_gray_light</item>
@@ -807,12 +807,12 @@
<item name="im_app_toolbar_foreground_semitransparent">#80ffffff</item> <item name="im_app_toolbar_foreground_semitransparent">#80ffffff</item>
<item name="im_app_toolbar_foreground_start">@color/white</item> <item name="im_app_toolbar_foreground_start">@color/white</item>
<item name="im_app_toolbar_tabs_indicator">@color/white</item> <item name="im_app_toolbar_tabs_indicator">@color/white</item>
<item name="im_attach_tint">@color/sky_300</item> <item name="im_attach_tint">?accent</item>
<item name="im_btn_accept_background">@color/black</item> <item name="im_btn_accept_background">@color/black</item>
<item name="im_btn_accept_background_dark">@color/black</item> <item name="im_btn_accept_background_dark">@color/black</item>
<item name="im_btn_accept_foreground">@color/white</item> <item name="im_btn_accept_foreground">@color/white</item>
<item name="im_btn_confirm">@drawable/vkim_btn_confirm_default</item> <item name="im_btn_confirm">@drawable/vkim_btn_confirm_default</item>
<item name="im_btn_confirm_background">@color/blue_300</item> <item name="im_btn_confirm_background">?accent</item>
<item name="im_btn_confirm_background_dark">@android:color/system_neutral1_50</item> <item name="im_btn_confirm_background_dark">@android:color/system_neutral1_50</item>
<item name="im_btn_confirm_background_disabled">@android:color/system_accent1_400</item> <item name="im_btn_confirm_background_disabled">@android:color/system_accent1_400</item>
<item name="im_btn_reject_background">@color/black</item> <item name="im_btn_reject_background">@color/black</item>
@@ -839,7 +839,7 @@
</item> </item>
<item name="im_bubble_outgoing_highlighted">@android:color/system_accent1_800</item> <item name="im_bubble_outgoing_highlighted">@android:color/system_accent1_800</item>
<item name="im_conversation_error_icon">@color/red_error</item> <item name="im_conversation_error_icon">@color/red_error</item>
<item name="im_conversation_sending_icon">@color/im_old_accent</item> <item name="im_conversation_sending_icon">?accent</item>
<item name="im_conversation_unread_counter_background">@android:color/system_neutral1_50 <item name="im_conversation_unread_counter_background">@android:color/system_neutral1_50
</item> </item>
<item name="im_conversation_unread_counter_foreground">@color/white</item> <item name="im_conversation_unread_counter_foreground">@color/white</item>
@@ -852,44 +852,44 @@
<item name="im_history_divider_foreground">@color/im_old_blue_gray_medium</item> <item name="im_history_divider_foreground">@color/im_old_blue_gray_medium</item>
<item name="im_history_divider_separator">#1e000000</item> <item name="im_history_divider_separator">#1e000000</item>
<item name="im_history_image_bubbleless_border">#1e000000</item> <item name="im_history_image_bubbleless_border">#1e000000</item>
<item name="im_history_incoming_attachment_icon">@color/im_old_accent_muted</item> <item name="im_history_incoming_attachment_icon">?accent</item>
<item name="im_history_incoming_background">#ffebeced</item> <item name="im_history_incoming_background">#ffebeced</item>
<item name="im_history_incoming_background_selected">#ffc2c7cc</item> <item name="im_history_incoming_background_selected">#ffc2c7cc</item>
<item name="im_history_incoming_button">@color/im_old_accent</item> <item name="im_history_incoming_button">?accent</item>
<item name="im_history_incoming_foreground">@color/black</item> <item name="im_history_incoming_foreground">@color/black</item>
<item name="im_history_incoming_foreground_caption">@color/im_old_gray_medium</item> <item name="im_history_incoming_foreground_caption">@color/im_old_gray_medium</item>
<item name="im_history_incoming_foreground_caption_inv">@color/white</item> <item name="im_history_incoming_foreground_caption_inv">@color/white</item>
<item name="im_history_incoming_foreground_link">@color/im_old_accent_muted</item> <item name="im_history_incoming_foreground_link">?accent</item>
<item name="im_history_incoming_foreground_name">@color/im_old_accent_muted</item> <item name="im_history_incoming_foreground_name">?accent</item>
<item name="im_history_incoming_image_placeholder_background">#14000c1a</item> <item name="im_history_incoming_image_placeholder_background">#14000c1a</item>
<item name="im_history_incoming_snippet_placeholder_background"> <item name="im_history_incoming_snippet_placeholder_background">
@color/im_old_accent_muted_14 @color/im_old_accent_muted_14
</item> </item>
<item name="im_history_incoming_snippet_placeholder_icon">@color/im_old_accent_muted</item> <item name="im_history_incoming_snippet_placeholder_icon">?accent</item>
<item name="im_history_info_bar_background">#fffafbfc</item> <item name="im_history_info_bar_background">#fffafbfc</item>
<item name="im_history_info_bar_border">#26000000</item> <item name="im_history_info_bar_border">#26000000</item>
<item name="im_history_live_badge_background">#ffff3347</item> <item name="im_history_live_badge_background">#ffff3347</item>
<item name="im_history_outgoing_attachment_icon">@color/im_old_accent_muted</item> <item name="im_history_outgoing_attachment_icon">?accent</item>
<item name="im_history_outgoing_background">@android:color/system_neutral1_800</item> <item name="im_history_outgoing_background">@android:color/system_neutral1_800</item>
<item name="im_history_outgoing_background_selected">@android:color/system_accent1_300 <item name="im_history_outgoing_background_selected">@android:color/system_accent1_300
</item> </item>
<item name="im_history_outgoing_button">@color/im_old_accent_muted</item> <item name="im_history_outgoing_button">?accent</item>
<item name="im_history_outgoing_foreground">@color/black</item> <item name="im_history_outgoing_foreground">@color/black</item>
<item name="im_history_outgoing_foreground_caption">@color/im_old_gray_medium</item> <item name="im_history_outgoing_foreground_caption">@color/im_old_gray_medium</item>
<item name="im_history_outgoing_foreground_link">@color/im_old_accent</item> <item name="im_history_outgoing_foreground_link">?accent</item>
<item name="im_history_outgoing_foreground_name">@color/im_old_accent_muted</item> <item name="im_history_outgoing_foreground_name">?accent</item>
<item name="im_history_outgoing_image_placeholder_background">#14000c1a</item> <item name="im_history_outgoing_image_placeholder_background">#14000c1a</item>
<item name="im_history_outgoing_snippet_placeholder_background"> <item name="im_history_outgoing_snippet_placeholder_background">
@color/im_old_accent_muted_14 @color/im_old_accent_muted_14
</item> </item>
<item name="im_history_outgoing_snippet_placeholder_icon">@color/im_old_accent_muted</item> <item name="im_history_outgoing_snippet_placeholder_icon">?accent</item>
<item name="im_history_sending_icon">@color/im_old_accent</item> <item name="im_history_sending_icon">?accent</item>
<item name="im_history_sticker_badge_background">#e6ffffff</item> <item name="im_history_sticker_badge_background">#e6ffffff</item>
<item name="im_history_sticker_badge_foreground">@color/im_old_gray_medium</item> <item name="im_history_sticker_badge_foreground">@color/im_old_gray_medium</item>
<item name="im_history_unread_icon">@color/im_old_accent</item> <item name="im_history_unread_icon">?accent</item>
<item name="im_is_vk_me">false</item> <item name="im_is_vk_me">false</item>
<item name="im_item_foreground_caption">@color/im_old_gray_medium</item> <item name="im_item_foreground_caption">@color/im_old_gray_medium</item>
<item name="im_item_foreground_name">@color/im_old_accent_muted</item> <item name="im_item_foreground_name">?accent</item>
<item name="im_item_foreground_subhead">@color/im_old_gray_dark</item> <item name="im_item_foreground_subhead">@color/im_old_gray_dark</item>
<item name="im_item_foreground_tertiary">@color/im_old_gray_light</item> <item name="im_item_foreground_tertiary">@color/im_old_gray_light</item>
<item name="im_menu_foreground">@color/gray_800</item> <item name="im_menu_foreground">@color/gray_800</item>
@@ -912,7 +912,7 @@
<item name="landing_text_secondary">@color/white_alpha60</item> <item name="landing_text_secondary">@color/white_alpha60</item>
<item name="landing_text_title">@color/white</item> <item name="landing_text_title">@color/white</item>
<item name="like_text_tint">@color/red_light</item> <item name="like_text_tint">@color/red_light</item>
<item name="link_alternate">@android:color/system_neutral1_50</item> <item name="link_alternate">?accent</item>
<item name="loader_background">@android:color/system_neutral1_900</item> <item name="loader_background">@android:color/system_neutral1_900</item>
<item name="loader_tint">@android:color/system_neutral2_200</item> <item name="loader_tint">@android:color/system_neutral2_200</item>
<item name="loader_track_fill">@color/gray_700</item> <item name="loader_track_fill">@color/gray_700</item>
@@ -969,4 +969,476 @@
<item name="writebar_icon">@android:color/system_neutral2_200</item> <item name="writebar_icon">@android:color/system_neutral2_200</item>
<item name="tabbar_fix">?tabbar_background</item> <item name="tabbar_fix">?tabbar_background</item>
</style> </style>
<style name="Vk.Theme.client_amoled_generated" parent="@style/Vk.Theme.Dark">
<item name="accent">@android:color/system_neutral1_200</item>
<item name="action_sheet_action_foreground">@color/white</item>
<item name="action_sheet_separator">@color/white_alpha12</item>
<item name="activity_indicator_tint">@color/gray_600</item>
<item name="attach_picker_tab_active_background">@color/gray_100</item>
<item name="attach_picker_tab_active_icon">@color/black</item>
<item name="attach_picker_tab_active_text">@color/gray_100</item>
<item name="attach_picker_tab_inactive_background">@color/black</item>
<item name="attach_picker_tab_inactive_icon">@color/gray_100</item>
<item name="attach_picker_tab_inactive_text">@color/gray_500</item>
<item name="background_content">@color/black</item>
<item name="background_highlighted">@color/white_alpha12</item>
<item name="background_keyboard">@color/black</item>
<item name="background_light">@color/black</item>
<item name="background_page">@color/black</item>
<item name="background_suggestions">@color/black</item>
<item name="button_bot_shadow">@color/black</item>
<item name="button_bot_shadow_disabled">#6619191a</item>
<item name="button_commerce_background">@color/green</item>
<item name="button_commerce_background_disabled">#664bb34b</item>
<item name="button_commerce_foreground">@color/white</item>
<item name="button_commerce_foreground_disabled">#66ffffff</item>
<item name="button_muted_background">@color/black</item>
<item name="button_muted_background_disabled">#662c2d2e</item>
<item name="button_muted_foreground">@color/gray_100</item>
<item name="button_muted_foreground_disabled">#66e1e3e6</item>
<item name="button_outline_border">@color/gray_100</item>
<item name="button_outline_border_disabled">#66e1e3e6</item>
<item name="button_outline_foreground">@color/gray_100</item>
<item name="button_outline_foreground_disabled">#66e1e3e6</item>
<item name="button_primary_background">@color/gray_100</item>
<item name="button_primary_background_disabled">#66e1e3e6</item>
<item name="button_primary_foreground">@color/black</item>
<item name="button_primary_foreground_disabled">#6619191a</item>
<item name="button_secondary_background">@color/gray_700</item>
<item name="button_secondary_background_disabled">#66454647</item>
<item name="button_secondary_foreground">@color/gray_100</item>
<item name="button_secondary_foreground_disabled">#66e1e3e6</item>
<item name="button_tertiary_background">@color/clear</item>
<item name="button_tertiary_background_disabled">#66000000</item>
<item name="button_tertiary_foreground">@color/gray_100</item>
<item name="button_tertiary_foreground_disabled">#66e1e3e6</item>
<item name="cell_button_foreground">@color/gray_100</item>
<item name="cell_button_foreground_disabled">#66e1e3e6</item>
<item name="content_placeholder_icon">@color/gray_300</item>
<item name="content_placeholder_text">@color/gray_300</item>
<item name="content_tint_background">@color/black</item>
<item name="content_tint_foreground">@color/gray_400</item>
<item name="control_background">@color/gray_700</item>
<item name="control_foreground">@color/gray_100</item>
<item name="control_tint">@color/black</item>
<item name="control_tint_muted">@color/gray_400</item>
<item name="counter_primary_background">@android:color/system_neutral1_200</item>
<item name="counter_primary_text">@color/white</item>
<item name="counter_secondary_background">@color/gray_500</item>
<item name="counter_secondary_text">@color/black</item>
<item name="destructive">@color/red_light</item>
<item name="feed_recommended_friend_promo_background">@color/steel_gray_500</item>
<item name="field_background">@color/black</item>
<item name="field_border">@color/white_alpha12</item>
<item name="field_error_background">@color/red_dark</item>
<item name="field_error_border">@color/red_light</item>
<item name="field_text_placeholder">@color/gray_500</item>
<item name="field_valid_border">@color/green</item>
<item name="float_button_background">@color/gray_700</item>
<item name="float_button_background_disabled">#66454647</item>
<item name="float_button_background_highlighted">@color/black</item>
<item name="float_button_background_highlighted_disabled">#660a0a0a</item>
<item name="float_button_border">@color/black_alpha12</item>
<item name="float_button_border_disabled">#0c000000</item>
<item name="float_button_foreground">@color/gray_300</item>
<item name="float_button_foreground_disabled">#66aaaeb3</item>
<item name="header_alternate_background">@color/black</item>
<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_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>
<item name="header_search_field_tint">@color/gray_100</item>
<item name="header_tab_active_background">@color/gray_600</item>
<item name="header_tab_active_indicator">@color/gray_100</item>
<item name="header_tab_active_text">@color/gray_100</item>
<item name="header_tab_inactive_text">@color/gray_500</item>
<item name="header_text">@color/gray_100</item>
<item name="header_text_alternate">@color/gray_100</item>
<item name="header_text_secondary">@color/white_alpha60</item>
<item name="header_tint">@color/gray_100</item>
<item name="header_tint_alternate">@color/gray_100</item>
<item name="icon_alpha_placeholder">@color/gray_100</item>
<item name="icon_medium">@color/gray_400</item>
<item name="icon_name">@color/gray_300</item>
<item name="icon_outline_medium">@color/gray_300</item>
<item name="icon_outline_secondary">@color/gray_400</item>
<item name="icon_secondary">@color/gray_500</item>
<item name="icon_tertiary">@color/gray_700</item>
<item name="im_attach_tint">@android:color/system_neutral1_200</item>
<item name="im_bubble_border_alternate">@color/clear</item>
<item name="im_bubble_border_alternate_highlighted">@color/clear</item>
<item name="im_bubble_button_background">@color/black</item>
<item name="im_bubble_button_background_disabled">#66313233</item>
<item name="im_bubble_button_foreground">@color/gray_100</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_incoming">@color/black</item>
<item name="im_bubble_incoming_alternate">@color/black</item>
<item name="im_bubble_incoming_alternate_highlighted">@color/gray_600</item>
<item name="im_bubble_incoming_highlighted">@color/gray_600</item>
<item name="im_bubble_outgoing">@color/gray_700</item>
<item name="im_bubble_outgoing_alternate">@color/gray_700</item>
<item name="im_bubble_outgoing_alternate_highlighted">@color/gray_500</item>
<item name="im_bubble_outgoing_highlighted">@color/gray_600</item>
<item name="im_forward_line_tint">@color/white</item>
<item name="im_reply_sender_text">@color/white</item>
<item name="im_reply_separator">@color/white</item>
<item name="im_service_message_text">@color/steel_gray_400</item>
<item name="im_toolbar_separator">@color/gray_300</item>
<item name="im_toolbar_voice_msg_background">@color/gray_700</item>
<item name="image_border">@color/white_alpha8</item>
<item name="input_background">@color/gray_700</item>
<item name="input_border">@color/gray_700</item>
<item name="landing_background">?accent</item>
<item name="landing_primary_button_background">@color/white</item>
<item name="landing_primary_button_background_disabled">#66ffffff</item>
<item name="landing_primary_button_foreground">?accent</item>
<item name="landing_primary_button_foreground_disabled">#665181b8</item>
<item name="landing_snippet_border">@color/clear</item>
<item name="landing_text_secondary">@color/white_alpha60</item>
<item name="landing_text_title">@color/white</item>
<item name="like_text_tint">@color/red_light</item>
<item name="link_alternate">?accent</item>
<item name="loader_background">@color/black</item>
<item name="loader_tint">@color/gray_500</item>
<item name="loader_track_fill">@color/gray_700</item>
<item name="loader_track_value_fill">@android:color/system_neutral1_200</item>
<item name="media_overlay_button_background">@color/white</item>
<item name="media_overlay_button_background_disabled">#66ffffff</item>
<item name="media_overlay_button_foreground">@color/black</item>
<item name="media_overlay_button_foreground_disabled">#662c2d2e</item>
<item name="modal_card_background">@color/black</item>
<item name="modal_card_border">@color/white_alpha12</item>
<item name="modal_card_header_close">@color/white</item>
<item name="music_playback_icon">@color/white</item>
<item name="overlay_status_background">@color/black</item>
<item name="overlay_status_foreground">@color/gray_100</item>
<item name="overlay_status_icon">@color/gray_50</item>
<item name="panel_tab_active_background">@color/gray_700</item>
<item name="panel_tab_active_text">@color/gray_100</item>
<item name="panel_tab_inactive_text">@color/gray_500</item>
<item name="placeholder_icon_background">@color/white_alpha8</item>
<item name="placeholder_icon_foreground_primary">@color/gray_400</item>
<item name="placeholder_icon_foreground_secondary">@color/gray_600</item>
<item name="placeholder_icon_tint">@color/white</item>
<item name="poll_option_background">@color/white</item>
<item name="search_bar_background">@color/black</item>
<item name="search_bar_field_background">@color/gray_700</item>
<item name="search_bar_field_tint">@color/gray_300</item>
<item name="search_bar_segmented_control_tint">@color/gray_400</item>
<item name="segmented_control_bar_background">@color/black</item>
<item name="segmented_control_tint">@color/gray_500</item>
<item name="selection_off_icon">@color/gray_700</item>
<item name="separator_alpha">@color/white_alpha15</item>
<item name="separator_alternate">@color/black</item>
<item name="separator_common">@color/black</item>
<item name="snippet_background">@color/black</item>
<item name="snippet_border">@color/white_alpha12</item>
<item name="snippet_icon_tertiary">@color/gray_600</item>
<item name="splashscreen_icon">@color/black</item>
<item name="statusbar_alternate_legacy_background">@color/clear</item>
<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_inactive_icon">@color/gray_500</item>
<item name="text_action_counter">@color/gray_300</item>
<item name="text_link">@android:color/system_neutral1_200</item>
<item name="text_link_hightlighted_background">@android:color/system_neutral1_200</item>
<item name="text_muted">@color/gray_200</item>
<item name="text_name">@color/gray_100</item>
<item name="text_placeholder">@color/gray_300</item>
<item name="text_primary">@color/gray_100</item>
<item name="text_secondary">@color/gray_500</item>
<item name="text_subhead">@color/gray_400</item>
<item name="text_tertiary">@color/gray_600</item>
<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_400</item>
<item name="tabbar_fix">?tabbar_background</item>
</style>
<style name="VkIm.Theme.VkApp.Amoled" parent="@style/VkIm.Theme.VkApp">
<item name="accent">@android:color/system_neutral1_200</item>
<item name="action_sheet_action_foreground">@color/white</item>
<item name="action_sheet_separator">@color/white_alpha12</item>
<item name="activity_indicator_tint">@color/gray_600</item>
<item name="attach_picker_tab_active_background">@color/gray_100</item>
<item name="attach_picker_tab_active_icon">@color/black</item>
<item name="attach_picker_tab_active_text">@color/gray_100</item>
<item name="attach_picker_tab_inactive_background">@color/black</item>
<item name="attach_picker_tab_inactive_icon">@color/gray_100</item>
<item name="attach_picker_tab_inactive_text">@color/gray_500</item>
<item name="background_content">@color/black</item>
<item name="background_highlighted">@color/white_alpha12</item>
<item name="background_keyboard">@color/black</item>
<item name="background_light">@color/black</item>
<item name="background_page">@color/black</item>
<item name="background_suggestions">@color/black</item>
<item name="button_bot_shadow">@color/black</item>
<item name="button_bot_shadow_disabled">#6619191a</item>
<item name="button_commerce_background">@color/green</item>
<item name="button_commerce_background_disabled">#664bb34b</item>
<item name="button_commerce_foreground">@color/white</item>
<item name="button_commerce_foreground_disabled">#66ffffff</item>
<item name="button_muted_background">@color/black</item>
<item name="button_muted_background_disabled">#662c2d2e</item>
<item name="button_muted_foreground">@color/gray_100</item>
<item name="button_muted_foreground_disabled">#66e1e3e6</item>
<item name="button_outline_border">@color/gray_100</item>
<item name="button_outline_border_disabled">#66e1e3e6</item>
<item name="button_outline_foreground">@color/gray_100</item>
<item name="button_outline_foreground_disabled">#66e1e3e6</item>
<item name="button_primary_background">@color/gray_100</item>
<item name="button_primary_background_disabled">#66e1e3e6</item>
<item name="button_primary_foreground">@color/black</item>
<item name="button_primary_foreground_disabled">#6619191a</item>
<item name="button_secondary_background">@color/gray_700</item>
<item name="button_secondary_background_disabled">#66454647</item>
<item name="button_secondary_foreground">@color/gray_100</item>
<item name="button_secondary_foreground_disabled">#66e1e3e6</item>
<item name="button_tertiary_background">@color/clear</item>
<item name="button_tertiary_background_disabled">#66000000</item>
<item name="button_tertiary_foreground">@color/gray_100</item>
<item name="button_tertiary_foreground_disabled">#66e1e3e6</item>
<item name="cell_button_foreground">@color/gray_100</item>
<item name="cell_button_foreground_disabled">#66e1e3e6</item>
<item name="content_placeholder_icon">@color/gray_300</item>
<item name="content_placeholder_text">@color/gray_300</item>
<item name="content_tint_background">@color/black</item>
<item name="content_tint_foreground">@color/gray_400</item>
<item name="control_background">@color/gray_700</item>
<item name="control_foreground">@color/gray_100</item>
<item name="control_tint">@color/black</item>
<item name="control_tint_muted">@color/gray_400</item>
<item name="counter_primary_background">@android:color/system_neutral1_200</item>
<item name="counter_primary_text">@color/white</item>
<item name="counter_secondary_background">@color/gray_500</item>
<item name="counter_secondary_text">@color/black</item>
<item name="destructive">@color/red_light</item>
<item name="feed_recommended_friend_promo_background">@color/steel_gray_500</item>
<item name="field_background">@color/black</item>
<item name="field_border">@color/white_alpha12</item>
<item name="field_error_background">@color/red_dark</item>
<item name="field_error_border">@color/red_light</item>
<item name="field_text_placeholder">@color/gray_500</item>
<item name="field_valid_border">@color/green</item>
<item name="float_button_background">@color/gray_700</item>
<item name="float_button_background_disabled">#66454647</item>
<item name="float_button_background_highlighted">@color/black</item>
<item name="float_button_background_highlighted_disabled">#660a0a0a</item>
<item name="float_button_border">@color/black_alpha12</item>
<item name="float_button_border_disabled">#0c000000</item>
<item name="float_button_foreground">@color/gray_300</item>
<item name="float_button_foreground_disabled">#66aaaeb3</item>
<item name="header_alternate_background">@color/black</item>
<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_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>
<item name="header_search_field_tint">@color/gray_100</item>
<item name="header_tab_active_background">@color/gray_600</item>
<item name="header_tab_active_indicator">@color/gray_100</item>
<item name="header_tab_active_text">@color/gray_100</item>
<item name="header_tab_inactive_text">@color/gray_500</item>
<item name="header_text">@color/gray_100</item>
<item name="header_text_alternate">@color/gray_100</item>
<item name="header_text_secondary">@color/white_alpha60</item>
<item name="header_tint">@color/gray_100</item>
<item name="header_tint_alternate">@color/gray_100</item>
<item name="icon_alpha_placeholder">@color/gray_100</item>
<item name="icon_medium">@color/gray_400</item>
<item name="icon_name">@color/gray_300</item>
<item name="icon_outline_medium">@color/gray_300</item>
<item name="icon_outline_secondary">@color/gray_400</item>
<item name="icon_secondary">@color/gray_500</item>
<item name="icon_tertiary">@color/gray_700</item>
<item name="im_accent">?accent</item>
<item name="im_accent_dark">?accent</item>
<item name="im_alert">@color/red</item>
<item name="im_app_background_chat">?background_content</item>
<item name="im_app_background_navbar">@color/black</item>
<item name="im_app_background_navbar_light">false</item>
<item name="im_app_background_secondary">#ffebedf0</item>
<item name="im_app_background_statusbar">?accent</item>
<item name="im_app_background_statusbar_light">false</item>
<item name="im_app_background_tabbar">#fffafafa</item>
<item name="im_app_icon">?accent</item>
<item name="im_app_icon_destructive">@color/red</item>
<item name="im_app_icon_inv">@color/white</item>
<item name="im_app_icon_secondary">@color/im_old_blue_gray_light</item>
<item name="im_app_icon_toolbar">@color/white</item>
<item name="im_app_swipe_background_end">#ff4cb8ff</item>
<item name="im_app_swipe_background_start">#ff3f7fe0</item>
<item name="im_app_toolbar_foreground">@color/white</item>
<item name="im_app_toolbar_foreground_end">@color/white</item>
<item name="im_app_toolbar_foreground_semitransparent">#80ffffff</item>
<item name="im_app_toolbar_foreground_start">@color/white</item>
<item name="im_app_toolbar_tabs_indicator">@color/white</item>
<item name="im_attach_tint">@android:color/system_neutral1_200</item>
<item name="im_btn_accept_background">@color/black</item>
<item name="im_btn_accept_background_dark">@color/black</item>
<item name="im_btn_accept_foreground">@color/white</item>
<item name="im_btn_confirm">@drawable/vkim_btn_confirm_default</item>
<item name="im_btn_confirm_background">?accent</item>
<item name="im_btn_confirm_background_dark">?accent</item>
<item name="im_btn_confirm_background_disabled">?accent</item>
<item name="im_btn_reject_background">@color/black</item>
<item name="im_btn_reject_background_dark">@color/black</item>
<item name="im_btn_reject_foreground">@color/white</item>
<item name="im_bubble_border_alternate">@color/clear</item>
<item name="im_bubble_border_alternate_highlighted">@color/clear</item>
<item name="im_bubble_button_background">@color/gray_750</item>
<item name="im_bubble_button_background_disabled">#66313233</item>
<item name="im_bubble_button_foreground">@color/gray_100</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_incoming">@color/gray_800</item>
<item name="im_bubble_incoming_alternate">@color/gray_800</item>
<item name="im_bubble_incoming_alternate_highlighted">@color/gray_600</item>
<item name="im_bubble_incoming_highlighted">@color/gray_600</item>
<item name="im_bubble_outgoing">@color/gray_750</item>
<item name="im_bubble_outgoing_alternate">@color/gray_750</item>
<item name="im_bubble_outgoing_alternate_highlighted">@color/gray_500</item>
<item name="im_bubble_outgoing_highlighted">@color/gray_600</item>
<item name="im_conversation_error_icon">@color/red_error</item>
<item name="im_conversation_sending_icon">?accent</item>
<item name="im_conversation_unread_counter_background">?accent</item>
<item name="im_conversation_unread_counter_foreground">@color/white</item>
<item name="im_conversation_unread_counter_muted_background">#ffa9b0b8</item>
<item name="im_conversation_verified_icon">#ff67a5eb</item>
<item name="im_forward_line_tint">@color/white</item>
<item name="im_history_common_badge_background">#66000000</item>
<item name="im_history_common_badge_foreground">@color/white</item>
<item name="im_history_divider_background">@color/white</item>
<item name="im_history_divider_foreground">@color/im_old_blue_gray_medium</item>
<item name="im_history_divider_separator">#1e000000</item>
<item name="im_history_image_bubbleless_border">#1e000000</item>
<item name="im_history_incoming_attachment_icon">?accent</item>
<item name="im_history_incoming_background">#ffebeced</item>
<item name="im_history_incoming_background_selected">#ffc2c7cc</item>
<item name="im_history_incoming_button">?accent</item>
<item name="im_history_incoming_foreground">@color/black</item>
<item name="im_history_incoming_foreground_caption">@color/im_old_gray_medium</item>
<item name="im_history_incoming_foreground_caption_inv">@color/white</item>
<item name="im_history_incoming_foreground_link">?accent</item>
<item name="im_history_incoming_foreground_name">?accent</item>
<item name="im_history_incoming_image_placeholder_background">#14000c1a</item>
<item name="im_history_incoming_snippet_placeholder_background">
@color/im_old_accent_muted_14
</item>
<item name="im_history_incoming_snippet_placeholder_icon">?accent</item>
<item name="im_history_info_bar_background">#fffafbfc</item>
<item name="im_history_info_bar_border">#26000000</item>
<item name="im_history_live_badge_background">#ffff3347</item>
<item name="im_history_outgoing_attachment_icon">?accent</item>
<item name="im_history_outgoing_background">#ffc2ddfc</item>
<item name="im_history_outgoing_background_selected">#ffa3bedc</item>
<item name="im_history_outgoing_button">?accent</item>
<item name="im_history_outgoing_foreground">@color/black</item>
<item name="im_history_outgoing_foreground_caption">@color/im_old_gray_medium</item>
<item name="im_history_outgoing_foreground_link">?accent</item>
<item name="im_history_outgoing_foreground_name">?accent</item>
<item name="im_history_outgoing_image_placeholder_background">#14000c1a</item>
<item name="im_history_outgoing_snippet_placeholder_background">
@color/im_old_accent_muted_14
</item>
<item name="im_history_outgoing_snippet_placeholder_icon">?accent</item>
<item name="im_history_sending_icon">?accent</item>
<item name="im_history_sticker_badge_background">#e6ffffff</item>
<item name="im_history_sticker_badge_foreground">@color/im_old_gray_medium</item>
<item name="im_history_unread_icon">?accent</item>
<item name="im_is_vk_me">false</item>
<item name="im_item_foreground_caption">@color/im_old_gray_medium</item>
<item name="im_item_foreground_name">?accent</item>
<item name="im_item_foreground_subhead">@color/im_old_gray_dark</item>
<item name="im_item_foreground_tertiary">@color/im_old_gray_light</item>
<item name="im_menu_foreground">@color/gray_800</item>
<item name="im_reply_sender_text">@color/white</item>
<item name="im_reply_separator">@color/white</item>
<item name="im_service_message_text">@color/steel_gray_400</item>
<item name="im_tabbar_icon_active">?accent</item>
<item name="im_tabbar_icon_inactive">@color/im_old_blue_gray_light</item>
<item name="im_toolbar_separator">@color/gray_300</item>
<item name="im_toolbar_voice_msg_background">@color/gray_700</item>
<item name="image_border">@color/white_alpha8</item>
<item name="input_background">@color/gray_700</item>
<item name="input_border">@color/gray_700</item>
<item name="landing_background">?accent</item>
<item name="landing_primary_button_background">@color/white</item>
<item name="landing_primary_button_background_disabled">#66ffffff</item>
<item name="landing_primary_button_foreground">?accent</item>
<item name="landing_primary_button_foreground_disabled">#665181b8</item>
<item name="landing_snippet_border">@color/clear</item>
<item name="landing_text_secondary">@color/white_alpha60</item>
<item name="landing_text_title">@color/white</item>
<item name="like_text_tint">@color/red_light</item>
<item name="link_alternate">?accent</item>
<item name="loader_background">@color/black</item>
<item name="loader_tint">@color/gray_500</item>
<item name="loader_track_fill">@color/gray_700</item>
<item name="loader_track_value_fill">@android:color/system_neutral1_200</item>
<item name="media_overlay_button_background">@color/white</item>
<item name="media_overlay_button_background_disabled">#66ffffff</item>
<item name="media_overlay_button_foreground">@color/black</item>
<item name="media_overlay_button_foreground_disabled">#662c2d2e</item>
<item name="modal_card_background">@color/black</item>
<item name="modal_card_border">@color/white_alpha12</item>
<item name="modal_card_header_close">@color/white</item>
<item name="music_playback_icon">@color/white</item>
<item name="overlay_status_background">@color/black</item>
<item name="overlay_status_foreground">@color/gray_100</item>
<item name="overlay_status_icon">@color/gray_50</item>
<item name="panel_tab_active_background">@color/gray_700</item>
<item name="panel_tab_active_text">@color/gray_100</item>
<item name="panel_tab_inactive_text">@color/gray_500</item>
<item name="placeholder_icon_background">@color/white_alpha8</item>
<item name="placeholder_icon_foreground_primary">@color/gray_400</item>
<item name="placeholder_icon_foreground_secondary">@color/gray_600</item>
<item name="placeholder_icon_tint">@color/white</item>
<item name="poll_option_background">@color/white</item>
<item name="search_bar_background">@color/black</item>
<item name="search_bar_field_background">@color/gray_700</item>
<item name="search_bar_field_tint">@color/gray_300</item>
<item name="search_bar_segmented_control_tint">@color/gray_400</item>
<item name="segmented_control_bar_background">@color/black</item>
<item name="segmented_control_tint">@color/gray_500</item>
<item name="selection_off_icon">@color/gray_700</item>
<item name="separator_alpha">@color/white_alpha15</item>
<item name="separator_alternate">@color/black</item>
<item name="separator_common">@color/gray_750</item>
<item name="snippet_background">@color/black</item>
<item name="snippet_border">@color/white_alpha12</item>
<item name="snippet_icon_tertiary">@color/gray_600</item>
<item name="splashscreen_icon">@color/black</item>
<item name="statusbar_alternate_legacy_background">@color/clear</item>
<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_inactive_icon">@color/gray_500</item>
<item name="text_action_counter">@color/gray_300</item>
<item name="text_link">@android:color/system_neutral1_200</item>
<item name="text_link_hightlighted_background">@android:color/system_neutral1_200</item>
<item name="text_muted">@color/gray_200</item>
<item name="text_name">@color/gray_100</item>
<item name="text_placeholder">@color/gray_300</item>
<item name="text_primary">@color/gray_100</item>
<item name="text_secondary">@color/gray_500</item>
<item name="text_subhead">@color/gray_400</item>
<item name="text_tertiary">@color/gray_600</item>
<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_400</item>
</style>
</resources> </resources>
+10
View File
@@ -696,4 +696,14 @@
<item>no_update</item> <item>no_update</item>
<item>imd_update</item> <item>imd_update</item>
</string-array> </string-array>
<string-array name="undel_value">
<item>[Deleted]</item>
<item>🗑</item>
<item>❌</item>
</string-array>
<string-array name="undel">
<item>default</item>
<item>icon</item>
<item>icon2</item>
</string-array>
</resources> </resources>
+5 -5
View File
@@ -4243,7 +4243,7 @@ Warning! It can cause long downloads of user lists if there are a lot of users i
<string name="ctypedisabled">Not set</string> <string name="ctypedisabled">Not set</string>
<string name="ctypesocks">Socks</string> <string name="ctypesocks">Socks</string>
<string name="dnr">Do not read</string> <string name="dnr">Do not read</string>
<string name="dns">Send status of viewing stories</string> <string name="dns">Status of viewing/checking stories</string>
<string name="dnw">Do not write</string> <string name="dnw">Do not write</string>
<string name="docknumbers">Counters in dockbar</string> <string name="docknumbers">Counters in dockbar</string>
<string name="docknumberssum">"Disabling doesn't work in the tablet interface"</string> <string name="docknumberssum">"Disabling doesn't work in the tablet interface"</string>
@@ -4276,7 +4276,7 @@ Registration date:"</string>
Expand text..."</string> Expand text..."</string>
<string name="interfacenewsfeed">Feed</string> <string name="interfacenewsfeed">Feed</string>
<string name="interfacenewsfeedswipe">Side camera in the news</string> <string name="interfacenewsfeedswipe">Side camera in the news</string>
<string name="interfacenewsfeedswipesum">Works only with the default newsfeed design</string> <string name="interfacenewsfeedswipesum">Works only with classic newsfeed design</string>
<string name="interfacestartfr">Default start fragment</string> <string name="interfacestartfr">Default start fragment</string>
<string name="interfacestartfrsum">Select start fragment</string> <string name="interfacestartfrsum">Select start fragment</string>
<string name="interfacevideo">Video</string> <string name="interfacevideo">Video</string>
@@ -4329,7 +4329,7 @@ You need to restart the application to apply proxy settings"</string>
<string name="shitposting">The same type of news</string> <string name="shitposting">The same type of news</string>
<string name="shitpostingsummary">Filter for cleaning posts with the Russian Federation and actions related in Ukraine</string> <string name="shitpostingsummary">Filter for cleaning posts with the Russian Federation and actions related in Ukraine</string>
<string name="showstories">Show stories</string> <string name="showstories">Show stories</string>
<string name="showstoriessum">Show stories at the top of the feed</string> <string name="showstoriessum">The story section at the top of the feed</string>
<string name="showvtfire">Show special verifications</string> <string name="showvtfire">Show special verifications</string>
<string name="showvtverify">Show verifications</string> <string name="showvtverify">Show verifications</string>
<string name="sprefsctype">Connection type</string> <string name="sprefsctype">Connection type</string>
@@ -4367,10 +4367,10 @@ You need to restart the application to apply proxy settings"</string>
<string name="useproxy">Proxy variant</string> <string name="useproxy">Proxy variant</string>
<string name="useproxyinfo">Information about using a proxy</string> <string name="useproxyinfo">Information about using a proxy</string>
<string name="useproxysum">Select the proxy variant</string> <string name="useproxysum">Select the proxy variant</string>
<string name="vkuiinj">VKUI theming</string> <string name="vkuiinj">Coloring web pages</string>
<string name="vtlawayphpsummary">Tracking the user to personalize ads. Also checking links to the blacklist from VKontakte and antivirus</string> <string name="vtlawayphpsummary">Tracking the user to personalize ads. Also checking links to the blacklist from VKontakte and antivirus</string>
<string name="vtloffline">Send online status</string> <string name="vtloffline">Send online status</string>
<string name="vtloffline2">Force offline requests</string> <string name="vtloffline2">Force offline</string>
<string name="vtloffline2summary">"Works only when online status sending is disabledsends instantly offline after sending messages and other api methods that are sent online <string name="vtloffline2summary">"Works only when online status sending is disabledsends instantly offline after sending messages and other api methods that are sent online
May look like a fake leaving the online"</string> May look like a fake leaving the online"</string>

Some files were not shown because too many files have changed in this diff Show More