v0.2 bug fixes

This commit is contained in:
Dmitry Isaenko 2019-02-18 05:40:19 +03:00
parent 42782929f9
commit d3b25d57b1
6 changed files with 33 additions and 12 deletions

View file

@ -16,7 +16,15 @@ public class AppPreferences {
theme = "/res/app_dark.css";
return theme;
}
public String getProtocol(){
String protocol = preferences.get("PROTOCOL", "TinFoil"); // Don't let user to change settings manually
if (!protocol.matches("(^TinFoil$)|(^GoldLeaf$)"))
protocol = "TinFoil";
return protocol;
}
public void setTheme(String theme){ preferences.put("THEME", theme); }
public void setProtocol(String protocol){ preferences.put("PROTOCOL", protocol); }
public String getRecent(){ return preferences.get("RECENT", System.getProperty("user.home")); }
public void setRecent(String path){ preferences.put("RECENT", path); }