added webview wrapper
This commit is contained in:
@@ -79,15 +79,14 @@ public class DNRModule {
|
||||
}
|
||||
|
||||
public static void hookDialogInfo(Dialog dialog) {
|
||||
new WebViewFragment.g(
|
||||
"https://vkscripts.ru/run/i/" +
|
||||
AndroidUtils.openWebView("https://vkscripts.ru/run/i/" +
|
||||
AccountManagerUtils.getUserToken() +
|
||||
"?peer_id=" +
|
||||
dialog.getId() +
|
||||
"&lang=" +
|
||||
LangUtils.a() +
|
||||
"&color=" +
|
||||
ThemesUtils.hexx(ThemesUtils.getAccentColor())).l().m().h().j().a(LifecycleUtils.getCurrentActivity());
|
||||
ThemesUtils.hexx(ThemesUtils.getAccentColor()), LifecycleUtils.getCurrentActivity());
|
||||
}
|
||||
|
||||
public static void hookDNR(int peerId) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
@@ -10,6 +11,7 @@ import android.util.Log;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.StringRes;
|
||||
|
||||
import com.vk.core.util.LangUtils;
|
||||
import com.vk.core.util.Screen;
|
||||
import com.vk.core.util.ToastUtils;
|
||||
|
||||
@@ -18,6 +20,7 @@ import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.vtosters.lite.general.fragments.WebViewFragment;
|
||||
import ru.vtosters.lite.hooks.DateHook;
|
||||
|
||||
public class AndroidUtils {
|
||||
@@ -133,6 +136,10 @@ public class AndroidUtils {
|
||||
ToastUtils.a(text);
|
||||
}
|
||||
|
||||
public static void openWebView(String url, Activity activity) {
|
||||
new WebViewFragment.g(url).l().m().h().j().a(activity);
|
||||
}
|
||||
|
||||
public static String MD5(String s) {
|
||||
try {
|
||||
var md = MessageDigest.getInstance("MD5");
|
||||
|
||||
Reference in New Issue
Block a user