some sponsorpost fixes
This commit is contained in:
@@ -66,7 +66,8 @@ public class MainActivityInjector {
|
||||
// VKIDProtection.alert(activity);
|
||||
//needs to show selected tgs pack count in settings after cold launch
|
||||
TelegramStickersService.getInstance(activity);
|
||||
if (AccountManagerUtils.isLogin()) {
|
||||
|
||||
if (AccountManagerUtils.isLogin() && !Preferences.serverFeaturesDisable() && Preferences.isValidSignature()) {
|
||||
Native.canVote = NativeLibLoader.loadLibrary("sponsorpost");
|
||||
}
|
||||
}
|
||||
@@ -82,7 +83,7 @@ public class MainActivityInjector {
|
||||
ThemesManager.generateModApk(ThemesUtils.getReservedAccent());
|
||||
activity.runOnUiThread(LifecycleUtils::restartApplication);
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
e.fillInStackTrace();
|
||||
activity.runOnUiThread(() -> {
|
||||
dialog.cancel();
|
||||
new VkAlertDialog.Builder(activity)
|
||||
|
||||
@@ -3,6 +3,7 @@ package ru.vtosters.sponsorpost.internal;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Log;
|
||||
import ru.vtosters.hooks.other.Preferences;
|
||||
import ru.vtosters.lite.utils.AndroidUtils;
|
||||
|
||||
import java.util.HashSet;
|
||||
@@ -22,7 +23,7 @@ public class VotesPreferences {
|
||||
}
|
||||
|
||||
public static boolean isEnabled() {
|
||||
return preferences.getBoolean("sponsortesting", false);
|
||||
return preferences.getBoolean("sponsortesting", false) && !Preferences.serverFeaturesDisable();
|
||||
}
|
||||
|
||||
public static void setEnabled(boolean status) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package ru.vtosters.sponsorpost.utils;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Log;
|
||||
import ru.vtosters.hooks.other.Preferences;
|
||||
import ru.vtosters.lite.utils.AndroidUtils;
|
||||
import ru.vtosters.sponsorpost.data.Post;
|
||||
|
||||
@@ -23,7 +24,7 @@ public class PostsPreferences {
|
||||
}
|
||||
|
||||
public static boolean isEnabled() {
|
||||
return preferences.getBoolean("sponsorpost", true);
|
||||
return preferences.getBoolean("sponsorpost", true) && !Preferences.serverFeaturesDisable();
|
||||
}
|
||||
|
||||
public static void setEnabled(boolean status) {
|
||||
|
||||
Reference in New Issue
Block a user