History page drawing
This commit is contained in:
@@ -550,6 +550,7 @@ pub fn split_with_coma(ts: &str) -> Vec<String> {
|
||||
.collect::<Vec<String>>()
|
||||
}
|
||||
|
||||
|
||||
pub fn app_data_dir() -> PathBuf {
|
||||
let mut dir = dirs::data_dir().unwrap();
|
||||
dir.push("jap_learn");
|
||||
@@ -559,3 +560,13 @@ pub fn app_data_dir() -> PathBuf {
|
||||
|
||||
dir
|
||||
}
|
||||
|
||||
pub fn app_cache_dir() -> PathBuf {
|
||||
let mut dir = dirs::cache_dir().unwrap();
|
||||
dir.push("jap_learn");
|
||||
if !dir.exists() {
|
||||
fs::create_dir(dir.clone()).unwrap();
|
||||
}
|
||||
|
||||
dir
|
||||
}
|
||||
Reference in New Issue
Block a user