Commit aae7778f authored by kenan's avatar kenan

fix null

parent c7e79b6a
......@@ -36,10 +36,14 @@ public class LocalConfig {
}
public String getLastDeck() {
String str = null;
if (lastdeck.exists()) {
return FileUtils.readAllString(lastdeck);
str = FileUtils.readAllString(lastdeck);
}
return null;
if(str == null){
str = Constants.PREF_DEF_LAST_CATEGORY;
}
return str;
}
public void setLastDeck(String deck) {
......@@ -47,10 +51,14 @@ public class LocalConfig {
}
public String getLastCategory() {
String str = null;
if (lastcategory.exists()) {
return FileUtils.readAllString(lastcategory);
str = FileUtils.readAllString(lastcategory);
}
if(str == null){
str = Constants.PREF_DEF_LAST_YDK;
}
return null;
return str;
}
public void setLastCategory(String category) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment