DeepL: experimental

This commit is contained in:
M66B
2021-05-24 07:58:58 +02:00
parent 4031b3d671
commit 2f399d1809
3 changed files with 12 additions and 1 deletions

View File

@@ -155,6 +155,12 @@ public class DeepL {
}
}
public static boolean isAvailable(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean experiments = prefs.getBoolean("experiments", false);
return (experiments && !BuildConfig.PLAY_STORE_RELEASE);
}
public static boolean canTranslate(Context context) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
String deepl_key = prefs.getString("deepl_key", null);