diff --git a/app/src/main/java/ru/vtosters/lite/foaf/FoafBase.java b/app/src/main/java/ru/vtosters/lite/foaf/FoafBase.java index b6d19e5bb..0e34cd076 100644 --- a/app/src/main/java/ru/vtosters/lite/foaf/FoafBase.java +++ b/app/src/main/java/ru/vtosters/lite/foaf/FoafBase.java @@ -33,7 +33,7 @@ public class FoafBase { private static final OkHttpClient client = new OkHttpClient(); public static int GetLastSeenInt(int i) throws ParseException, IOException { - Matcher matcher = FOAF_REGEX_LAST_SEEN.matcher(client.newCall(new okhttp3.Request.Builder().url(getLink(i)).build()).b().body().string()); + Matcher matcher = FOAF_REGEX_LAST_SEEN.matcher(client.a(new okhttp3.Request.Builder().url(getLink(i)).build()).b().body().string()); if (!matcher.find()) { return 0; } diff --git a/app/src/main/java/ru/vtosters/lite/ui/PreferencesUtil.java b/app/src/main/java/ru/vtosters/lite/ui/PreferencesUtil.java index d3fd99b1c..1ca8072c6 100644 --- a/app/src/main/java/ru/vtosters/lite/ui/PreferencesUtil.java +++ b/app/src/main/java/ru/vtosters/lite/ui/PreferencesUtil.java @@ -58,7 +58,7 @@ public class PreferencesUtil { preference.setDefaultValue(def); // setDefaultValue if (icon != null) preference.setIcon(setTint(getContext(), getDrawable(getContext(), icon))); // preference.setIcon - fragment.getPreferenceScreen().d(preference); // fragment.getPreferenceScreen().addPreference(preference) + fragment.getPreferenceScreen().addPreference(preference); // fragment.getPreferenceScreen().addPreference(preference) } public static void addMaterialSwitchPreference(MaterialPreferenceToolbarFragment materialPreferenceToolbarFragment, String key, CharSequence title, CharSequence summary, boolean defValue) { @@ -183,7 +183,7 @@ public class PreferencesUtil { margin.setMargins(convertDpToPixel(24f), 0, convertDpToPixel(24f), 0); editText.setLayoutParams(margin); - AlertDialog.Builder builder = new AlertDialog.Builder(fragment.p()); + AlertDialog.Builder builder = new AlertDialog.Builder(fragment.getContext()); builder.setTitle(title); builder.setView(linearLayout); builder.setPositiveButton("OK", (dialog, which) -> { diff --git a/app/src/main/java/ru/vtosters/lite/ui/dialogs/VKIDProtection.java b/app/src/main/java/ru/vtosters/lite/ui/dialogs/VKIDProtection.java index f84ae9093..f2199d0ec 100644 --- a/app/src/main/java/ru/vtosters/lite/ui/dialogs/VKIDProtection.java +++ b/app/src/main/java/ru/vtosters/lite/ui/dialogs/VKIDProtection.java @@ -10,6 +10,8 @@ import android.content.Intent; import com.vk.navigation.Navigator; +import ru.vtosters.lite.utils.VKUIwrapper; + public class VKIDProtection { public static void alert(final Activity activity) { AlertDialog.Builder builder = new AlertDialog.Builder(activity); @@ -21,7 +23,8 @@ public class VKIDProtection { // android.content.DialogInterface.OnClickListener builder.setNeutralButton(getString("vkiddisable"), (dialogInterface, i) -> { edit().putBoolean("showAlertVkId", false).apply(); - Intent a2 = new Navigator(VKConnect.class).b(activity); + VKUIwrapper.setLink("https://id.vk.com/account"); + Intent a2 = new Navigator(VKUIwrapper.class).b(activity); activity.startActivity(a2); }); if (getBoolValue("showAlertVkId", true)) {