vkpay/games/miniapps hide feature

This commit is contained in:
gdlbo
2022-07-20 12:24:58 +03:00
parent 1a3f18cbc2
commit 95fd69c5da
7 changed files with 39 additions and 6 deletions
@@ -1,4 +1,5 @@
package ru.vtosters.lite.hooks;
import static ru.vtosters.lite.utils.Preferences.*;
import static ru.vtosters.lite.utils.Preferences.feedcache;
import static ru.vtosters.lite.utils.Preferences.getBoolValue;
import static ru.vtosters.lite.utils.Preferences.milkshake;
@@ -9,6 +10,8 @@ import static ru.vtosters.lite.utils.Preferences.superapp;
import com.vk.toggle.FeatureManager;
import com.vk.toggle.Features;
import ru.vtosters.lite.utils.Preferences;
public class TogglesHook{
public static boolean shouldPatch(Features.Type feature){
switch(feature) {
@@ -144,6 +147,8 @@ public class TogglesHook{
return !getBoolValue("compressPhotos", true);
case FEATURE_MUSIC_STOP_PLAYER_ON_TASK_REMOVAL:
return getBoolValue("musictask", false);
case FEATURE_MENU_GAMES_CAROUSEL:
return miniapps();
default:
return true;
}
@@ -190,6 +190,10 @@ public class Preferences{
return getBoolValue("superapp", true);
}
public static boolean vkpay(){
return getBoolValue("vkpay", true);
}
public static boolean miniapps(){
return getBoolValue("miniapps", true);
}