Forgotten
This commit is contained in:
@@ -11,6 +11,7 @@ public class Pref {
|
||||
|
||||
private static final SharedPreferences DISPOSABLE_BOOLEAN = App.getApp().getSharedPreferences("DISPOSABLE_BOOLEAN", Context.MODE_PRIVATE);
|
||||
public static final String SAMPLE_SCRIPTS_COPIED = "SAMPLE_SCRIPTS_COPIED";
|
||||
private static final String KEY_MAX_TEXT_LENGTH_FOR_CODE_COMPLETION = "KEY_MAX_TEXT_LENGTH_FOR_CODE_COMPLETION";
|
||||
|
||||
public static SharedPreferences def() {
|
||||
return PreferenceManager.getDefaultSharedPreferences(App.getApp());
|
||||
@@ -43,4 +44,12 @@ public class Pref {
|
||||
private static String getString(int id) {
|
||||
return App.getApp().getString(id);
|
||||
}
|
||||
|
||||
public static int MaxTextLengthForCodeCompletion() {
|
||||
try {
|
||||
return Integer.parseInt(def().getString(App.getApp().getString(R.string.key_max_length_for_code_completion), "2000"));
|
||||
} catch (NumberFormatException e) {
|
||||
return 2000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user